mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-06 13:44:31 -05:00
serial: core: Document lock requirement for UPF_* flags updates
The flags field of struct uart_port can only be safely modified if the port mutex is held; no other lock prevents concurrent changes from corrupting the field. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
16020b989a
commit
8a949b07e4
@@ -152,6 +152,7 @@ struct uart_port {
|
||||
unsigned long sysrq; /* sysrq timeout */
|
||||
#endif
|
||||
|
||||
/* flags must be updated while holding port mutex */
|
||||
upf_t flags;
|
||||
|
||||
#define UPF_FOURPORT ((__force upf_t) (1 << 1))
|
||||
|
||||
Reference in New Issue
Block a user