Re: [PATCH 1/4] counter: Internalize sysfs interface code (fwd)

From: Julia Lawall
Date: Fri May 01 2020 - 12:27:13 EST


Hello,

Normally, the argument of kfree should not start with &.

julia

---------- Forwarded message ----------
Date: Fri, 1 May 2020 06:07:26 +0800
From: kbuild test robot <lkp@xxxxxxxxx>
To: kbuild@xxxxxxxxxxxx
Cc: lkp@xxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxx>
Subject: Re: [PATCH 1/4] counter: Internalize sysfs interface code

CC: kbuild-all@xxxxxxxxxxxx
In-Reply-To: <d84f0bb3258d1664e90da64d75f787829c50a9bd.1588176662.git.vilhelm.gray@xxxxxxxxx>
References: <d84f0bb3258d1664e90da64d75f787829c50a9bd.1588176662.git.vilhelm.gray@xxxxxxxxx>
TO: William Breathitt Gray <vilhelm.gray@xxxxxxxxx>
TO: jic23@xxxxxxxxxx
CC: kamel.bouhara@xxxxxxxxxxx
CC: gwendal@xxxxxxxxxxxx
CC: alexandre.belloni@xxxxxxxxxxx
CC: david@xxxxxxxxxxxxxx
CC: felipe.balbi@xxxxxxxxxxxxxxx
CC: fabien.lahoudere@xxxxxxxxxxxxx
CC: linux-iio@xxxxxxxxxxxxxxx
CC: linux-kernel@xxxxxxxxxxxxxxx
CC: linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Hi William,

I love your patch! Perhaps something to improve:

[auto build test WARNING on stm32/stm32-next]
[cannot apply to linus/master linux/master v5.7-rc3 next-20200430]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/William-Breathitt-Gray/Introduce-the-Counter-character-device-interface/20200430-051734
base: https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32.git stm32-next
:::::: branch date: 25 hours ago
:::::: commit date: 25 hours ago

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
Reported-by: Julia Lawall <julia.lawall@xxxxxxx>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/counter/counter-core.c:26:1-6: ERROR: invalid free of structure field

# https://github.com/0day-ci/linux/commit/bdd9a6aa70c61f16dacaf057f0ce70fc210b5ec9
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout bdd9a6aa70c61f16dacaf057f0ce70fc210b5ec9
vim +26 drivers/counter/counter-core.c

bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 20
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 21 static void counter_device_release(struct device *dev)
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 22 {
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 23 struct counter_device *const counter = dev_get_drvdata(dev);
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 24
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 25 counter_sysfs_free(counter);
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 @26 kfree(&counter->dev);
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 27 ida_simple_remove(&counter_ida, counter->id);
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 28 }
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 29

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx