]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: oops in ptp_ioctl()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 26 May 2016 06:46:22 +0000 (09:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 May 2016 05:32:27 +0000 (22:32 -0700)
commit7172faaf17a292091b56830e5043d2d4c842ae3c
tree6962ce79a5ccb72dfd53d474dba0395026707bfe
parent02cfc9c0e0df4c789f3cdaae94c182bdae8a6405
ptp: oops in ptp_ioctl()

If we pass ERR_PTR(-EFAULT) to kfree() then it's going to oops.

Fixes: b3eb81aa5bdc ('ptp: use memdup_user().')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_chardev.c