CC: [email protected]
BCC: [email protected]
CC: [email protected]
TO: Brian Gix <[email protected]>
CC: Luiz Augusto von Dentz <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   330f4c53d3c2d8b11d86ec03a964b86dc81452f5
commit: 275f3f64870245b06188f24bdf917e55a813d294 Bluetooth: Fix not checking 
MGMT cmd pending queue
date:   8 days ago
:::::: branch date: 16 hours ago
:::::: commit date: 8 days ago
config: openrisc-randconfig-m031-20220309 
(https://download.01.org/0day-ci/archive/20220309/[email protected]/config)
compiler: or1k-linux-gcc (GCC) 11.2.0

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

New smatch warnings:
net/bluetooth/mgmt.c:1585 mgmt_set_connectable_complete() warn: variable 
dereferenced before check 'cmd' (see line 1577)

Old smatch warnings:
net/bluetooth/mgmt.c:4990 read_local_oob_data_complete() error: 'skb' 
dereferencing possible ERR_PTR()
net/bluetooth/mgmt.c:5004 read_local_oob_data_complete() error: 'skb' 
dereferencing possible ERR_PTR()
net/bluetooth/mgmt.c:7534 read_local_oob_ext_data_complete() error: 'skb' 
dereferencing possible ERR_PTR()
net/bluetooth/mgmt.c:7550 read_local_oob_ext_data_complete() error: 'skb' 
dereferencing possible ERR_PTR()
net/bluetooth/mgmt.c:8248 add_ext_adv_params_complete() warn: variable 
dereferenced before check 'cmd' (see line 8207)

vim +/cmd +1585 net/bluetooth/mgmt.c

73f22f62388795 Johan Hedberg          2010-12-29  1561  
f056a65783cce9 Luiz Augusto von Dentz 2021-11-11  1562  static void 
mgmt_set_connectable_complete(struct hci_dev *hdev, void *data,
f056a65783cce9 Luiz Augusto von Dentz 2021-11-11  1563                          
                  int err)
2b76f4539c6a41 Johan Hedberg          2013-03-15  1564  {
f056a65783cce9 Luiz Augusto von Dentz 2021-11-11  1565          struct 
mgmt_pending_cmd *cmd = data;
2b76f4539c6a41 Johan Hedberg          2013-03-15  1566  
f056a65783cce9 Luiz Augusto von Dentz 2021-11-11  1567          
bt_dev_dbg(hdev, "err %d", err);
2b76f4539c6a41 Johan Hedberg          2013-03-15  1568  
275f3f64870245 Brian Gix              2022-03-01  1569          /* Make sure 
cmd still outstanding. */
275f3f64870245 Brian Gix              2022-03-01  1570          if (cmd != 
pending_find(MGMT_OP_SET_CONNECTABLE, hdev))
275f3f64870245 Brian Gix              2022-03-01  1571                  return;
275f3f64870245 Brian Gix              2022-03-01  1572  
2b76f4539c6a41 Johan Hedberg          2013-03-15  1573          
hci_dev_lock(hdev);
2b76f4539c6a41 Johan Hedberg          2013-03-15  1574  
f056a65783cce9 Luiz Augusto von Dentz 2021-11-11  1575          if (err) {
f056a65783cce9 Luiz Augusto von Dentz 2021-11-11  1576                  u8 
mgmt_err = mgmt_status(err);
a69e8375a134eb Johan Hedberg          2015-03-06 @1577                  
mgmt_cmd_status(cmd->sk, cmd->index, cmd->opcode, mgmt_err);
f056a65783cce9 Luiz Augusto von Dentz 2021-11-11  1578                  goto 
done;
37438c1f7f6d26 Johan Hedberg          2013-10-14  1579          }
37438c1f7f6d26 Johan Hedberg          2013-10-14  1580  
2b76f4539c6a41 Johan Hedberg          2013-03-15  1581          
send_settings_rsp(cmd->sk, MGMT_OP_SET_CONNECTABLE, hdev);
d7b856f9380d95 Johan Hedberg          2013-10-14  1582          
new_settings(hdev, cmd->sk);
d7b856f9380d95 Johan Hedberg          2013-10-14  1583  
f056a65783cce9 Luiz Augusto von Dentz 2021-11-11  1584  done:
275f3f64870245 Brian Gix              2022-03-01 @1585          if (cmd)
275f3f64870245 Brian Gix              2022-03-01  1586                  
mgmt_pending_remove(cmd);
275f3f64870245 Brian Gix              2022-03-01  1587  
2b76f4539c6a41 Johan Hedberg          2013-03-15  1588          
hci_dev_unlock(hdev);
2b76f4539c6a41 Johan Hedberg          2013-03-15  1589  }
2b76f4539c6a41 Johan Hedberg          2013-03-15  1590  

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

Reply via email to