2020-07-29 16:40:25

by Julia Lawall

[permalink] [raw]
Subject: drivers/net/ethernet/pensando/ionic/ionic_lif.c:2004:3-9: preceding lock on line 1998 (fwd)

Hello,

It looks like an unlock may be wanted on line 2004.

julia

---------- Forwarded message ----------
Date: Thu, 30 Jul 2020 00:08:47 +0800
From: kernel test robot <[email protected]>
To: [email protected]
Cc: [email protected], Julia Lawall <[email protected]>
Subject: drivers/net/ethernet/pensando/ionic/ionic_lif.c:2004:3-9: preceding
lock on line 1998

CC: [email protected]
CC: [email protected]
TO: Shannon Nelson <[email protected]>

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6ba1b005ffc388c2aeaddae20da29e4810dea298
commit: 0925e9db4dc86daf666d9a3d53c7db14ac6d5d00 ionic: use mutex to protect queue operations
date: 9 days ago
:::::: branch date: 21 hours ago
:::::: commit date: 9 days ago
config: powerpc-randconfig-c004-20200728 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Julia Lawall <[email protected]>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/pensando/ionic/ionic_lif.c:2004:3-9: preceding lock on line 1998

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0925e9db4dc86daf666d9a3d53c7db14ac6d5d00
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 0925e9db4dc86daf666d9a3d53c7db14ac6d5d00
vim +2004 drivers/net/ethernet/pensando/ionic/ionic_lif.c

beead698b1736df Shannon Nelson 2019-09-03 1992
086c18f2452d002 Shannon Nelson 2020-07-07 1993 int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg)
beead698b1736df Shannon Nelson 2019-09-03 1994 {
beead698b1736df Shannon Nelson 2019-09-03 1995 bool running;
beead698b1736df Shannon Nelson 2019-09-03 1996 int err = 0;
beead698b1736df Shannon Nelson 2019-09-03 1997
0925e9db4dc86da Shannon Nelson 2020-07-20 @1998 mutex_lock(&lif->queue_lock);
beead698b1736df Shannon Nelson 2019-09-03 1999 running = netif_running(lif->netdev);
b59eabd23ee53e8 Shannon Nelson 2020-06-18 2000 if (running) {
b59eabd23ee53e8 Shannon Nelson 2020-06-18 2001 netif_device_detach(lif->netdev);
beead698b1736df Shannon Nelson 2019-09-03 2002 err = ionic_stop(lif->netdev);
086c18f2452d002 Shannon Nelson 2020-07-07 2003 if (err)
0925e9db4dc86da Shannon Nelson 2020-07-20 @2004 return err;
b59eabd23ee53e8 Shannon Nelson 2020-06-18 2005 }
086c18f2452d002 Shannon Nelson 2020-07-07 2006
086c18f2452d002 Shannon Nelson 2020-07-07 2007 if (cb)
086c18f2452d002 Shannon Nelson 2020-07-07 2008 cb(lif, arg);
086c18f2452d002 Shannon Nelson 2020-07-07 2009
086c18f2452d002 Shannon Nelson 2020-07-07 2010 if (running) {
086c18f2452d002 Shannon Nelson 2020-07-07 2011 err = ionic_open(lif->netdev);
b59eabd23ee53e8 Shannon Nelson 2020-06-18 2012 netif_device_attach(lif->netdev);
b59eabd23ee53e8 Shannon Nelson 2020-06-18 2013 }
0925e9db4dc86da Shannon Nelson 2020-07-20 2014 mutex_unlock(&lif->queue_lock);
beead698b1736df Shannon Nelson 2019-09-03 2015
beead698b1736df Shannon Nelson 2019-09-03 2016 return err;
beead698b1736df Shannon Nelson 2019-09-03 2017 }
beead698b1736df Shannon Nelson 2019-09-03 2018

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
.config.gz (34.87 kB)

2020-07-29 16:48:43

by Shannon Nelson

[permalink] [raw]
Subject: Re: drivers/net/ethernet/pensando/ionic/ionic_lif.c:2004:3-9: preceding lock on line 1998 (fwd)

On 7/29/20 9:37 AM, Julia Lawall wrote:
> Hello,
>
> It looks like an unlock may be wanted on line 2004.
>
> julia

Thanks for catching that, Julia.? I'll follow up shortly.

sln

>
> ---------- Forwarded message ----------
> Date: Thu, 30 Jul 2020 00:08:47 +0800
> From: kernel test robot <[email protected]>
> To: [email protected]
> Cc: [email protected], Julia Lawall <[email protected]>
> Subject: drivers/net/ethernet/pensando/ionic/ionic_lif.c:2004:3-9: preceding
> lock on line 1998
>
> CC: [email protected]
> CC: [email protected]
> TO: Shannon Nelson <[email protected]>
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 6ba1b005ffc388c2aeaddae20da29e4810dea298
> commit: 0925e9db4dc86daf666d9a3d53c7db14ac6d5d00 ionic: use mutex to protect queue operations
> date: 9 days ago
> :::::: branch date: 21 hours ago
> :::::: commit date: 9 days ago
> config: powerpc-randconfig-c004-20200728 (attached as .config)
> compiler: powerpc64-linux-gcc (GCC) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <[email protected]>
> Reported-by: Julia Lawall <[email protected]>
>
>
> coccinelle warnings: (new ones prefixed by >>)
>
>>> drivers/net/ethernet/pensando/ionic/ionic_lif.c:2004:3-9: preceding lock on line 1998
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0925e9db4dc86daf666d9a3d53c7db14ac6d5d00
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git remote update linus
> git checkout 0925e9db4dc86daf666d9a3d53c7db14ac6d5d00
> vim +2004 drivers/net/ethernet/pensando/ionic/ionic_lif.c
>
> beead698b1736df Shannon Nelson 2019-09-03 1992
> 086c18f2452d002 Shannon Nelson 2020-07-07 1993 int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg)
> beead698b1736df Shannon Nelson 2019-09-03 1994 {
> beead698b1736df Shannon Nelson 2019-09-03 1995 bool running;
> beead698b1736df Shannon Nelson 2019-09-03 1996 int err = 0;
> beead698b1736df Shannon Nelson 2019-09-03 1997
> 0925e9db4dc86da Shannon Nelson 2020-07-20 @1998 mutex_lock(&lif->queue_lock);
> beead698b1736df Shannon Nelson 2019-09-03 1999 running = netif_running(lif->netdev);
> b59eabd23ee53e8 Shannon Nelson 2020-06-18 2000 if (running) {
> b59eabd23ee53e8 Shannon Nelson 2020-06-18 2001 netif_device_detach(lif->netdev);
> beead698b1736df Shannon Nelson 2019-09-03 2002 err = ionic_stop(lif->netdev);
> 086c18f2452d002 Shannon Nelson 2020-07-07 2003 if (err)
> 0925e9db4dc86da Shannon Nelson 2020-07-20 @2004 return err;
> b59eabd23ee53e8 Shannon Nelson 2020-06-18 2005 }
> 086c18f2452d002 Shannon Nelson 2020-07-07 2006
> 086c18f2452d002 Shannon Nelson 2020-07-07 2007 if (cb)
> 086c18f2452d002 Shannon Nelson 2020-07-07 2008 cb(lif, arg);
> 086c18f2452d002 Shannon Nelson 2020-07-07 2009
> 086c18f2452d002 Shannon Nelson 2020-07-07 2010 if (running) {
> 086c18f2452d002 Shannon Nelson 2020-07-07 2011 err = ionic_open(lif->netdev);
> b59eabd23ee53e8 Shannon Nelson 2020-06-18 2012 netif_device_attach(lif->netdev);
> b59eabd23ee53e8 Shannon Nelson 2020-06-18 2013 }
> 0925e9db4dc86da Shannon Nelson 2020-07-20 2014 mutex_unlock(&lif->queue_lock);
> beead698b1736df Shannon Nelson 2019-09-03 2015
> beead698b1736df Shannon Nelson 2019-09-03 2016 return err;
> beead698b1736df Shannon Nelson 2019-09-03 2017 }
> beead698b1736df Shannon Nelson 2019-09-03 2018
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/[email protected]