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]
Date:   Tue, 9 Jun 2020 10:52:43 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...ia.fr>
To:     Jérôme Pouiller <jerome.pouiller@...abs.com>
cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, kbuild-all@...ts.01.org
Subject: drivers/staging/wfx/hif_tx.c:53:2-8: preceding lock on line 38
 (fwd)

Hello,

Does the lock taken on line 38 need to be released on line 53?

julia

---------- Forwarded message ----------
Date: Tue, 9 Jun 2020 16:19:41 +0800
From: kernel test robot <lkp@...el.com>
To: kbuild@...ts.01.org
Cc: lkp@...el.com, Julia Lawall <julia.lawall@...6.fr>
Subject: drivers/staging/wfx/hif_tx.c:53:2-8: preceding lock on line 38

CC: kbuild-all@...ts.01.org
CC: linux-kernel@...r.kernel.org
TO: "Jérôme Pouiller" <jerome.pouiller@...abs.com>
CC: "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   abfbb29297c27e3f101f348dc9e467b0fe70f919
commit: 4f8b7fabb15df3658564a98971fc67029be1815d staging: wfx: allow to send commands to chip
date:   8 months ago
:::::: branch date: 12 hours ago
:::::: commit date: 8 months ago
config: i386-randconfig-c024-20200607 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.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>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/staging/wfx/hif_tx.c:53:2-8: preceding lock on line 38

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4f8b7fabb15df3658564a98971fc67029be1815d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 4f8b7fabb15df3658564a98971fc67029be1815d
vim +53 drivers/staging/wfx/hif_tx.c

4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  23
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  24  int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, void *reply, size_t reply_len, bool async)
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  25  {
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  26  	const char *mib_name = "";
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  27  	const char *mib_sep = "";
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  28  	int cmd = request->id;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  29  	int vif = request->interface;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  30  	int ret;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  31
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  32  	WARN(wdev->hif_cmd.buf_recv && wdev->hif_cmd.async, "API usage error");
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  33
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  34  	// Do not wait for any reply if chip is frozen
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  35  	if (wdev->chip_frozen)
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  36  		return -ETIMEDOUT;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  37
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 @38  	mutex_lock(&wdev->hif_cmd.lock);
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  39  	WARN(wdev->hif_cmd.buf_send, "data locking error");
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  40
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  41  	// Note: call to complete() below has an implicit memory barrier that
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  42  	// hopefully protect buf_send
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  43  	wdev->hif_cmd.buf_send = request;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  44  	wdev->hif_cmd.buf_recv = reply;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  45  	wdev->hif_cmd.len_recv = reply_len;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  46  	wdev->hif_cmd.async = async;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  47  	complete(&wdev->hif_cmd.ready);
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  48
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  49  	wfx_bh_request_tx(wdev);
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  50
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  51  	// NOTE: no timeout is catched async is enabled
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  52  	if (async)
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 @53  		return 0;

---
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" (28311 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ