mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 00:22:07 +07:00
n_gsm: add missing __user annotations
sparse warns about incorrect types: n_gsm.c:2638:35: warning: incorrect type in argument 1 (different address spaces) n_gsm.c:2638:35: expected void [noderef] <asn:1> *to n_gsm.c:2638:35: got void * The ioctl handler casts its `arg' to (void *) without __user. Add that. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20200219084949.28074-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
329aa6e6e1
commit
edd05a735a
@ -2638,11 +2638,11 @@ static int gsmld_ioctl(struct tty_struct *tty, struct file *file,
|
||||
switch (cmd) {
|
||||
case GSMIOC_GETCONF:
|
||||
gsm_copy_config_values(gsm, &c);
|
||||
if (copy_to_user((void *)arg, &c, sizeof(c)))
|
||||
if (copy_to_user((void __user *)arg, &c, sizeof(c)))
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
case GSMIOC_SETCONF:
|
||||
if (copy_from_user(&c, (void *)arg, sizeof(c)))
|
||||
if (copy_from_user(&c, (void __user *)arg, sizeof(c)))
|
||||
return -EFAULT;
|
||||
return gsm_config(gsm, &c);
|
||||
case GSMIOC_GETFIRST:
|
||||
|
Loading…
Reference in New Issue
Block a user