aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp/ppp_generic.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-07-26 15:21:39 +0200
committerArnd Bergmann <arnd@arndb.de>2019-10-23 17:23:47 +0200
commit8f5d9f2ce3020be1a7924b4cc4a1f51164f2c0b7 (patch)
tree52c0077167c36c3805c233237410c331333d7ec2 /drivers/net/ppp/ppp_generic.c
parentcompat_ioctl: handle PPPIOCGIDLE for 64-bit time_t (diff)
downloadlinux-dev-8f5d9f2ce3020be1a7924b4cc4a1f51164f2c0b7.tar.xz
linux-dev-8f5d9f2ce3020be1a7924b4cc4a1f51164f2c0b7.zip
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 '')
-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