diff options
author | Nam Cao <[email protected]> | 2023-07-31 13:06:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2023-08-04 16:20:13 +0200 |
commit | 1422b526fba994cf05fd288a152106563b875fce (patch) | |
tree | ff70ac32e36e361bd46e124b6f5dcf252dd71080 /net/lapb/lapb_timer.c | |
parent | ac19020be0e2e6ff62d18439d7f81251bdd1bb5a (diff) |
staging: rtl8712: fix race condition
In probe function, request_firmware_nowait() is called to load firmware
asynchronously. At completion of firmware loading, register_netdev() is
called. However, a mutex needed by netdev is initialized after the call
to request_firmware_nowait(). Consequently, it can happen that
register_netdev() is called before the driver is ready.
Move the mutex initialization into r8712_init_drv_sw(), which is called
before request_firmware_nowait().
Reported-by: [email protected]
Closes: https://lore.kernel.org/linux-staging/[email protected]/T/#u
Fixes: 8c213fa59199 ("staging: r8712u: Use asynchronous firmware loading")
Cc: stable <[email protected]>
Signed-off-by: Nam Cao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions