diff options
author | Daniel Starke <[email protected]> | 2022-04-14 02:42:08 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2022-04-15 08:36:04 +0200 |
commit | 1ec92e9742774bf42614fceea3bf6b50c9409225 (patch) | |
tree | 9d6b74a34a704d7c61d3736d73d4eb61c8a0eb5f /lib/test_fortify/write_overflow-strlcpy-src.c | |
parent | aa371e96f05dcb36a88298f5cb70aa7234d5e8b8 (diff) |
tty: n_gsm: fix decoupled mux resource
The active mux instances are managed in the gsm_mux array and via mux_get()
and mux_put() functions separately. This gives a very loose coupling
between the actual instance and the gsm_mux array which manages it. It also
results in unnecessary lockings which makes it prone to failures. And it
creates a race condition if more than the maximum number of mux instances
are requested while the user changes the parameters of an active instance.
The user may loose ownership of the current mux instance in this case.
Fix this by moving the gsm_mux array handling to the mux allocation and
deallocation functions.
Fixes: e1eaea46bb40 ("tty: n_gsm line discipline")
Cc: [email protected]
Signed-off-by: Daniel Starke <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions