Thread (12 messages) 12 messages, 4 authors, 2021-03-10

Re: [PATCH 1/9] memcg: accounting for allocations called with disabled BH

From: Vasily Averin <hidden>
Date: 2021-03-10 09:26:49
Also in: linux-mm

On 3/9/21 11:39 PM, Roman Gushchin wrote:
On Tue, Mar 09, 2021 at 11:03:48AM +0300, Vasily Averin wrote:
quoted
in_interrupt() check in memcg_kmem_bypass() is incorrect because
it does not allow to account memory allocation called from task context
with disabled BH, i.e. inside spin_lock_bh()/spin_unlock_bh() sections

Signed-off-by: Vasily Averin <redacted>
Good catch!

It looks like the bug was there for years: in_interrupt() was there since
the commit 7ae1e1d0f8ac ("memcg: kmem controller infrastructure") from 2012!
So I guess there is no point for a stable fix, but it's definitely nice to
have it fixed.
I did not noticed that this problem affect existing allocation,
I just found that it blocked accounting of "struct fib6_node" in __ip6_ins_rt() 
added in my current patch set. So I do not think it should went to stable@.

Thank you,
	Vasily Averin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help