Lars-Peter Clausen 38740a5b87 usb: gadget: f_fs: Fix use-after-free
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: 2e4c7553cd6f ("usb: gadget: f_fs: add aio support")
Cc: <stable@vger.kernel.org> # v3.15+
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-20 10:38:06 +03:00
..
2016-04-20 10:38:06 +03:00
2016-04-04 15:18:37 +03:00
2015-06-23 18:00:05 -04:00
2015-08-06 09:35:20 -05:00
2014-11-06 16:18:19 -06:00
2015-08-06 09:35:20 -05:00