All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Steven Rostedt <rostedt@goodmis.org>, eadavis@sina.com
Cc: syzbot+dfcc5f4da15868df7d4d@syzkaller.appspotmail.com,
	akpm@linux-foundation.org, keescook@chromium.org,
	linux-kernel@vger.kernel.org, mark.rutland@arm.com,
	mhiramat@kernel.org, syzkaller-bugs@googlegroups.com,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v2] mm: slab, with same context require fs_reclaim lock
Date: Wed, 12 Oct 2022 14:30:15 +0200	[thread overview]
Message-ID: <e2b567bd-5a1d-d19a-a45b-6f48d2292dd3@suse.cz> (raw)
In-Reply-To: <20221012072319.1a678100@rorschach.local.home>

On 10/12/22 13:23, Steven Rostedt wrote:
> On Tue, 27 Sep 2022 15:11:34 +0800
> eadavis@sina.com wrote:
>> --- a/mm/slab.c
>> +++ b/mm/slab.c
>> @@ -3275,15 +3275,19 @@ slab_alloc(struct kmem_cache *cachep, struct list_lru *lru, gfp_t flags,
>>  	bool init = false;
>>  
>>  	flags &= gfp_allowed_mask;
>> +	local_irq_save(save_flags);
> 
> Please do not do this. Open coding interrupt disabling due to locking
> issues is not the solution. You need to make the locks themselves
> disable interrupts if need be. This breaks PREEMPT_RT, and creates a
> "big kernel lock" situation where there's random interrupts being
> disabled for no apparent reason.
> 
> -- Steve

And FWIW the problem was in the calling context of io_uring, not slab code
itself in the first place, see:

https://lore.kernel.org/all/20220929135627.ykivmdks2w5vzrwg@quack3/

      reply	other threads:[~2022-10-12 12:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 16:33 [syzbot] inconsistent lock state in kmem_cache_alloc syzbot
2022-09-29 13:24 ` Vlastimil Babka
2022-09-29 13:40   ` Sebastian Andrzej Siewior
2022-09-29 13:56   ` Jan Kara
2022-09-29 14:07     ` Jens Axboe
2022-09-29 16:54       ` Jens Axboe
2022-09-30 13:51         ` Jan Kara
     [not found] ` <20220927071134.1674904-1-eadavis@sina.com>
2022-10-12 11:23   ` [PATCH v2] mm: slab, with same context require fs_reclaim lock Steven Rostedt
2022-10-12 12:30     ` Vlastimil Babka [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=e2b567bd-5a1d-d19a-a45b-6f48d2292dd3@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=eadavis@sina.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=syzbot+dfcc5f4da15868df7d4d@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    /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.