1
0
Fork 0
alistair23-linux/net/netlink
Johannes Berg a2084f5650 netlink: use NETLINK_CB(in_skb).sk instead of looking it up
When netlink_ack() reports an allocation error to the sending
socket, there's no need to look up the sending socket since
it's available in the SKB's CB. Use that instead of going to
the trouble of looking it up.

Note that the pointer is only available since Eric Biederman's
commit 3fbc290540 ("netlink: Make the sending netlink socket availabe in NETLINK_CB")
which is far newer than the original lookup code (Oct 2003)
(though the field was called 'ssk' in that commit and only got
renamed to 'sk' later, I'd actually argue 'ssk' was better - or
perhaps it should've been 'source_sk' - since there are so many
different 'sk's involved.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-18 12:20:13 +01:00
..
Kconfig netlink: remove mmapped netlink support 2016-02-18 11:42:18 -05:00
Makefile netlink: Diag core and basic socket info dumping (v2) 2013-03-21 12:38:03 -04:00
af_netlink.c netlink: use NETLINK_CB(in_skb).sk instead of looking it up 2017-10-18 12:20:13 +01:00
af_netlink.h netlink: extended ACK reporting 2017-04-13 13:58:20 -04:00
diag.c netlink/diag: report flags for netlink sockets 2017-04-05 07:13:56 -07:00
genetlink.c netlink: pass extended ACK struct where available 2017-04-13 13:58:22 -04:00