mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandra Winter <wintera@linux.ibm.com>
To: Haoran Wang <haoranwangsec@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iucv: fix lockless sk_for_each in afiucv_netdev_event
Date: Wed, 21 Oct 2026 10:10:30 +0200	[thread overview]
Message-ID: <22744f49-b45a-458c-828d-bc19a5f06aa9@linux.ibm.com> (raw)
In-Reply-To: <179241612354.5916.12881323209252769976@whr>



On 19.10.26 15:22, Haoran Wang wrote:
> afiucv_netdev_event() traverses iucv_sk_list.head with sk_for_each()
> without holding iucv_sk_list.lock:
> 
>     /* net/iucv/af_iucv.c:2218 */
>     sk_for_each(sk, &iucv_sk_list.head) {
>         iucv = iucv_sk(sk);
>         if ((iucv->hs_dev == event_dev) &&
>             (sk->sk_state == IUCV_CONNECTED)) {
>             if (event == NETDEV_GOING_DOWN)
>                 iucv_send_ctrl(sk, AF_IUCV_FLAG_FIN);
>             sk->sk_state = IUCV_DISCONN;
>             sk->sk_state_change(sk);
>         }
>     }
> 

Hello Haoran Wang,
thank you for your contribution.
I think the issue you are fixing is the same that Nagamani already sent a fix for [1].

We are currently working on hardening the basic socket locking mechanism in af_iucv [2],
and I asked Nagamani to hold off until that work is done.

So I think this issue is already being worked on (please correct me, if I'm wrong).
Feel free to comment on Nagamani's proposal, as you have an understanding of the issue.

Kind regards
Alexandra


Link: https://lore.kernel.org/netdev/20260803182053.2355882-1-nagamani@linux.ibm.com/ [1]
Link: https://lore.kernel.org/netdev/20260724222917.134769-1-hexlabsecurity@proton.me/ [2]


      parent reply	other threads:[~2026-10-21  8:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 13:22 Haoran Wang
2026-10-19 13:23 ` netdev-bot+sinfo
2026-10-21  8:10 ` Alexandra Winter [this message]

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=22744f49-b45a-458c-828d-bc19a5f06aa9@linux.ibm.com \
    --to=wintera@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gor@linux.ibm.com \
    --cc=haoranwangsec@gmail.com \
    --cc=hca@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=svens@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®