linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "Sokolowski, Jan" <jan.sokolowski@intel.com>
Cc: "Christian König" <christian.koenig@amd.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [RFC PATCH 1/1] idr: do not create idr if new id would be outside given range
Date: Fri, 28 Nov 2025 17:50:42 +0000	[thread overview]
Message-ID: <aSng8hKuttOWQuds@casper.infradead.org> (raw)
In-Reply-To: <IA4PR11MB92511BAEF257742C82ED590199DCA@IA4PR11MB9251.namprd11.prod.outlook.com>

On Fri, Nov 28, 2025 at 04:47:17PM +0000, Sokolowski, Jan wrote:
> > No.  You didn't co-develop anything.  You reported the bug, badly.
> > 
> And I've sent a potential patch on how it should've been fixed. That should count for something, right?

Literally everything about that patch was wrong.  If I'd used any of it,
you'd have a point, but the entire approach was wrong.

You _can't_allow the allocation to succeed and then undo it.  There might
be an RCU-protected reader which would see the intermediate state.
And that's an inconsistency we guarantee can't happen; an RCU reader
can see the state before the lock, the state after the lock.  It must
not see a state that never happened.

If you'd written a test case, I'd happily add a co-developed-by tag.
But you didn't do that either.


      reply	other threads:[~2025-11-28 17:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27  9:27 [RFC PATCH 0/1] IDR fix for potential id mismatch Jan Sokolowski
2025-11-27  9:27 ` [RFC PATCH 1/1] idr: do not create idr if new id would be outside given range Jan Sokolowski
2025-11-27 13:38   ` Matthew Wilcox
2025-11-27 13:54   ` Matthew Wilcox
2025-11-27 14:03     ` Christian König
2025-11-27 14:11       ` Matthew Wilcox
2025-11-27 14:55         ` Matthew Wilcox
2025-11-27 15:02           ` Christian König
2025-11-28  9:03           ` Sokolowski, Jan
2025-11-28 15:52             ` Matthew Wilcox
2025-11-28 16:47               ` Sokolowski, Jan
2025-11-28 17:50                 ` Matthew Wilcox [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=aSng8hKuttOWQuds@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=christian.koenig@amd.com \
    --cc=jan.sokolowski@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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