From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30CD41F4CAF for ; Sat, 6 Sep 2025 18:37:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757183857; cv=none; b=Jxcx/U9nBa2WqHt+2kH3KXmbsZDEU7Td4+/WV53xWeV0NvTBODJ1Iyoho1z0Ox5Ps5ovHEcHxh+0xSJiURWj7zAuzKR0O9vI+X24eg+kHKZL+RPepSNaQd3IsK0Qqo2v1cXM+YhQ9W7OpUutrCet6ovOZR0V2hGU6JbLH6DionI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757183857; c=relaxed/simple; bh=6fbcV2GxPzbAzWoxLMNgEkwVW4jRf1UCiSc+GZ9tqvg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NAoY7t94j0yjLVxu5uJ1skieiiE1lJtOmYlG4yqkSwwL7t324EMst8AqVacdHSC4DwE3u617qTxDcrvBOp5IYS4q7diRmFVIF05o95hqXccntld3SgtpxWGh+6Fr/757/ImozygLxpN0HpR1esJdwVHYRRl8k+9Dui2vNq0ImQQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com; spf=pass smtp.mailfrom=kroah.com; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b=ZFveB0o3; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=TEgnNUAP; arc=none smtp.client-ip=202.12.124.148 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kroah.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="ZFveB0o3"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="TEgnNUAP" Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id D0FC01D00226; Sat, 6 Sep 2025 14:37:32 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Sat, 06 Sep 2025 14:37:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1757183852; x=1757270252; bh=sAuOcKfJzb ZgMj0ltm/N/UkH8l3N5gjmJcg5CA6fJYo=; b=ZFveB0o34gyLjwdRwgsy943Az/ fFCV06PcyOTpN6akZXhR5Se9hQabM+FaorXPcdRYe1QjODv9bTIRCqnPWR438OXp hAryBDMX9Ty3hz9IqqQlzjJN6hgFwELa0+cNNz1M1Y5BlVo4jXrg4A4wVBKB8mX/ 43rC6uKBqb2MnPZrEicTnkCeov8/OYJfpmpDHuRWaXtKbJ4SdDYvU9VUR5635ap/ yReUDI4T/b7wskwpJIek4dAQ3x7vsjYHeMoDzC5qt4Js9C6NRjZPqU6wgffD7yEg gfb9M9PV8DfWIpG/FoQKaJi0IfdlMbShubG+LAQGr+3P5Z0faYRHT1QDB1Hg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1757183852; x=1757270252; bh=sAuOcKfJzbZgMj0ltm/N/UkH8l3N5gjmJcg 5CA6fJYo=; b=TEgnNUAPgqtCnKmh+MRpitSc9je26TgHpJSMXDVi2/9oUD2F9YO k4+SibsRvMsYrxwznSCaCstPtveH0/zbuWHqDzUT3eAqup/s/hd594LPPgPosdbx dYEBfIODATtU6XNvDGD2q+m1068wS5gj20yW5wuQapEwJqgDiqz1h7EHtRLCNi1I FBqsZnDWZzGMVcx+Ke/ql/WMbjbU9NCbfkw1k1TonFsgleSoNmBqIoJUqCGhMxfF ZgOEAsOcBAzGQDaZDdjgZb4ZeIcR99w/bwg2Ba2mhpH+NXV18Ozr9lfZYMdvtao+ HVfdU8EBF9fF+xpEZ9V75zvl0MAekijz5wg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduvdehtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcumffj uceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeehgedvvedvle ejuefgtdduudfhkeeltdeihfevjeekjeeuhfdtueefhffgheekteenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtg homhdpnhgspghrtghpthhtohepuddtpdhmohguvgepshhmthhpohhuthdprhgtphhtthho pehhrghrshhhihhtrdhmrdhmohhgrghlrghprghllhhisehorhgrtghlvgdrtghomhdprh gtphhtthhopegrgigsohgvsehkvghrnhgvlhdrughkpdhrtghpthhtohepshhtrggslhgv sehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepvhgvghgrrhgurdhnohhssh humhesohhrrggtlhgvrdgtohhmpdhrtghpthhtohepshihiigsohhtodehgegtsggsfhgs gegusgeludegheguvdeifhgtvdesshihiihkrghllhgvrhdrrghpphhsphhothhmrghilh drtghomh X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 6 Sep 2025 14:37:31 -0400 (EDT) Date: Sat, 6 Sep 2025 20:37:30 +0200 From: Greg KH To: Harshit Mogalapalli Cc: Jens Axboe , 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 Message-ID: <2025090604-sectional-preheated-e5c7@gregkh> References: <20250905110406.3021567-1-harshit.m.mogalapalli@oracle.com> <20250905110406.3021567-12-harshit.m.mogalapalli@oracle.com> <8a53f86b-9d5a-47f9-a4f0-74a9c5c0fc78@oracle.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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