summaryrefslogtreecommitdiff
path: root/net/unix/garbage.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-03-18 20:30:46 +0300
committerMark Brown <broonie@kernel.org>2024-03-18 20:30:46 +0300
commit5bd249aec71d75f0088357e4aba27fde0610f823 (patch)
treeed63b21b48b711430492734564775758a39eb94c /net/unix/garbage.c
parent7397175cb7b48f7a3fc699083aa46f1234904c7e (diff)
parente8f897f4afef0031fe618a8e94127a0934896aba (diff)
downloadlinux-5bd249aec71d75f0088357e4aba27fde0610f823.tar.xz
spi: Merge up v6.8 release
An i.MX fix depends on other fixes that were sent to v6.8.
Diffstat (limited to 'net/unix/garbage.c')
-rw-r--r--net/unix/garbage.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/unix/garbage.c b/net/unix/garbage.c
index 2405f0f9af31..2a81880dac7b 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.
*/