From: kernel test robot <lkp@intel.com>
To: Sumitra Sharma <sumitraartsy@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Ira Weiny <ira.weiny@intel.com>,
Fabio <fmdefrancesco@gmail.com>, Deepak R Varma <drv@mailo.com>,
Sumitra Sharma <sumitraartsy@gmail.com>
Subject: Re: [PATCH v3] lib/test_bpf: Call page_address() on page acquired with GFP_KERNEL flag
Date: Fri, 23 Jun 2023 06:00:06 +0800 [thread overview]
Message-ID: <202306230559.hU5Aonpl-lkp@intel.com> (raw)
In-Reply-To: <20230622080729.GA426913@sumitra.com>
Hi Sumitra,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master linus/master v6.4-rc7 next-20230622]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Sumitra-Sharma/lib-test_bpf-Call-page_address-on-page-acquired-with-GFP_KERNEL-flag/20230622-160846
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20230622080729.GA426913%40sumitra.com
patch subject: [PATCH v3] lib/test_bpf: Call page_address() on page acquired with GFP_KERNEL flag
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230623/202306230559.hU5Aonpl-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230623/202306230559.hU5Aonpl-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306230559.hU5Aonpl-lkp@intel.com/
All warnings (new ones prefixed by >>):
lib/test_bpf.c: In function 'generate_test_data':
>> lib/test_bpf.c:14395:1: warning: label 'err_free_page' defined but not used [-Wunused-label]
14395 | err_free_page:
| ^~~~~~~~~~~~~
vim +/err_free_page +14395 lib/test_bpf.c
64a8946b447e41 Alexei Starovoitov 2014-05-08 14358
10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14359 static void *generate_test_data(struct bpf_test *test, int sub)
64a8946b447e41 Alexei Starovoitov 2014-05-08 14360 {
bac142acb90e95 Nicolas Schichan 2015-08-04 14361 struct sk_buff *skb;
bac142acb90e95 Nicolas Schichan 2015-08-04 14362 struct page *page;
bac142acb90e95 Nicolas Schichan 2015-08-04 14363
10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14364 if (test->aux & FLAG_NO_DATA)
10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14365 return NULL;
64a8946b447e41 Alexei Starovoitov 2014-05-08 14366
f516420f683d14 Xu Kuohai 2022-03-21 14367 if (test->aux & FLAG_LARGE_MEM)
f516420f683d14 Xu Kuohai 2022-03-21 14368 return kmalloc(test->test[sub].data_size, GFP_KERNEL);
f516420f683d14 Xu Kuohai 2022-03-21 14369
10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14370 /* Test case expects an skb, so populate one. Various
10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14371 * subtests generate skbs of different sizes based on
10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14372 * the same data.
10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14373 */
bac142acb90e95 Nicolas Schichan 2015-08-04 14374 skb = populate_skb(test->data, test->test[sub].data_size);
bac142acb90e95 Nicolas Schichan 2015-08-04 14375 if (!skb)
bac142acb90e95 Nicolas Schichan 2015-08-04 14376 return NULL;
bac142acb90e95 Nicolas Schichan 2015-08-04 14377
bac142acb90e95 Nicolas Schichan 2015-08-04 14378 if (test->aux & FLAG_SKB_FRAG) {
bac142acb90e95 Nicolas Schichan 2015-08-04 14379 /*
bac142acb90e95 Nicolas Schichan 2015-08-04 14380 * when the test requires a fragmented skb, add a
bac142acb90e95 Nicolas Schichan 2015-08-04 14381 * single fragment to the skb, filled with
bac142acb90e95 Nicolas Schichan 2015-08-04 14382 * test->frag_data.
bac142acb90e95 Nicolas Schichan 2015-08-04 14383 */
bac142acb90e95 Nicolas Schichan 2015-08-04 14384 page = alloc_page(GFP_KERNEL);
bac142acb90e95 Nicolas Schichan 2015-08-04 14385
bac142acb90e95 Nicolas Schichan 2015-08-04 14386 if (!page)
bac142acb90e95 Nicolas Schichan 2015-08-04 14387 goto err_kfree_skb;
bac142acb90e95 Nicolas Schichan 2015-08-04 14388
4a8b1daa0ee566 Sumitra Sharma 2023-06-22 14389 memcpy(page_address(page), test->frag_data, MAX_DATA);
bac142acb90e95 Nicolas Schichan 2015-08-04 14390 skb_add_rx_frag(skb, 0, page, 0, MAX_DATA, MAX_DATA);
bac142acb90e95 Nicolas Schichan 2015-08-04 14391 }
bac142acb90e95 Nicolas Schichan 2015-08-04 14392
bac142acb90e95 Nicolas Schichan 2015-08-04 14393 return skb;
bac142acb90e95 Nicolas Schichan 2015-08-04 14394
bac142acb90e95 Nicolas Schichan 2015-08-04 @14395 err_free_page:
bac142acb90e95 Nicolas Schichan 2015-08-04 14396 __free_page(page);
bac142acb90e95 Nicolas Schichan 2015-08-04 14397 err_kfree_skb:
bac142acb90e95 Nicolas Schichan 2015-08-04 14398 kfree_skb(skb);
bac142acb90e95 Nicolas Schichan 2015-08-04 14399 return NULL;
10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14400 }
10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14401
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-06-22 22:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-22 8:07 [PATCH v3] lib/test_bpf: Call page_address() on page acquired with GFP_KERNEL flag Sumitra Sharma
2023-06-22 22:00 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-06-22 7:52 Sumitra Sharma
2023-06-26 20:36 ` Ira Weiny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202306230559.hU5Aonpl-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=drv@mailo.com \
--cc=fmdefrancesco@gmail.com \
--cc=haoluo@google.com \
--cc=ira.weiny@intel.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=sumitraartsy@gmail.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox