Workaround bad locking design:
do not try to lock/unlock destroyed/non-existsing mutex. PR: kern/103569 Reviewed by: guido Approved by: glebius (mentor) Silence from: darrenr MFC: 2 week
This commit is contained in:
parent
32d5d9ffc9
commit
29453026ea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=163027
@ -481,7 +481,8 @@ int mode;
|
|||||||
}
|
}
|
||||||
|
|
||||||
SPL_NET(s);
|
SPL_NET(s);
|
||||||
READ_ENTER(&ipf_global);
|
if (fr_running > 0)
|
||||||
|
READ_ENTER(&ipf_global);
|
||||||
|
|
||||||
error = fr_ioctlswitch(unit, data, cmd, mode);
|
error = fr_ioctlswitch(unit, data, cmd, mode);
|
||||||
if (error != -1) {
|
if (error != -1) {
|
||||||
@ -514,7 +515,10 @@ int mode;
|
|||||||
else
|
else
|
||||||
(void) ipldetach();
|
(void) ipldetach();
|
||||||
} else {
|
} else {
|
||||||
error = ipldetach();
|
if (fr_running <= 0)
|
||||||
|
error = 0;
|
||||||
|
else
|
||||||
|
error = ipldetach();
|
||||||
if (error == 0)
|
if (error == 0)
|
||||||
fr_running = -1;
|
fr_running = -1;
|
||||||
}
|
}
|
||||||
@ -627,7 +631,9 @@ int mode;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
RWLOCK_EXIT(&ipf_global);
|
if (fr_running > 0)
|
||||||
|
if (mtx_owned(&(&ipf_global)->ipf_lk))
|
||||||
|
RWLOCK_EXIT(&ipf_global);
|
||||||
SPL_X(s);
|
SPL_X(s);
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
|
Loading…
Reference in New Issue
Block a user