From: nikolay@redhat.com Date: Mon, 22 Apr 2013 08:12:22 +0000 (+0000) Subject: bonding: fix locking in enslave failure path X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~77^2~15^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6cdcf6d82bc8f53e64ad59464e0114fe48e28bb;p=pandora-kernel.git bonding: fix locking in enslave failure path In commit 3c5913b53fefc9d9e15a2d0f93042766658d9f3f ("bonding: primary_slave & curr_active_slave are not cleaned on enslave failure") I didn't account for the use of curr_active_slave without curr_slave_lock and since there are such users, we should hold bond->lock for writing while setting it to NULL (in the NULL case we don't need the curr_slave_lock). Keeping the bond lock as to avoid the extra release/acquire cycle. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller --- Reading git-diff-tree failed