Commit 8b52494
USB: serial: ftdi_sio: Fix atomicity violation in get_serial_info()
Our static checker found a bug where set_serial_info() uses a mutex, but
get_serial_info() does not. Fortunately, the impact of this is relatively
minor. It doesn't cause a crash or any other serious issues. However, if a
race condition occurs between set_serial_info() and get_serial_info(),
there is a chance that the data returned by get_serial_info() will be
inconsistent.
Fixes: 3ae36be ("fdti_sio: switch to ->[sg]et_serial()")
Signed-off-by: Qiu-ji Chen <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>1 parent 4082772 commit 8b52494
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1443 | 1443 | | |
1444 | 1444 | | |
1445 | 1445 | | |
| 1446 | + | |
1446 | 1447 | | |
1447 | 1448 | | |
1448 | 1449 | | |
| 1450 | + | |
1449 | 1451 | | |
1450 | 1452 | | |
1451 | 1453 | | |
| |||
0 commit comments