CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: Cong Wang <xiyou.wangc...@gmail.com>
tree: https://github.com/congwang/linux.git sch_bpf head: d7144f4291a2882e698a6d9d83f7e614d97be9c8 commit: c27f47230e7935f94ef17b29accb49defa7be17e [2/4] bpf: introduce skb map :::::: branch date: 16 hours ago :::::: commit date: 16 hours ago config: s390-randconfig-m031-20220524 (https://download.01.org/0day-ci/archive/20220527/202205271602.qz21hhnl-...@intel.com/config) compiler: s390-linux-gcc (GCC) 11.3.0 If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <l...@intel.com> Reported-by: Dan Carpenter <dan.carpen...@oracle.com> New smatch warnings: net/core/skb_map.c:261 ____bpf_skb_map_pop() warn: returning freed memory 'skb' Old smatch warnings: net/core/skb_map.c:175 skb_map_get_next_key() error: we previously assumed 'key' could be null (see line 170) vim +/skb +261 net/core/skb_map.c c27f47230e7935 Cong Wang 2020-11-08 244 c27f47230e7935 Cong Wang 2020-11-08 245 BPF_CALL_2(bpf_skb_map_pop, struct bpf_map *, map, u64, key) c27f47230e7935 Cong Wang 2020-11-08 246 { c27f47230e7935 Cong Wang 2020-11-08 247 struct bpf_skb_map *rb = bpf_skb_map(map); c27f47230e7935 Cong Wang 2020-11-08 248 struct sk_buff *skb; c27f47230e7935 Cong Wang 2020-11-08 249 unsigned long flags; c27f47230e7935 Cong Wang 2020-11-08 250 c27f47230e7935 Cong Wang 2020-11-08 251 raw_spin_lock_irqsave(&rb->lock, flags); c27f47230e7935 Cong Wang 2020-11-08 252 skb = skb_map_lookup_elem(map, &key); c27f47230e7935 Cong Wang 2020-11-08 253 if (!skb) { c27f47230e7935 Cong Wang 2020-11-08 254 raw_spin_unlock_irqrestore(&rb->lock, flags); c27f47230e7935 Cong Wang 2020-11-08 255 return (unsigned long)NULL; c27f47230e7935 Cong Wang 2020-11-08 256 } c27f47230e7935 Cong Wang 2020-11-08 257 rb_erase(&skb->rbnode, &rb->root); c27f47230e7935 Cong Wang 2020-11-08 258 raw_spin_unlock_irqrestore(&rb->lock, flags); c27f47230e7935 Cong Wang 2020-11-08 259 consume_skb(skb); c27f47230e7935 Cong Wang 2020-11-08 260 atomic_dec(&rb->count); c27f47230e7935 Cong Wang 2020-11-08 @261 return (unsigned long)skb; c27f47230e7935 Cong Wang 2020-11-08 262 } c27f47230e7935 Cong Wang 2020-11-08 263 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org