diff options
author | Andrzej Pietrasiewicz <[email protected]> | 2012-03-28 09:30:50 +0200 |
---|---|---|
committer | Felipe Balbi <[email protected]> | 2012-04-10 19:11:51 +0300 |
commit | 92b0abf80c5c5f0e0d71d1309688a330fd74731b (patch) | |
tree | 0ffb98f0f549111763f3b28ec4ae2215635b16f7 /lib/mpi/mpi-inline.c | |
parent | 6190c79df861d2c78a7448fe6d4260e5fa53b9b9 (diff) |
usb: gadget: eliminate NULL pointer dereference (bugfix)
usb: gadget: eliminate NULL pointer dereference (bugfix)
This patch fixes a bug which causes NULL pointer dereference in
ffs_ep0_ioctl. The bug happens when the FunctionFS is not bound (either
has not been bound yet or has been bound and then unbound) and can be
reproduced with running the following commands:
$ insmod g_ffs.ko
$ mount -t functionfs func /dev/usbgadget
$ ./null
where null.c is:
#include <fcntl.h>
#include <linux/usb/functionfs.h>
int main(void)
{
int fd = open("/dev/usbgadget/ep0", O_RDWR);
ioctl(fd, FUNCTIONFS_CLEAR_HALT);
return 0;
}
Signed-off-by: Andrzej Pietrasiewicz <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Cc: [email protected]
Signed-off-by: Felipe Balbi <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-inline.c')
0 files changed, 0 insertions, 0 deletions