tree:
https://github.com/0day-ci/linux/commits/UPDATE-20200930-013350/Anmol-Kar...
head: 25720ca76ab0618da4816346aac98b54cef759fd
commit: 25720ca76ab0618da4816346aac98b54cef759fd [1/1] net: bluetooth: Fix null pointer
dereference in hci_event_packet()
config: x86_64-randconfig-r031-20200930 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
bcd05599d0e53977a963799d6ee4f6e0bc21331b)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
#
https://github.com/0day-ci/linux/commit/25720ca76ab0618da4816346aac98b54c...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
UPDATE-20200930-013350/Anmol-Karn/net-bluetooth-Fix-null-pointer-dereference-in-hci_event_packet/20200910-123605
git checkout 25720ca76ab0618da4816346aac98b54cef759fd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> net/bluetooth/hci_event.c:4938:3: error: void function
'hci_phy_link_complete_evt' should not return a value [-Wreturn-type]
return 0;
^ ~
1 error generated.
vim +/hci_phy_link_complete_evt +4938 net/bluetooth/hci_event.c
4918
4919 static void hci_phy_link_complete_evt(struct hci_dev *hdev,
4920 struct sk_buff *skb)
4921 {
4922 struct hci_ev_phy_link_complete *ev = (void *) skb->data;
4923 struct hci_conn *hcon, *bredr_hcon;
4924
4925 BT_DBG("%s handle 0x%2.2x status 0x%2.2x", hdev->name,
ev->phy_handle,
4926 ev->status);
4927
4928 hci_dev_lock(hdev);
4929
4930 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle);
4931 if (!hcon) {
4932 hci_dev_unlock(hdev);
4933 return;
4934 }
4935
4936 if (!hcon->amp_mgr) {
4937 hci_dev_unlock(hdev);
4938 return 0;
4939 }
4940
4941 if (ev->status) {
4942 hci_conn_del(hcon);
4943 hci_dev_unlock(hdev);
4944 return;
4945 }
4946
4947 bredr_hcon = hcon->amp_mgr->l2cap_conn->hcon;
4948
4949 hcon->state = BT_CONNECTED;
4950 bacpy(&hcon->dst, &bredr_hcon->dst);
4951
4952 hci_conn_hold(hcon);
4953 hcon->disc_timeout = HCI_DISCONN_TIMEOUT;
4954 hci_conn_drop(hcon);
4955
4956 hci_debugfs_create_conn(hcon);
4957 hci_conn_add_sysfs(hcon);
4958
4959 amp_physical_cfm(bredr_hcon, hcon);
4960
4961 hci_dev_unlock(hdev);
4962 }
4963
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org