lkml.org 
[lkml]   [2021]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix slab-out-of-bounds Write in betop_probe
Hi "F.A.Sulaiman",

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on hid/for-next]
[also build test WARNING on v5.14-rc6 next-20210816]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/F-A-Sulaiman/fix-slab-out-of-bounds-Write-in-betop_probe/20210817-041818
base: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
config: x86_64-randconfig-r023-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
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
# https://github.com/0day-ci/linux/commit/8fc4d7961e182bc2992bee548fa3c33b628ffadd
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review F-A-Sulaiman/fix-slab-out-of-bounds-Write-in-betop_probe/20210817-041818
git checkout 8fc4d7961e182bc2992bee548fa3c33b628ffadd
# 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@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/hid/hid-betopff.c:118:20: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
struct input_dev *dev;
^
1 warning generated.


vim +/dev +118 drivers/hid/hid-betopff.c

114
115 static int betop_probe(struct hid_device *hdev, const struct hid_device_id *id)
116 {
117 struct hid_input *hidinput;
> 118 struct input_dev *dev;
119 int ret;
120
121 if (list_empty(&hdev->inputs)) {
122 hid_err(hdev, "no inputs found\n");
123 return -ENODEV;
124 }
125
126 hidinput = list_first_entry(&hdev->inputs, struct hid_input, list);
127 dev = hidinput->input;
128
129 if (id->driver_data)
130 hdev->quirks |= HID_QUIRK_MULTI_INPUT;
131
132 ret = hid_parse(hdev);
133 if (ret) {
134 hid_err(hdev, "parse failed\n");
135 goto err;
136 }
137
138 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF);
139 if (ret) {
140 hid_err(hdev, "hw start failed\n");
141 goto err;
142 }
143
144 betopff_init(hdev);
145
146 return 0;
147 err:
148 return ret;
149 }
150

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-08-17 02:08    [W:0.111 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site