summaryrefslogtreecommitdiffstats
path: root/net/atm/ioctl.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-05-10 17:20:49 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2020-05-20 20:31:33 -0400
commit8c2348e36af0da79477b0726781da297263269a4 (patch)
tree7531d2169816af383653297b7560a6be3d3eb7c5 /net/atm/ioctl.c
parent38c53ca3c114fa2a7030f0d1f54feaf044957609 (diff)
downloadlinux-stable-8c2348e36af0da79477b0726781da297263269a4.tar.gz
linux-stable-8c2348e36af0da79477b0726781da297263269a4.tar.bz2
linux-stable-8c2348e36af0da79477b0726781da297263269a4.zip
atm: separate ATM_GETNAMES handling from the rest of atm_dev_ioctl()
atm_dev_ioctl() does copyin in two different ways - one for ATM_GETNAMES, another for everything else. Start with separating the former into a new helper (atm_getnames()). The next step will be to lift the copyin into the callers. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/atm/ioctl.c')
-rw-r--r--net/atm/ioctl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c
index d955b683aa7c..0b4b07740fe4 100644
--- a/net/atm/ioctl.c
+++ b/net/atm/ioctl.c
@@ -162,7 +162,11 @@ static int do_vcc_ioctl(struct socket *sock, unsigned int cmd,
if (error != -ENOIOCTLCMD)
goto done;
- error = atm_dev_ioctl(cmd, argp, compat);
+ if (cmd == ATM_GETNAMES) {
+ error = atm_getnames(argp, compat);
+ } else {
+ error = atm_dev_ioctl(cmd, argp, compat);
+ }
done:
return error;