]> git.hungrycats.org Git - linux/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:18:15 +0000 (09:18 +0200)
commit4dc76c13f297228e1c70eaf412093061335ee3a2
treed28adf28e9437645816cb9a082de26f887c00db1
parentd2440a0b06727aa19b2d9d937ff4754ec2f469be
bpf: use __GFP_COMP while allocating page

[ Upstream commit 4c3d795cb012a378855543a775408fba1ccff6f2 ]

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: 015632bb30da ("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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/filter.c