diff options
author | Kuniyuki Iwashima <[email protected]> | 2024-05-29 07:46:48 -0700 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-06-01 16:28:55 -0700 |
commit | b5c089880723b2c18531c40e445235bd646a51d1 (patch) | |
tree | 694e5b292cb60aa58b3f43039ae161b92f812774 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 750ed239bfd61562d8ef7e5619d8c0035f4ecfa1 (diff) |
af_unix: Remove dead code in unix_stream_read_generic().
When splice() support was added in commit 2b514574f7e8 ("net:
af_unix: implement splice for stream af_unix sockets"), we had
to release unix_sk(sk)->readlock (current iolock) before calling
splice_to_pipe().
Due to the unlock, commit 73ed5d25dce0 ("af-unix: fix use-after-free
with concurrent readers while splicing") added a safeguard in
unix_stream_read_generic(); we had to bump the skb refcount before
calling ->recv_actor() and then check if the skb was consumed by a
concurrent reader.
However, the pipe side locking was refactored, and since commit
25869262ef7a ("skb_splice_bits(): get rid of callback"), we can
call splice_to_pipe() without releasing unix_sk(sk)->iolock.
Now, the skb is always alive after the ->recv_actor() callback,
so let's remove the unnecessary drop_skb logic.
This is mostly the revert of commit 73ed5d25dce0 ("af-unix: fix
use-after-free with concurrent readers while splicing").
Signed-off-by: Kuniyuki Iwashima <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions