e1000e: fix double release of mutex
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 12 Dec 2008 05:28:11 +0000 (21:28 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 18 Dec 2008 17:13:36 +0000 (09:13 -0800)
commitd3d1dd2ac58c1ffe0311f25a4eac8f26fca72a62
treefef38bc0a1a3d251974bfcdc0874047b38f1b45c
parent21f38438e2d63830c4243340efcb8216757ac74b
e1000e: fix double release of mutex

commit 30bb0e0dce78427f3e5cb728d6b5ea73acbefffa upstream.

During a reset, releasing the swflag after it failed to be acquired would
cause a double unlock of the mutex.  Instead, test whether acquisition of
the swflag was successful and if not, do not release the swflag.  The reset
must still be done to bring the device to a quiescent state.

This resolves [BUG 12200] BUG: bad unlock balance detected! e1000e
http://bugzilla.kernel.org/show_bug.cgi?id=12200

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/e1000e/ich8lan.c