From: Peter Hurley Date: Tue, 2 Sep 2014 21:39:19 +0000 (-0400) Subject: serial: core: Document lock requirement for UPF_* flags updates X-Git-Tag: v4.14-rc1~6738^2~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a949b07e4062cbd07e04e6a47249e69ca65b944;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index cf3a1e7..8cb267b 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -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))