net: socket: rework SIOC?IFMAP ioctls
authorArnd Bergmann <arnd@arndb.de>
Thu, 22 Jul 2021 14:29:00 +0000 (16:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jul 2021 13:20:25 +0000 (14:20 +0100)
commit709566d79209af9255c7c201d9ffdd9039fa35ab
treec65f080d1bae96c781a726ed1734562eab8cda00
parentdd98d2895de6485c884a9cb42de69fed02826fa4
net: socket: rework SIOC?IFMAP ioctls

SIOCGIFMAP and SIOCSIFMAP currently require compat_alloc_user_space()
and copy_in_user() for compat mode.

Move the compat handling into the location where the structures are
actually used, to avoid using those interfaces and get a clearer
implementation.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev_ioctl.c
net/socket.c