Commit a6b07e89 authored by Luc Van Oostenryck's avatar Luc Van Oostenryck Committed by Greg Kroah-Hartman

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 <derek.kiernan@xilinx.com>
CC: Dragan Cvetic <dragan.cvetic@xilinx.com>
Signed-off-by: default avatarLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Acked-by: default avatarDragan Cvetic <dragan.cvetic@xilinx.com>
Link: https://lore.kernel.org/r/20191209213719.58037-1-luc.vanoostenryck@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b0bd9ae3
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment