]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: use __GFP_COMP while allocating page
authorTushar Dave <tushar.n.dave@oracle.com>
Wed, 12 Sep 2018 20:15:29 +0000 (22:15 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 12 Sep 2018 21:47:28 +0000 (23:47 +0200)
commite36f5a4f51f083eb28c523a423d0d53bf4524534
tree05b7ab8eac84d394f4c9688a7e2ced12af525b25
parente02bdbad29cb30d0920bc0e486d88eee275d2d6f
bpf: use __GFP_COMP while allocating page

Helper bpg_msg_pull_data() can allocate multiple pages while
linearizing multiple scatterlist elements into one shared page.
However, if the shared page has size > PAGE_SIZE, using
copy_page_to_iter() causes below warning.

e.g.
[ 6367.019832] WARNING: CPU: 2 PID: 7410 at lib/iov_iter.c:825
page_copy_sane.part.8+0x0/0x8

To avoid above warning, use __GFP_COMP while allocating multiple
contiguous pages.

Fixes: d345afaf638d ("bpf: sk_msg program helper bpf_sk_msg_pull_data")
Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
net/core/filter.c