misc: xilinx_sdfec: add missing __user annotation
Subsystems (3)
PATCH v2 1/1 misc: xilinx_sdfec: add missing __user annotation
The second arg of xsdfec_set_order() is a 'void __user *' and this pointer is then used in get_user() which expect a __user pointer.
But get_user() can't be used with a void pointer, it a pointer to the effective type. This is done here by casting the argument to a pointer to the effective type but the __user is missing in the cast.
Fix this by adding the missing __user in the cast.
CC Derek Kiernan <[email protected]>
CC Dragan Cvetic <[email protected]>
Signed-off-by Luc Van Oostenryck <[email protected]>
Acked-by Dragan Cvetic <[email protected]>
---
Greg,
Can you take this in your tree?
Thanks.
Change since v1:
- add Dragan's ack.
drivers/misc/xilinx_sdfec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/xilinx_sdfec.c +1 -1
@@ -733,7 +733,7 @@ static int xsdfec_set_order(struct xsdfec_dev *xsdfec, void __user *arg)enum xsdfec_order order;int err; - err =get_user (order, (enum xsdfec_order *)arg); + err =get_user (order, (enum xsdfec_order __user *)arg);if (err)return -EFAULT ;
Signature · 1 line
2.24.0