Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d822c753 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Gerrit - the friendly Code Review server
Browse files

BACKPORT: usb: gadget: f_fs: Fix use-after-free



(cherry picked from commit 38740a5b87d53ceb89eb2c970150f6e94e00373a)

When using asynchronous read or write operations on the USB endpoints the
issuer of the IO request is notified by calling the ki_complete() callback
of the submitted kiocb when the URB has been completed.

Calling this ki_complete() callback will free kiocb. Make sure that the
structure is no longer accessed beyond that point, otherwise undefined
behaviour might occur.

Fixes: 2e4c7553 ("usb: gadget: f_fs: add aio support")
Cc: <stable@vger.kernel.org> # v3.15+
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Change-Id: I3c7b643f6440c4fb6160a57c1058523030b46a6c
Bug: 30950866
Git-repo: https://kernel.googlesource.com/pub/scm/linux/kernel/git/mhocko/mm.git


Git-commit: 3846402f09e425009ae20f6f0f58be4227291cab
Signed-off-by: default avatarDennis Cagle <d-cagle@codeaurora.org>
parent dd34da35
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment