commit | 153a2d7e3350cc89d406ba2d35be8793a64c2038 | [log] [tgz] |
---|---|---|
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Thu Dec 09 18:59:27 2021 +0100 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Sun Dec 12 13:04:03 2021 +0100 |
tree | a56722a96e98ca8a62d488219c7655a05acf412d | |
parent | 7faac1953ed1f658f719cdf7bb7303fa5eef822c [diff] |
USB: gadget: detect too-big endpoint 0 requests Sometimes USB hosts can ask for buffers that are too large from endpoint 0, which should not be allowed. If this happens for OUT requests, stall the endpoint, but for IN requests, trim the request size to the endpoint buffer size. Co-developed-by: Szymon Heidrich <szymon.heidrich@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>