]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'Rework-ip_ra_chain-protection'
authorDavid S. Miller <davem@davemloft.net>
Thu, 22 Mar 2018 19:12:57 +0000 (15:12 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Mar 2018 19:12:57 +0000 (15:12 -0400)
commita82a871857036327eca922cab57116705f797cd9
tree0b09f0de0ff410fef91ad0224a241b322bd0eb05
parentc3897ef456332e7b86afef465a2dcb300faa75e3
parentc49d91cf8b5bdc7cb3260f1c1c3b88037fc332a8
Merge branch 'Rework-ip_ra_chain-protection'

Kirill Tkhai says:

====================
Rework ip_ra_chain protection

Commit f863066a5794 "ipv4: fix a deadlock in ip_ra_control"
made rtnl_lock() be used in raw_close(). This function is called
on every RAW socket destruction, so that rtnl_mutex is taken
every time. This scales very sadly. I observe cleanup_net()
spending a lot of time in rtnl_lock() and raw_close() is one
of the biggest rtnl user (since we have percpu net->ipv4.icmp_sk).

This patchset reworks the locking: reverts the problem commit
and its descendant, and introduces rtnl-independent locking.
This may have a continuation, and someone may work on killing
rtnl_lock() in mrtsock_destruct() in the future.

v3: Change patches order: [2/5] and [3/5].
v2: Fix sparse warning [4/5], as reported by kbuild test robot.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>