From: Ali Ahmet Memis <ali@iusegentoo.com>
To: xiexinet@gmail.com
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
shuah@kernel.org, lukma@denx.de, m-karicheri2@ti.com,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net 2/3] net: hsr: clone before updating path and LAN IDs in tagged frames
Date: Sat, 1 Aug 2026 03:29:44 +0300 [thread overview]
Message-ID: <20260801002944.241301-1-ali@iusegentoo.com> (raw)
In-Reply-To: <20260728143604.26-3-xiexinet@gmail.com>
Clone first, privatize with skb_cow(), reacquire the header or trailer
pointer, then write the id: this removes the shared-buffer mutation for
both hsr_create_tagged_frame() and prp_create_tagged_frame(). The error
paths (clone failure, cow failure, NULL trailer) all free the clone and
return NULL, and adding kfree_skb() on the NULL-trailer path also closes
a leak. Using skb_cow() rather than skb_cow_head() is right since the PRP
RCT sits at the linear tail.
Reviewed-by: Ali Ahmet Memis <ali@iusegentoo.com>
next prev parent reply other threads:[~2026-08-01 0:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 14:36 [PATCH net 0/3] net: hsr: fix shared-skb mutations in the forwarding path Xin Xie
2026-07-28 14:36 ` [PATCH net 1/3] net: hsr: privatize interlink-bound skbs before address mutation Xin Xie
2026-08-01 0:29 ` Ali Ahmet Memis
2026-08-03 19:43 ` Jakub Kicinski
2026-08-03 21:05 ` Ali Ahmet Memis
2026-07-28 14:36 ` [PATCH net 2/3] net: hsr: clone before updating path and LAN IDs in tagged frames Xin Xie
2026-08-01 0:29 ` Ali Ahmet Memis [this message]
2026-07-28 14:36 ` [PATCH net 3/3] selftests: net: hsr: add shared-mutation regression test Xin Xie
2026-08-01 0:29 ` Ali Ahmet Memis
2026-08-01 0:29 ` [PATCH net 0/3] net: hsr: fix shared-skb mutations in the forwarding path Ali Ahmet Memis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260801002944.241301-1-ali@iusegentoo.com \
--to=ali@iusegentoo.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lukma@denx.de \
--cc=m-karicheri2@ti.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=xiexinet@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.