Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	stable@vger.kernel.org, vegard.nossum@oracle.com,
	syzbot+54cbbfb4db9145d26fc2@syzkaller.appspotmail.com
Subject: Re: [PATCH 6.12.y 11/15] io_uring/msg_ring: ensure io_kiocb freeing is deferred for RCU
Date: Sat, 6 Sep 2025 20:37:30 +0200	[thread overview]
Message-ID: <2025090604-sectional-preheated-e5c7@gregkh> (raw)
In-Reply-To: <8a53f86b-9d5a-47f9-a4f0-74a9c5c0fc78@oracle.com>

On Sat, Sep 06, 2025 at 07:47:00AM +0530, Harshit Mogalapalli wrote:
> Hi Jens,
> 
> 
> On 06/09/25 01:28, Jens Axboe wrote:
> > On 9/5/25 5:04 AM, Harshit Mogalapalli wrote:
> > > diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h
> > > index 5ce332fc6ff5..3b27d9bcf298 100644
> > > --- a/include/linux/io_uring_types.h
> > > +++ b/include/linux/io_uring_types.h
> > > @@ -648,6 +648,8 @@ struct io_kiocb {
> > >   	struct io_task_work		io_task_work;
> > >   	/* for polled requests, i.e. IORING_OP_POLL_ADD and async armed poll */
> > >   	struct hlist_node		hash_node;
> > > +	/* for private io_kiocb freeing */
> > > +	struct rcu_head		rcu_head;
> > >   	/* internal polling, see IORING_FEAT_FAST_POLL */
> > >   	struct async_poll		*apoll;
> > >   	/* opcode allocated if it needs to store data for async defer */
> > 
> 
> Thanks a lot for looking into this one.
> 
> > This should go into a union with hash_node, rather than bloat the
> > struct. That's how it was done upstream, not sure why this one is
> > different?
> > 
> 
> We don't have commit: 01ee194d1aba ("io_uring: add support for hybrid
> IOPOLL") which moves hlist_node	to a union along with iopoll_start,
> 
>         struct io_task_work             io_task_work;
> -       /* for polled requests, i.e. IORING_OP_POLL_ADD and async armed poll
> */
> -       struct hlist_node               hash_node;
> +       union {
> +               /*
> +                * for polled requests, i.e. IORING_OP_POLL_ADD and async
> armed
> +                * poll
> +                */
> +               struct hlist_node       hash_node;
> +               /* For IOPOLL setup queues, with hybrid polling */
> +               u64                     iopoll_start;
> +       };
> 
> 
> given that we don't need the above commit, and partly because I didn't
> realize about the bloat benefit we would get I added rcu_head without a
> union. Thanks a lot for correctly. I will check the size bloat next time
> when I run into this situation.
> 
> Thank you very much for correcting this and providing a backport.
> 
> Greg/Sasha: Should I send a v2 of this series with my backport swapped with
> the one from Jens ?

I just took Jens's patch.  So I'll drop your patch from this series too.

thanks,

greg k-h

  reply	other threads:[~2025-09-06 18:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 11:03 [PATCH 6.12.y 00/15] Backport few CVE fixes to 6.12.y Harshit Mogalapalli
2025-09-05 11:03 ` [PATCH 6.12.y 01/15] fs/fhandle.c: fix a race in call of has_locked_children() Harshit Mogalapalli
2025-09-05 11:03 ` [PATCH 6.12.y 02/15] net: dsa: add hook to determine whether EEE is supported Harshit Mogalapalli
2025-09-05 11:03 ` [PATCH 6.12.y 03/15] net: dsa: provide implementation of .support_eee() Harshit Mogalapalli
2025-09-05 11:03 ` [PATCH 6.12.y 04/15] net: dsa: b53/bcm_sf2: implement .support_eee() method Harshit Mogalapalli
2025-09-05 11:03 ` [PATCH 6.12.y 05/15] net: dsa: b53: do not enable EEE on bcm63xx Harshit Mogalapalli
2025-09-05 11:03 ` [PATCH 6.12.y 06/15] md/raid1,raid10: don't ignore IO flags Harshit Mogalapalli
2025-09-05 11:03 ` [PATCH 6.12.y 07/15] md/raid1,raid10: don't handle IO error for REQ_RAHEAD and REQ_NOWAIT Harshit Mogalapalli
2025-09-05 11:03 ` [PATCH 6.12.y 08/15] md/raid1,raid10: strip REQ_NOWAIT from member bios Harshit Mogalapalli
2025-09-05 11:04 ` [PATCH 6.12.y 09/15] ext4: define ext4_journal_destroy wrapper Harshit Mogalapalli
2025-09-05 11:04 ` [PATCH 6.12.y 10/15] ext4: avoid journaling sb update on error if journal is destroying Harshit Mogalapalli
2025-09-05 11:04 ` [PATCH 6.12.y 11/15] io_uring/msg_ring: ensure io_kiocb freeing is deferred for RCU Harshit Mogalapalli
2025-09-05 19:58   ` Jens Axboe
2025-09-06  1:23     ` Jens Axboe
2025-09-06 18:36       ` Greg KH
2025-09-06 20:47         ` Jens Axboe
2025-09-06 21:04           ` Greg KH
2025-09-06 22:39             ` Jens Axboe
2025-09-06  2:17     ` Harshit Mogalapalli
2025-09-06 18:37       ` Greg KH [this message]
2025-09-06 20:45         ` Jens Axboe
2025-09-05 11:04 ` [PATCH 6.12.y 12/15] wifi: ath11k: update channel list in reg notifier instead reg worker Harshit Mogalapalli
2025-09-05 11:04 ` [PATCH 6.12.y 13/15] wifi: ath11k: update channel list in worker when wait flag is set Harshit Mogalapalli
2025-09-05 11:04 ` [PATCH 6.12.y 14/15] net: fix NULL pointer dereference in l3mdev_l3_rcv Harshit Mogalapalli
2025-09-05 11:04 ` [PATCH 6.12.y 15/15] md/md-bitmap: fix wrong bitmap_limit for clustermd when write sb Harshit Mogalapalli
2025-09-07  7:40 ` [PATCH 6.12.y 00/15] Backport few CVE fixes to 6.12.y Greg KH
2025-09-07  8:20   ` Harshit Mogalapalli

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=2025090604-sectional-preheated-e5c7@gregkh \
    --to=greg@kroah.com \
    --cc=axboe@kernel.dk \
    --cc=harshit.m.mogalapalli@oracle.com \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+54cbbfb4db9145d26fc2@syzkaller.appspotmail.com \
    --cc=vegard.nossum@oracle.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