linux-stable/net/l2tp
Oliver Hartkopp f4b41f062c net: remove noblock parameter from skb_recv_datagram()
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>
2022-04-06 13:45:26 +01:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile l2tp: add tracepoint infrastructure to core 2020-08-22 12:44:37 -07:00
l2tp_core.c net/l2tp: convert tunnel rwlock_t to rcu 2021-11-29 12:11:25 +00:00
l2tp_core.h net/l2tp: convert tunnel rwlock_t to rcu 2021-11-29 12:11:25 +00:00
l2tp_debugfs.c l2tp: add netns refcount tracker to l2tp_dfs_seq_data 2021-12-10 06:38:27 -08:00
l2tp_eth.c l2tp: remove header length param from l2tp_xmit_skb 2020-09-03 12:19:03 -07:00
l2tp_ip.c net: remove noblock parameter from skb_recv_datagram() 2022-04-06 13:45:26 +01:00
l2tp_ip6.c net: remove noblock parameter from skb_recv_datagram() 2022-04-06 13:45:26 +01:00
l2tp_netlink.c net: l2tp: reduce log level of messages in receive path, add counter instead 2021-03-03 16:55:02 -08:00
l2tp_ppp.c net: remove noblock parameter from skb_recv_datagram() 2022-04-06 13:45:26 +01:00
trace.h l2tp: add tracepoint definitions in trace.h 2020-08-22 12:44:37 -07:00