summaryrefslogtreecommitdiff
path: root/drivers/net/ppp
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-07-26 16:21:39 +0300
committerArnd Bergmann <arnd@arndb.de>2019-10-23 18:23:47 +0300
commit8f5d9f2ce3020be1a7924b4cc4a1f51164f2c0b7 (patch)
tree52c0077167c36c3805c233237410c331333d7ec2 /drivers/net/ppp
parent17c7e7f407085f510a815c0c99b3fd25d5b13110 (diff)
downloadlinux-8f5d9f2ce3020be1a7924b4cc4a1f51164f2c0b7.tar.xz
compat_ioctl: ppp: move simple commands into ppp_generic.c
All ppp commands that are not already handled in ppp_compat_ioctl() are compatible, so they can now handled by calling the native ppp_ioctl() directly. Without CONFIG_BLOCK, the generic compat_ioctl table is now empty, so add a check to avoid a build failure in the looking function for that configuration. Cc: netdev@vger.kernel.org Cc: linux-ppp@vger.kernel.org Cc: Paul Mackerras <paulus@samba.org> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/net/ppp')
-rw-r--r--drivers/net/ppp/ppp_generic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index ce4dd45c541d..267fe2c58087 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -903,6 +903,10 @@ static long ppp_compat_ioctl(struct file *file, unsigned int cmd, unsigned long
}
mutex_unlock(&ppp_mutex);
+ /* all other commands have compatible arguments */
+ if (err == -ENOIOCTLCMD)
+ err = ppp_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
+
return err;
}
#endif