All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: [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
Date: Mon, 15 Apr 2024 01:28:32 +0800	[thread overview]
Message-ID: <202404150107.gJtdbKtX-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-04-14 17:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202404150107.gJtdbKtX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.