svn commit: r289948 - head/sys/dev/mge
Zbigniew Bodek
zbb at FreeBSD.org
Sun Oct 25 22:17:12 UTC 2015
Author: zbb
Date: Sun Oct 25 22:17:10 2015
New Revision: 289948
URL: https://svnweb.freebsd.org/changeset/base/289948
Log:
Change improper locking assertion in mge
Assertion used here was invalid. If current thread helds any of locks,
we never want to recurse on them.
Obtained from: Semihalf
Submitted by: Bartosz Szczepanek <bsz at semihalf.com>
Differential revision: https://reviews.freebsd.org/D3903
Modified:
head/sys/dev/mge/if_mgevar.h
Modified: head/sys/dev/mge/if_mgevar.h
==============================================================================
--- head/sys/dev/mge/if_mgevar.h Sun Oct 25 22:14:04 2015 (r289947)
+++ head/sys/dev/mge/if_mgevar.h Sun Oct 25 22:17:10 2015 (r289948)
@@ -137,10 +137,8 @@ struct mge_softc {
#define MGE_RECEIVE_LOCK_ASSERT(sc) mtx_assert(&(sc)->receive_lock, MA_OWNED)
#define MGE_GLOBAL_LOCK(sc) do { \
- if ((mtx_owned(&(sc)->transmit_lock) ? 1 : 0) != \
- (mtx_owned(&(sc)->receive_lock) ? 1 : 0)) { \
- panic("mge deadlock possibility detection!"); \
- } \
+ mtx_assert(&(sc)->transmit_lock, MA_NOTOWNED); \
+ mtx_assert(&(sc)->receive_lock, MA_NOTOWNED); \
mtx_lock(&(sc)->transmit_lock); \
mtx_lock(&(sc)->receive_lock); \
} while (0)
More information about the svn-src-all
mailing list