From: Thomas Graf Date: Wed, 6 Aug 2014 23:18:47 +0000 (+0100) Subject: netlink: hold nl_sock_hash_lock during diag dump X-Git-Tag: omap-for-v3.17/fixes-against-rc2~138^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c8f7e70837468da4e658080d4448930fb597e1b;p=pandora-kernel.git netlink: hold nl_sock_hash_lock during diag dump Although RCU protection would be possible during diag dump, doing so allows for concurrent table mutations which can render the in-table offset between individual Netlink messages invalid and thus cause legitimate sockets to be skipped in the dump. Since the diag dump is relatively low volume and consistency is more important than performance, the table mutex is held during dump. Reported-by: Andrey Wagin Signed-off-by: Thomas Graf Fixes: e341694e3eb57fc ("netlink: Convert netlink_lookup() to use RCU protected hash table") Signed-off-by: David S. Miller --- Reading git-diff-tree failed