lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2108281306110.10588@hadrien>
Date:   Sat, 28 Aug 2021 13:07:15 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...ia.fr>
To:     Vadim Pasternak <vadimp@...dia.com>
cc:     Jiri Pirko <jiri@...dia.com>, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [jpirko-mlxsw:linecards 110/112] drivers/platform/mellanox/mlxreg-lc.c:485:1-7:
 preceding lock on line 469 (fwd)

This looks suspicious.  Maybe the fail label shoudl be before line 482 to
include the unlock?

julia

---------- Forwarded message ----------
Date: Thu, 26 Aug 2021 05:55:03 +0800
From: kernel test robot <lkp@...el.com>
To: kbuild@...ts.01.org
Cc: lkp@...el.com, Julia Lawall <julia.lawall@...6.fr>
Subject: [jpirko-mlxsw:linecards 110/112]
    drivers/platform/mellanox/mlxreg-lc.c:485:1-7: preceding lock on line 469

CC: kbuild-all@...ts.01.org
CC: linux-kernel@...r.kernel.org
TO: Vadim Pasternak <vadimp@...dia.com>
CC: Jiri Pirko <jiri@...dia.com>

tree:   https://github.com/jpirko/linux_mlxsw linecards
head:   a37df1af1f3e6a47a9718298d5e50b842f79b2d2
commit: fbdba1b20b39b5e3b79d6df5b44cc5be3a0ddc0c [110/112] TMP: platform/mellanox
:::::: branch date: 9 hours ago
:::::: commit date: 12 hours ago
config: xtensa-randconfig-c023-20210825 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Julia Lawall <julia.lawall@...6.fr>


cocci warnings: (new ones prefixed by >>)
>> drivers/platform/mellanox/mlxreg-lc.c:485:1-7: preceding lock on line 469

vim +485 drivers/platform/mellanox/mlxreg-lc.c

b386a25dac45ae Vadim Pasternak 2021-03-25  463
b386a25dac45ae Vadim Pasternak 2021-03-25  464  static int mlxreg_lc_power_on_off(struct mlxreg_lc *mlxreg_lc, u8 action)
b386a25dac45ae Vadim Pasternak 2021-03-25  465  {
b386a25dac45ae Vadim Pasternak 2021-03-25  466  	u32 regval;
b386a25dac45ae Vadim Pasternak 2021-03-25  467  	int err;
b386a25dac45ae Vadim Pasternak 2021-03-25  468
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 @469  	mutex_lock(&mlxreg_lc->lock);
fbdba1b20b39b5 Vadim Pasternak 2021-07-01  470
b386a25dac45ae Vadim Pasternak 2021-03-25  471  	err = regmap_read(mlxreg_lc->par_regmap, mlxreg_lc->data->reg_pwr, &regval);
b386a25dac45ae Vadim Pasternak 2021-03-25  472  	if (err)
fbdba1b20b39b5 Vadim Pasternak 2021-07-01  473  		goto regmap_read_fail;
b386a25dac45ae Vadim Pasternak 2021-03-25  474
b386a25dac45ae Vadim Pasternak 2021-03-25  475  	if (action)
fbdba1b20b39b5 Vadim Pasternak 2021-07-01  476  		regval |= BIT(mlxreg_lc->data->slot - 1);
b386a25dac45ae Vadim Pasternak 2021-03-25  477  	else
fbdba1b20b39b5 Vadim Pasternak 2021-07-01  478  		regval &= ~BIT(mlxreg_lc->data->slot - 1);
fbdba1b20b39b5 Vadim Pasternak 2021-07-01  479
fbdba1b20b39b5 Vadim Pasternak 2021-07-01  480  	err = regmap_write(mlxreg_lc->par_regmap, mlxreg_lc->data->reg_pwr, regval);
b386a25dac45ae Vadim Pasternak 2021-03-25  481
fbdba1b20b39b5 Vadim Pasternak 2021-07-01  482  	mutex_unlock(&mlxreg_lc->lock);
fbdba1b20b39b5 Vadim Pasternak 2021-07-01  483
fbdba1b20b39b5 Vadim Pasternak 2021-07-01  484  regmap_read_fail:
fbdba1b20b39b5 Vadim Pasternak 2021-07-01 @485  	return err;
b386a25dac45ae Vadim Pasternak 2021-03-25  486  }
b386a25dac45ae Vadim Pasternak 2021-03-25  487

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (32878 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ