]> git.baikalelectronics.ru Git - kernel.git/commit
net: disallow ancillary data for __sys_{send,recv}msg_file()
authorJens Axboe <axboe@kernel.dk>
Tue, 26 Nov 2019 00:04:13 +0000 (17:04 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 Nov 2019 22:02:53 +0000 (15:02 -0700)
commit387f6741b34af865f70a7d3b336b42fb84983fb1
tree054fc5da5cbcbc2922575d0f13b83d5023c96755
parent06b8f258fc102923a416c5a2469c1298bc90c24a
net: disallow ancillary data for __sys_{send,recv}msg_file()

Only io_uring uses (and added) these, and we want to disallow the
use of sendmsg/recvmsg for anything but regular data transfers.
Use the newly added prep helper to split the msghdr copy out from
the core function, to check for msg_control and msg_controllen
settings. If either is set, we return -EINVAL.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
net/socket.c