linux-stable/net/nfc
Oliver Hartkopp f77cde4a26 net: remove noblock parameter from skb_recv_datagram()
[ Upstream commit f4b41f062c ]

skb_recv_datagram() has two parameters 'flags' and 'noblock' that are
merged inside skb_recv_datagram() by 'flags | (noblock ? MSG_DONTWAIT : 0)'

As 'flags' may contain MSG_DONTWAIT as value most callers split the 'flags'
into 'flags' and 'noblock' with finally obsolete bit operations like this:

skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, flags & MSG_DONTWAIT, &rc);

And this is not even done consistently with the 'flags' parameter.

This patch removes the obsolete and costly splitting into two parameters
and only performs bit operations when really needed on the caller side.

One missing conversion thankfully reported by kernel test robot. I missed
to enable kunit tests to build the mctp code.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-22 14:28:02 +02:00
..
hci nfc: drop unneeded debug prints 2021-10-11 17:00:51 -07:00
nci NFC: nci: fix sleep in atomic context bugs caused by nci_skb_alloc 2022-05-17 17:55:53 -07:00
Kconfig net: remove redundant 'depends on NET' 2021-01-27 17:04:12 -08:00
Makefile
af_nfc.c nfc: fix error handling of nfc_proto_register() 2021-10-13 17:32:38 -07:00
core.c NFC: NULL out the dev->rfkill to prevent UAF 2022-06-09 10:29:58 +02:00
digital.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
digital_core.c NFC: digital: fix possible memory leak in digital_tg_listen_mdaa() 2021-10-13 17:44:29 -07:00
digital_dep.c net:nfc:digital: Fix a double free in digital_tg_recv_dep_req 2021-04-27 15:36:10 -07:00
digital_technology.c NFC: digital: fix possible memory leak in digital_in_send_sdd_req() 2021-10-13 17:44:29 -07:00
llcp.h nfc: llcp: Revert "NFC: Keep socket alive until the DISC PDU is actually sent" 2022-03-03 10:43:37 +00:00
llcp_commands.c nfc: drop unneeded debug prints 2021-10-11 17:00:51 -07:00
llcp_core.c nfc: llcp: Revert "NFC: Keep socket alive until the DISC PDU is actually sent" 2022-03-03 10:43:37 +00:00
llcp_sock.c net: remove noblock parameter from skb_recv_datagram() 2022-06-22 14:28:02 +02:00
netlink.c NFC: netlink: fix sleep in atomic bug when firmware download timeout 2022-05-05 10:18:15 +02:00
nfc.h nfc: constify several pointers to u8, char and sk_buff 2021-07-30 17:22:52 +02:00
rawsock.c net: remove noblock parameter from skb_recv_datagram() 2022-06-22 14:28:02 +02:00