summaryrefslogtreecommitdiffstats
path: root/net/unix
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 18:43:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 18:43:28 +0000
commitd8e7eb3d28f5c8e73b91bc95b2f01391711b1839 (patch)
tree4281b77072f7954692604850497ede427d7f9e22 /net/unix
parentAdding debian version 6.7.7-1. (diff)
downloadlinux-d8e7eb3d28f5c8e73b91bc95b2f01391711b1839.tar.xz
linux-d8e7eb3d28f5c8e73b91bc95b2f01391711b1839.zip
Merging upstream version 6.7.9.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'net/unix')
-rw-r--r--net/unix/garbage.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/net/unix/garbage.c b/net/unix/garbage.c
index 8f63f0b4bf..2a81880dac 100644
--- a/net/unix/garbage.c
+++ b/net/unix/garbage.c
@@ -284,9 +284,17 @@ void unix_gc(void)
* which are creating the cycle(s).
*/
skb_queue_head_init(&hitlist);
- list_for_each_entry(u, &gc_candidates, link)
+ list_for_each_entry(u, &gc_candidates, link) {
scan_children(&u->sk, inc_inflight, &hitlist);
+#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
+ if (u->oob_skb) {
+ kfree_skb(u->oob_skb);
+ u->oob_skb = NULL;
+ }
+#endif
+ }
+
/* not_cycle_list contains those sockets which do not make up a
* cycle. Restore these to the inflight list.
*/
@@ -314,17 +322,6 @@ void unix_gc(void)
/* Here we are. Hitlist is filled. Die. */
__skb_queue_purge(&hitlist);
-#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
- list_for_each_entry_safe(u, next, &gc_candidates, link) {
- struct sk_buff *skb = u->oob_skb;
-
- if (skb) {
- u->oob_skb = NULL;
- kfree_skb(skb);
- }
- }
-#endif
-
spin_lock(&unix_gc_lock);
/* There could be io_uring registered files, just push them back to