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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202112090340.ohuHwTLx-lkp@intel.com>
Date:   Thu, 9 Dec 2021 16:30:03 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org, Sai Teja Aluvala <quic_saluvala@...cinc.com>,
        marcel@...tmann.org, johan.hedberg@...il.com
Cc:     lkp@...el.com, kbuild-all@...ts.01.org, mka@...omium.org,
        linux-kernel@...r.kernel.org, linux-bluetooth@...r.kernel.org,
        quic_hemantg@...cinc.com, linux-arm-msm@...r.kernel.org,
        quic_bgodavar@...cinc.com, rjliao@...eaurora.org,
        hbandi@...eaurora.org
Subject: [kbuild] Re: [PATCH] Bluetooth: btqca: sequential validation

Hi Sai,

url:    https://github.com/0day-ci/linux/commits/Sai-Teja-Aluvala/Bluetooth-btqca-sequential-validation/20211208-162834 
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git  master
config: arc-randconfig-m031-20211207 (https://download.01.org/0day-ci/archive/20211209/202112090340.ohuHwTLx-lkp@intel.com/config )
compiler: arceb-elf-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: Dan Carpenter <dan.carpenter@...cle.com>

New smatch warnings:
drivers/bluetooth/btqca.c:180 qca_send_patch_config_cmd() error: use kfree_skb() here instead of kfree(skb)

vim +180 drivers/bluetooth/btqca.c

1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  144  int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  145  {
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  146  	struct sk_buff *skb;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  147  	int err = 0;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  148  	u8 cmd[5] = {EDL_PATCH_CONFIG_CMD, 0x01, 0, 0, 0};
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  149  	u8 rlen = 0x02;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  150  	struct edl_event_hdr *edl;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  151  	u8 rtype = EDL_PATCH_CONFIG_CMD;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  152  
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  153  	bt_dev_dbg(hdev, "QCA Patch config");
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  154  
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  155  	skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CONFIG_CMD_LEN,
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  156  			cmd, HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  157  	if (IS_ERR(skb)) {
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  158  		err = PTR_ERR(skb);
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  159  		bt_dev_err(hdev, "Sending QCA Patch config failed (%d)", err);
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  160  		return err;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  161  	}
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  162  	if (skb->len != rlen) {
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  163  		bt_dev_err(hdev, "QCA Patch config cmd size mismatch len %d", skb->len);
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  164  		err = -EILSEQ;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  165  		goto out;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  166  	}
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  167  	edl = (struct edl_event_hdr *)(skb->data);
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  168  	if (!edl) {
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  169  		bt_dev_err(hdev, "QCA Patch config with no header");
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  170  		err = -EILSEQ;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  171  		goto out;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  172  	}
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  173  	if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != rtype) {
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  174  		bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  175  		 edl->rtype);
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  176  		err = -EIO;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  177  		goto out;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  178  	}
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  179  out:
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08 @180  	kfree(skb);
                                                                ^^^^^^^^^^
kfree_skb(skb);

1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  181  	if (err)
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  182  		bt_dev_err(hdev, "QCA Patch config cmd failed (%d)", err);
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  183  
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  184  	return err;
1d58d86c5374c4 Sai Teja Aluvala               2021-12-08  185  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org 
_______________________________________________
kbuild mailing list -- kbuild@...ts.01.org
To unsubscribe send an email to kbuild-leave@...ts.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ