Roman Gushchin
5689666aa1
bpf: allocate local storage buffers using GFP_ATOMIC
...
[ Upstream commit 569a933b03
]
Naresh reported an issue with the non-atomic memory allocation of
cgroup local storage buffers:
[ 73.047526] BUG: sleeping function called from invalid context at
/srv/oe/build/tmp-rpb-glibc/work-shared/intel-corei7-64/kernel-source/mm/slab.h:421
[ 73.060915] in_atomic(): 1, irqs_disabled(): 0, pid: 3157, name: test_cgroup_sto
[ 73.068342] INFO: lockdep is turned off.
[ 73.072293] CPU: 2 PID: 3157 Comm: test_cgroup_sto Not tainted
4.20.0-rc2-next-20181113 #1
[ 73.080548] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS
2.0b 07/27/2017
[ 73.088018] Call Trace:
[ 73.090463] dump_stack+0x70/0xa5
[ 73.093783] ___might_sleep+0x152/0x240
[ 73.097619] __might_sleep+0x4a/0x80
[ 73.101191] __kmalloc_node+0x1cf/0x2f0
[ 73.105031] ? cgroup_storage_update_elem+0x46/0x90
[ 73.109909] cgroup_storage_update_elem+0x46/0x90
cgroup_storage_update_elem() (as well as other update map update
callbacks) is called with disabled preemption, so GFP_ATOMIC
allocation should be used: e.g. alloc_htab_elem() in hashtab.c.
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org >
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org >
Signed-off-by: Roman Gushchin <guro@fb.com >
Cc: Alexei Starovoitov <ast@kernel.org >
Cc: Daniel Borkmann <daniel@iogearbox.net >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2018-12-17 09:24:33 +01:00
..
2018-08-13 00:52:45 +02:00
2017-04-17 13:55:52 -04:00
2017-09-01 09:57:39 -07:00
2018-09-12 22:00:23 +02:00
2018-08-07 14:29:55 +02:00
2018-08-16 21:55:32 +02:00
2018-08-17 15:56:23 -07:00
2018-08-17 15:56:23 -07:00
2018-03-23 17:38:57 +01:00
2018-03-23 17:38:57 +01:00
2018-08-23 18:45:47 +02:00
2018-08-03 00:47:32 +02:00
2018-08-13 00:52:45 +02:00
2018-12-17 09:24:33 +01:00
2018-08-13 00:52:45 +02:00
2018-08-11 01:58:46 +02:00
2018-08-03 00:47:32 +02:00
2017-06-29 13:13:25 -04:00
2018-07-18 15:10:34 +02:00
2017-11-15 19:46:32 +09:00
2016-03-08 15:28:31 -05:00
2018-08-11 01:58:46 +02:00
2018-09-22 02:46:41 +02:00
2018-08-13 00:52:45 +02:00
2018-11-27 16:13:03 +01:00
2018-04-29 08:45:53 -07:00
2018-11-13 11:08:28 -08:00
2018-10-11 10:19:01 +02:00