netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Hou Tao <houtao@huaweicloud.com>,
	netdev@vger.kernel.org, Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Davide Caratti <dcaratti@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev, bpf@vger.kernel.org, houtao1@huawei.com
Subject: Re: [PATCH] net/sched: unregister root_lock_key in the error path of qdisc_alloc()
Date: Fri, 17 May 2024 13:49:41 +0800	[thread overview]
Message-ID: <202405171311.SyRzzQjC-lkp@intel.com> (raw)
In-Reply-To: <20240516133035.1050113-1-houtao@huaweicloud.com>

Hi Hou,

kernel test robot noticed the following build errors:

[auto build test ERROR on v6.9]
[cannot apply to net/main net-next/main linus/master next-20240517]
[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/Hou-Tao/net-sched-unregister-root_lock_key-in-the-error-path-of-qdisc_alloc/20240516-213538
base:   v6.9
patch link:    https://lore.kernel.org/r/20240516133035.1050113-1-houtao%40huaweicloud.com
patch subject: [PATCH] net/sched: unregister root_lock_key in the error path of qdisc_alloc()
config: openrisc-defconfig (https://download.01.org/0day-ci/archive/20240517/202405171311.SyRzzQjC-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240517/202405171311.SyRzzQjC-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/202405171311.SyRzzQjC-lkp@intel.com/

All errors (new ones prefixed by >>):

   net/sched/sch_generic.c: In function 'qdisc_alloc':
>> net/sched/sch_generic.c:983:36: error: 'struct Qdisc' has no member named 'root_lock_key'
     983 |         lockdep_unregister_key(&sch->root_lock_key);
         |                                    ^~


vim +983 net/sched/sch_generic.c

   924	
   925	struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
   926				  const struct Qdisc_ops *ops,
   927				  struct netlink_ext_ack *extack)
   928	{
   929		struct Qdisc *sch;
   930		unsigned int size = sizeof(*sch) + ops->priv_size;
   931		int err = -ENOBUFS;
   932		struct net_device *dev;
   933	
   934		if (!dev_queue) {
   935			NL_SET_ERR_MSG(extack, "No device queue given");
   936			err = -EINVAL;
   937			goto errout;
   938		}
   939	
   940		dev = dev_queue->dev;
   941		sch = kzalloc_node(size, GFP_KERNEL, netdev_queue_numa_node_read(dev_queue));
   942	
   943		if (!sch)
   944			goto errout;
   945		__skb_queue_head_init(&sch->gso_skb);
   946		__skb_queue_head_init(&sch->skb_bad_txq);
   947		gnet_stats_basic_sync_init(&sch->bstats);
   948		spin_lock_init(&sch->q.lock);
   949	
   950		if (ops->static_flags & TCQ_F_CPUSTATS) {
   951			sch->cpu_bstats =
   952				netdev_alloc_pcpu_stats(struct gnet_stats_basic_sync);
   953			if (!sch->cpu_bstats)
   954				goto errout1;
   955	
   956			sch->cpu_qstats = alloc_percpu(struct gnet_stats_queue);
   957			if (!sch->cpu_qstats) {
   958				free_percpu(sch->cpu_bstats);
   959				goto errout1;
   960			}
   961		}
   962	
   963		spin_lock_init(&sch->busylock);
   964		lockdep_set_class(&sch->busylock,
   965				  dev->qdisc_tx_busylock ?: &qdisc_tx_busylock);
   966	
   967		/* seqlock has the same scope of busylock, for NOLOCK qdisc */
   968		spin_lock_init(&sch->seqlock);
   969		lockdep_set_class(&sch->seqlock,
   970				  dev->qdisc_tx_busylock ?: &qdisc_tx_busylock);
   971	
   972		sch->ops = ops;
   973		sch->flags = ops->static_flags;
   974		sch->enqueue = ops->enqueue;
   975		sch->dequeue = ops->dequeue;
   976		sch->dev_queue = dev_queue;
   977		sch->owner = -1;
   978		netdev_hold(dev, &sch->dev_tracker, GFP_KERNEL);
   979		refcount_set(&sch->refcnt, 1);
   980	
   981		return sch;
   982	errout1:
 > 983		lockdep_unregister_key(&sch->root_lock_key);
   984		kfree(sch);
   985	errout:
   986		return ERR_PTR(err);
   987	}
   988	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-05-17  5:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16 13:30 [PATCH] net/sched: unregister root_lock_key in the error path of qdisc_alloc() Hou Tao
2024-05-16 13:33 ` Hou Tao
2024-05-16 13:45   ` Davide Caratti
2024-05-17  1:17     ` Hou Tao
2024-05-17  5:49 ` kernel test robot [this message]
2024-05-17  6:20 ` kernel test robot

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=202405171311.SyRzzQjC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=edumazet@google.com \
    --cc=houtao1@huawei.com \
    --cc=houtao@huaweicloud.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=xiyou.wangcong@gmail.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;
as well as URLs for NNTP newsgroup(s).