commit | 5b80dda22107dd2b988f5064b81e6f55549c11d3 | [log] [tgz] |
---|---|---|
author | Pavel Begunkov <[email protected]> | Sun Oct 16 23:31:26 2022 +0100 |
committer | COS Cherry Picker <[email protected]> | Fri Oct 21 10:13:15 2022 -0700 |
tree | 8730c0ee42c3df3ed6f33819f6073abcfe3935db | |
parent | f91c175e2862a9e655af7b095a2466531db8270b [diff] |
io_uring/af_unix: defer registered files gc to io_uring release [ upstream commit 0091bfc81741b8d3aeb3b7ab8636f911b2de6e80 ] Instead of putting io_uring's registered files in unix_gc() we want it to be done by io_uring itself. The trick here is to consider io_uring registered files for cycle detection but not actually putting them down. Because io_uring can't register other ring instances, this will remove all refs to the ring file triggering the ->release path and clean up with io_ring_ctx_free(). Cc: [email protected] Fixes: 6b06314c47e1 ("io_uring: add file set registration") Reported-and-tested-by: David Bouman <[email protected]> Signed-off-by: Pavel Begunkov <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> [axboe: add kerneldoc comment to skb, fold in skb leak fix] Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> BUG=b/254721281 TEST=presubmit RELEASE_NOTE=Fixed CVE-2022-2602 in the Linux kernel. cos-patch: security-high Change-Id: I627aa666fe0f4686202b8a4f4bfec26e131c3134 Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/37850 Reviewed-by: Oleksandr Tymoshenko <[email protected]> Main-Branch-Verified: Cusky Presubmit Bot <[email protected]> Tested-by: Cusky Presubmit Bot <[email protected]>