Skip to content

Commit 3173f62

Browse files
committed
sit: use __GFP_NOWARN for user controlled allocation
jira LE-1907 Rebuild_History Non-Buildable kernel-3.10.0-862.el7 commit-author WANG Cong <xiyou.wangcong@gmail.com> commit 0ccc22f The memory allocation size is controlled by user-space, if it is too large just fail silently and return NULL, not to mention there is a fallback allocation later. Reported-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Tested-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 0ccc22f) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 60b9b6b commit 3173f62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv6/sit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ static int ipip6_tunnel_get_prl(struct ip_tunnel *t,
304304
* we try harder to allocate.
305305
*/
306306
kp = (cmax <= 1 || capable(CAP_NET_ADMIN)) ?
307-
kcalloc(cmax, sizeof(*kp), GFP_KERNEL) :
307+
kcalloc(cmax, sizeof(*kp), GFP_KERNEL | __GFP_NOWARN) :
308308
NULL;
309309

310310
rcu_read_lock();

0 commit comments

Comments
 (0)