Re: [PATCH v5 2/4] net: socket: rework SIOC?IFMAP ioctls
From: Christoph Hellwig <hch@lst.de>
Date: 2021-07-21 07:29:45
From: Christoph Hellwig <hch@lst.de>
Date: 2021-07-21 07:29:45
+static int dev_getifmap(struct net_device *dev, struct ifreq *ifr)
+{
+ struct ifmap *ifmap = &ifr->ifr_map;
+ struct compat_ifmap *cifmap = (struct compat_ifmap *)&ifr->ifr_map;
+
+ if (in_compat_syscall()) {Any reason that the cifmap declaration is outside this conditional?
+static int dev_setifmap(struct net_device *dev, struct ifreq *ifr)
+{
+ struct compat_ifmap *cifmap = (struct compat_ifmap *)&ifr->ifr_map;
+
+ if (!dev->netdev_ops->ndo_set_config)
+ return -EOPNOTSUPP;
+
+ if (in_compat_syscall()) {Same here. Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@lst.de>