From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
thellstrom@vmware.com, willy@infradead.org
Cc: linux-mm@kvack.org, hch@lst.de, jszhang@marvell.com,
joelaf@google.com, chris@chris-wilson.co.uk, joaodias@google.com,
tglx@linutronix.de, hpa@zytor.com, mingo@elte.hu,
dri-devel@lists.freedesktop.org, airlied@linux.ie,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH] mm: Remove pointless might_sleep() in remove_vm_area().
Date: Mon, 27 Mar 2017 18:02:52 +0300 [thread overview]
Message-ID: <4a4f546c-4a92-1cea-14b6-bf3a8725b0e8@virtuozzo.com> (raw)
In-Reply-To: <201703272329.AIE32232.LtVSOOOFFQJFHM@I-love.SAKURA.ne.jp>
On 03/27/2017 05:29 PM, Tetsuo Handa wrote:
> Thomas Hellstrom wrote:
>> So to summarize. Yes, the drm callers can be fixed up, but IMO requiring
>> vfree() to be non-atomic is IMO not a good idea if avoidable.
>
> I agree.
>
> I don't know about drm code. But I can find AppArmor code doing
> kvfree() from dfa_free() from aa_dfa_free_kref() from kref_put() from
> aa_put_dfa() from aa_free_profile() which says
>
> * If the profile was referenced from a task context, free_profile() will
> * be called from an rcu callback routine, so we must not sleep here.
>
It's safe to call vfree() from rcu callback as in any other interrupt context.
Commits you listed bellow didn't change anything in that respect.
They made impossible to call vfree() under stuff like preempt_disable()/spin_lock()
> which means that below changes broke things without properly auditing
> all vfree()/kvfree() users.
>
> commit bf22e37a641327e3 ("mm: add vfree_atomic()")
> commit 0f110a9b956c1678 ("kernel/fork: use vfree_atomic() to free thread stack")
> commit 8d5341a6260a59cf ("x86/ldt: use vfree_atomic() to free ldt entries")
> commit 5803ed292e63a1bf ("mm: mark all calls into the vmalloc subsystem as potentially sleeping")
> commit f9e09977671b618a ("mm: turn vmap_purge_lock into a mutex")
> commit 763b218ddfaf5676 ("mm: add preempt points into __purge_vmap_area_lazy()")
>
> Since above commits did not take appropriate proceedure for changing
> non-blocking API to blocking API, we must fix vfree() part for 4.10 and 4.11.
>
> Updated patch is at
> http://lkml.kernel.org/r/201703271916.FBI69340.SQFtOFVJHOLOMF@I-love.SAKURA.ne.jp .
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-03-27 15:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 10:53 Tetsuo Handa
2017-03-24 12:22 ` Andrey Ryabinin
2017-03-24 12:40 ` Tetsuo Handa
2017-03-24 15:05 ` Andrey Ryabinin
2017-03-24 16:17 ` Matthew Wilcox
2017-03-27 13:26 ` Andrey Ryabinin
2017-03-27 14:06 ` Matthew Wilcox
2017-03-27 14:10 ` Thomas Hellstrom
2017-03-27 14:29 ` Tetsuo Handa
2017-03-27 15:02 ` Andrey Ryabinin [this message]
2017-03-28 10:07 ` Tetsuo Handa
2017-03-24 22:47 ` Tetsuo Handa
2017-03-27 10:16 ` Tetsuo Handa
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=4a4f546c-4a92-1cea-14b6-bf3a8725b0e8@virtuozzo.com \
--to=aryabinin@virtuozzo.com \
--cc=airlied@linux.ie \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=hch@lst.de \
--cc=hpa@zytor.com \
--cc=joaodias@google.com \
--cc=joelaf@google.com \
--cc=jszhang@marvell.com \
--cc=linux-mm@kvack.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=tglx@linutronix.de \
--cc=thellstrom@vmware.com \
--cc=willy@infradead.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