Commit fe0ebea
staging: greybus: uart: 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
meaningless.
Signed-off-by: Qiu-ji Chen <[email protected]>
Fixes: 0aad5ad ("greybus/uart: switch to ->[sg]et_serial()")
Reviewed-by: Johan Hovold <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent c483887 commit fe0ebea
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
| 599 | + | |
599 | 600 | | |
600 | 601 | | |
601 | 602 | | |
602 | 603 | | |
603 | 604 | | |
| 605 | + | |
604 | 606 | | |
605 | 607 | | |
606 | 608 | | |
| |||
0 commit comments