drivers/firmware/arm_ffa/driver.c:290:11-15: ERROR: reference preceded by free on line 288 (fwd)
PATCH 5/6 drivers/firmware/arm_ffa/driver.c:290:11-15: ERROR: reference preceded by free on line 288 (fwd)
See lines 288 and 290.
julia
---------- Forwarded message ----------
Date: Tue, 25 May 2021 13:01:39 +0800
From: kernel test robot <[email protected]>
To: kbuild(a)lists.01.org
Cc: lkp(a)intel.com, Julia Lawall <[email protected]>
Subject: [skn:v5.13/ffa 5/6] drivers/firmware/arm_ffa/driver.c:290:11-15: ERROR:
reference preceded by free on line 288
CC: kbuild-all(a)lists.01.org
TO: Sudeep Holla <[email protected]>
CC: Jens Wiklander <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git v5.13/ffa head: 84cc1893ebd6f69bf72ff94ad32e57eb0ec9a1f0 commit: 437b70e4d6815e6bf719f5295014342d0b964ccb [5/6] firmware: arm_ffa: Setup in-kernel users of FFA partitions
:::::: branch date: 16 hours ago
:::::: commit date: 16 hours ago
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
cocci warnings: (new ones prefixed by >>)
Quoted 1 line
Quoted 1 line
drivers/firmware/arm_ffa/driver.c:290:11-15: ERROR: reference preceded by free on line 288
vim +290 drivers/firmware/arm_ffa/driver.c
437b70e4d6815e Sudeep Holla 2021-04-30 266
437b70e4d6815e Sudeep Holla 2021-04-30 267 /* buffer is allocated and caller must free the same if returned count > 0 */
437b70e4d6815e Sudeep Holla 2021-04-30 268 static int
437b70e4d6815e Sudeep Holla 2021-04-30 269 ffa_partition_probe(const uuid_t *uuid, struct ffa_partition_info **buffer)
437b70e4d6815e Sudeep Holla 2021-04-30 270 {
437b70e4d6815e Sudeep Holla 2021-04-30 271 int count;
437b70e4d6815e Sudeep Holla 2021-04-30 272 u32 uuid0_4[4];
437b70e4d6815e Sudeep Holla 2021-04-30 273 struct ffa_partition_info *pbuf;
437b70e4d6815e Sudeep Holla 2021-04-30 274
437b70e4d6815e Sudeep Holla 2021-04-30 275 export_uuid((u8 *)uuid0_4, uuid);
437b70e4d6815e Sudeep Holla 2021-04-30 276 count = __ffa_partition_info_get(uuid0_4[0], uuid0_4[1], uuid0_4[2],
437b70e4d6815e Sudeep Holla 2021-04-30 277 uuid0_4[3], NULL, 0);
437b70e4d6815e Sudeep Holla 2021-04-30 278 if (count <= 0)
437b70e4d6815e Sudeep Holla 2021-04-30 279 return count;
437b70e4d6815e Sudeep Holla 2021-04-30 280
437b70e4d6815e Sudeep Holla 2021-04-30 281 pbuf = kcalloc(count, sizeof(*pbuf), GFP_KERNEL);
437b70e4d6815e Sudeep Holla 2021-04-30 282 if (!pbuf)
437b70e4d6815e Sudeep Holla 2021-04-30 283 return -ENOMEM;
437b70e4d6815e Sudeep Holla 2021-04-30 284
437b70e4d6815e Sudeep Holla 2021-04-30 285 count = __ffa_partition_info_get(uuid0_4[0], uuid0_4[1], uuid0_4[2],
437b70e4d6815e Sudeep Holla 2021-04-30 286 uuid0_4[3], pbuf, count);
437b70e4d6815e Sudeep Holla 2021-04-30 287 if (count <= 0)
437b70e4d6815e Sudeep Holla 2021-04-30 @288 kfree(pbuf);
437b70e4d6815e Sudeep Holla 2021-04-30 289
437b70e4d6815e Sudeep Holla 2021-04-30 @290 *buffer = pbuf;
437b70e4d6815e Sudeep Holla 2021-04-30 291 return count;
437b70e4d6815e Sudeep Holla 2021-04-30 292 }437b70e4d6815e Sudeep Holla 2021-04-30 293
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
Quoted 2 lines · Julia Lawall
See lines 288 and 290.
Thanks for the report, can I fold it in as the patches are not yet officially queued as I am waiting for arm64 maintainer to share a branch to pull. Just queued to -next to catch such errors early.
--
Regards,
Sudeep
Quoted 6 lines · Sudeep Holla
Quoted 2 lines · Julia Lawall
See lines 288 and 290.
Thanks for the report, can I fold it in as the patches are not yet officially queued as I am waiting for arm64 maintainer to share a branch to pull.
Sure, whatever is convenient.
julia
Quoted 6 lines
Just queued to -next to catch such errors early.
--
Regards,
Sudeep