diff options
author | 2023-06-05 20:06:16 +0530 | |
---|---|---|
committer | 2023-06-06 10:47:04 +0200 | |
commit | 943211c87427f25bd22e0e63849fb486bb5f87fa (patch) | |
tree | c52147cc09a9a48ec908488f25575fed99c90ff2 /scripts/generate_rust_analyzer.py | |
parent | fs.h: Optimize file struct to prevent false sharing (diff) | |
download | wireguard-linux-943211c87427f25bd22e0e63849fb486bb5f87fa.tar.xz wireguard-linux-943211c87427f25bd22e0e63849fb486bb5f87fa.zip |
watch_queue: prevent dangling pipe pointer
NULL the dangling pipe reference while clearing watch_queue.
If not done, a reference to a freed pipe remains in the watch_queue,
as this function is called before freeing a pipe in free_pipe_info()
(see line 834 of fs/pipe.c).
The sole use of wqueue->defunct is for checking if the watch queue has
been cleared, but wqueue->pipe is also NULLed while clearing.
Thus, wqueue->defunct is superfluous, as wqueue->pipe can be checked
for NULL. Hence, the former can be removed.
Tested with keyutils testsuite.
Cc: stable@vger.kernel.org # 6.1
Signed-off-by: Siddh Raman Pant <code@siddh.me>
Acked-by: David Howells <dhowells@redhat.com>
Message-Id: <20230605143616.640517-1-code@siddh.me>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions