summaryrefslogtreecommitdiff
path: root/net/core/dev_ioctl.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-07-27 16:45:15 +0300
committerDavid S. Miller <davem@davemloft.net>2021-07-27 22:11:45 +0300
commit88fc023f7de22922c6c61e2f3d4c54befb8b3549 (patch)
treee28612f0cf560893e4b6dd170d5dd8d131308016 /net/core/dev_ioctl.c
parentad7eab2ab014748b062507b7ac69f8e856057717 (diff)
downloadlinux-88fc023f7de22922c6c61e2f3d4c54befb8b3549.tar.xz
net: socket: return changed ifreq from SIOCDEVPRIVATE
Some drivers that use SIOCDEVPRIVATE ioctl commands modify the ifreq structure and expect it to be passed back to user space, which has never really happened for compat mode because the calling these drivers through ndo_do_ioctl requires overwriting the ifr_data pointer. Now that all drivers are converted to ndo_siocdevprivate, change it to handle this correctly in both compat and native mode. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev_ioctl.c')
-rw-r--r--net/core/dev_ioctl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
index e0586bc4d6c6..70a379cee5fd 100644
--- a/net/core/dev_ioctl.c
+++ b/net/core/dev_ioctl.c
@@ -286,9 +286,7 @@ static int dev_siocdevprivate(struct net_device *dev, struct ifreq *ifr,
return -ENODEV;
}
- /* fall back to do_ioctl for drivers not yet converted */
- ifr->ifr_data = data;
- return dev_do_ioctl(dev, ifr, cmd);
+ return -EOPNOTSUPP;
}
static int dev_siocwandev(struct net_device *dev, struct if_settings *ifs)