diff options
| author | Peter Hurley <peter@hurleysoftware.com> | 2014-09-02 17:39:19 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-08 19:23:36 -0400 |
| commit | 8a949b07e4062cbd07e04e6a47249e69ca65b944 (patch) | |
| tree | fd8cfdd636e4bd27bcf6c3af31da41149d3139e4 /include/linux | |
| parent | 16020b989ac72b0b02654612a7b70398a7faac21 (diff) | |
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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/serial_core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index cf3a1e789bf5..8cb267b1fcd5 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -152,6 +152,7 @@ struct uart_port { | |||
| 152 | unsigned long sysrq; /* sysrq timeout */ | 152 | unsigned long sysrq; /* sysrq timeout */ |
| 153 | #endif | 153 | #endif |
| 154 | 154 | ||
| 155 | /* flags must be updated while holding port mutex */ | ||
| 155 | upf_t flags; | 156 | upf_t flags; |
| 156 | 157 | ||
| 157 | #define UPF_FOURPORT ((__force upf_t) (1 << 1)) | 158 | #define UPF_FOURPORT ((__force upf_t) (1 << 1)) |
