usb: udc: core: Error if req->buf is either from vmalloc or stack
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 26 Apr 2017 00:56:12 +0000 (17:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2017 10:20:53 +0000 (12:20 +0200)
commit614536dac7f33c64a58fab4767a325d52572a7d1
treed79ddf1996c4389b65c84dc6b8a3c47e47edc508
parent4568136620c6482bcd4a6b0cd6ae8e5679615d7e
usb: udc: core: Error if req->buf is either from vmalloc or stack

Check that req->buf is a valid DMA capable address, produce a warning
and return an error if it's either coming from vmalloc space or is an on
stack buffer.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/core.c