* [ti:ti-linux-6.6.y-wip 16/18] drivers/remoteproc/remoteproc_cdev.c:167:6-16: ERROR: reference preceded by free on line 165
@ 2024-04-14 17:28 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-14 17:28 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: vigneshr@ti.com
CC: nm@ti.com
TO: Andrew Davis <afd@ti.com>
CC: Praneeth Bajjuri <praneeth@ti.com>
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-6.6.y-wip
head: 6b3bec4539bd706892be36c3b481b9aa7cbe27a8
commit: cde91a89becee656867b8c8a86e627241dc91449 [16/18] remoteproc: core: Add DMA-BUF attachment interface to cdev
:::::: branch date: 3 days ago
:::::: commit date: 2 weeks ago
config: x86_64-randconfig-101-20240414 (https://download.01.org/0day-ci/archive/20240415/202404150107.gJtdbKtX-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202404150107.gJtdbKtX-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/remoteproc/remoteproc_cdev.c:167:6-16: ERROR: reference preceded by free on line 165
vim +167 drivers/remoteproc/remoteproc_cdev.c
a4dac51a55b795 Andrew Davis 2024-02-21 150
a4dac51a55b795 Andrew Davis 2024-02-21 151 static int rproc_cdev_release(struct inode *inode, struct file *filp)
a4dac51a55b795 Andrew Davis 2024-02-21 152 {
a4dac51a55b795 Andrew Davis 2024-02-21 153 struct rproc_cdev *rproc_cdev = filp->private_data;
a4dac51a55b795 Andrew Davis 2024-02-21 154 struct rproc *rproc = rproc_cdev->rproc;
6e71d2b2a2b717 Mathieu Poirier 2021-03-12 155 int ret = 0;
6e71d2b2a2b717 Mathieu Poirier 2021-03-12 156
cde91a89becee6 Andrew Davis 2024-02-21 157 /* Release all buffers attached with this file */
cde91a89becee6 Andrew Davis 2024-02-21 158 struct rproc_cdev_attach *attach, *atmp;
cde91a89becee6 Andrew Davis 2024-02-21 159 list_for_each_entry_safe(attach, atmp, &rproc_cdev->attachments, node) {
cde91a89becee6 Andrew Davis 2024-02-21 160 rproc_detach_dmabuf(rproc, attach->dmabuf);
cde91a89becee6 Andrew Davis 2024-02-21 161 dma_buf_put(attach->dmabuf);
cde91a89becee6 Andrew Davis 2024-02-21 162 kfree(attach);
cde91a89becee6 Andrew Davis 2024-02-21 163 }
cde91a89becee6 Andrew Davis 2024-02-21 164 mutex_destroy(&rproc_cdev->mutex);
cde91a89becee6 Andrew Davis 2024-02-21 @165 kfree(rproc_cdev);
cde91a89becee6 Andrew Davis 2024-02-21 166
a4dac51a55b795 Andrew Davis 2024-02-21 @167 if (!rproc_cdev->cdev_put_on_release)
6e71d2b2a2b717 Mathieu Poirier 2021-03-12 168 return 0;
4476770881d7ac Siddharth Gupta 2020-07-29 169
6e71d2b2a2b717 Mathieu Poirier 2021-03-12 170 if (rproc->state == RPROC_RUNNING)
4476770881d7ac Siddharth Gupta 2020-07-29 171 rproc_shutdown(rproc);
6e71d2b2a2b717 Mathieu Poirier 2021-03-12 172 else if (rproc->state == RPROC_ATTACHED)
6e71d2b2a2b717 Mathieu Poirier 2021-03-12 173 ret = rproc_detach(rproc);
4476770881d7ac Siddharth Gupta 2020-07-29 174
6e71d2b2a2b717 Mathieu Poirier 2021-03-12 175 return ret;
4476770881d7ac Siddharth Gupta 2020-07-29 176 }
4476770881d7ac Siddharth Gupta 2020-07-29 177
:::::: The code at line 167 was first introduced by commit
:::::: a4dac51a55b7950e8e3fdd71db15b8c1686a8a28 remoteproc: core: Make shutdown-on-release per-file handle
:::::: TO: Andrew Davis <afd@ti.com>
:::::: CC: Praneeth Bajjuri <praneeth@ti.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-14 17:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-14 17:28 [ti:ti-linux-6.6.y-wip 16/18] drivers/remoteproc/remoteproc_cdev.c:167:6-16: ERROR: reference preceded by free on line 165 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).