linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Jiri Slaby <jirislaby@kernel.org>,
	cgel.zte@gmail.com, Andrew Morton <akpm@linux-foundation.org>
Cc: stable@vger.kernel.org, arnd@arndb.de, chi.minghao@zte.com.cn,
	dbueso@suse.de, linux-kernel@vger.kernel.org,
	rdunlap@infradead.org, shakeelb@google.com,
	unixbhaskar@gmail.com, vvs@virtuozzo.com, zealci@zte.com.cn
Subject: Re: [PATCH v2] ipc/sem: do not sleep with a spin lock held
Date: Mon, 3 Jan 2022 18:17:58 +0100	[thread overview]
Message-ID: <2cfe35d4-3220-dd60-88d3-90b86eb5084a@colorfullife.com> (raw)
In-Reply-To: <97e94a27-6f9f-1a21-cf3e-11d97f74cbd8@kernel.org>

Hi Jiri,

On 1/3/22 10:27, Jiri Slaby wrote:
> On 23. 12. 21, 4:12, cgel.zte@gmail.com wrote:
>> From: Minghao Chi <chi.minghao@zte.com.cn>
>>
>> We can't call kvfree() with a spin lock held, so defer it.
>
> Sorry, defer what?
>
First drop the spinlock, then call kvfree().


> There are attempts to fix kvfree instead, not sure which of these 
> approaches (fix kvfree or its callers) won in the end?
>
Exactly. We have three options - but noone volunteered yet to decide:

- change ipc/sem.c [minimal change]

- change kvfree() to use vfree_atomic() [would also fix other changes 
that did s/kfree/kvfree/]

- Modify the vma handling so that it becomes safe to call vfree() while 
holding a spinlock. [perfect approach, but I'm concerned about side effects]


--

     Manfred


  reply	other threads:[~2022-01-03 17:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22  8:10 [PATCH] ipc/sem: do not sleep with a spin lock held cgel.zte
2021-12-22 11:45 ` Manfred Spraul
2021-12-22 15:31   ` Vasily Averin
2021-12-22 15:50     ` Vasily Averin
2021-12-22 17:06       ` Manfred Spraul
2021-12-22 17:38         ` Vasily Averin
2021-12-22 19:08           ` Vasily Averin
2021-12-23  2:37   ` [PATCH v2] " cgel.zte
2021-12-23  2:56   ` cgel.zte
2021-12-23  3:12   ` cgel.zte
2022-01-03  9:27     ` Jiri Slaby
2022-01-03 17:17       ` Manfred Spraul [this message]
2022-01-04 18:20         ` Shakeel Butt
2022-01-04 18:20     ` Shakeel Butt
2022-01-04 20:18       ` Manfred Spraul

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=2cfe35d4-3220-dd60-88d3-90b86eb5084a@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=cgel.zte@gmail.com \
    --cc=chi.minghao@zte.com.cn \
    --cc=dbueso@suse.de \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=shakeelb@google.com \
    --cc=stable@vger.kernel.org \
    --cc=unixbhaskar@gmail.com \
    --cc=vvs@virtuozzo.com \
    --cc=zealci@zte.com.cn \
    /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;
as well as URLs for NNTP newsgroup(s).