mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Add missing lock upon initialization of the interface
Lack of this lock was causing crash if down was called in parallel with the initialization routine. Submitted by: Michal Krawczyk <mk@semihalf.com> Obtained from: Semihalf Sponsored by: Amazon.com Inc.
This commit is contained in:
parent
61b0ecf4fb
commit
3d3a90f9ab
1 changed files with 4 additions and 1 deletions
|
|
@ -2276,8 +2276,11 @@ ena_init(void *arg)
|
|||
{
|
||||
struct ena_adapter *adapter = (struct ena_adapter *)arg;
|
||||
|
||||
if (adapter->up == false)
|
||||
if (adapter->up == false) {
|
||||
sx_xlock(&adapter->ioctl_sx);
|
||||
ena_up(adapter);
|
||||
sx_unlock(&adapter->ioctl_sx);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue