All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pankaj Gupta <pankaj.gupta@nxp.com>
Cc: oe-kbuild-all@lists.linux.dev, Frank Li <Frank.Li@nxp.com>
Subject: [linux-next:master 8727/15099] drivers/firmware/imx/se_ctrl.c:476:2-7: WARNING: invalid free of devm_ allocated data
Date: Wed, 24 Jun 2026 13:09:19 +0800	[thread overview]
Message-ID: <202606241320.9gDd2s75-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   4e5dfb7c84012007c3c7061126491bbc92d71bf1
commit: 2768fdfd55852f0973ddb0866eef14321df2fa47 [8727/15099] firmware: drivers: imx: adds miscdev
config: powerpc64-randconfig-r052-20260624 (https://download.01.org/0day-ci/archive/20260624/202606241320.9gDd2s75-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project a9b492db3d50683e446cd1a5c9ffaf4e92cb77a7)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606241320.9gDd2s75-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/firmware/imx/se_ctrl.c:476:2-7: WARNING: invalid free of devm_ allocated data
   drivers/firmware/imx/se_ctrl.c:487:2-7: WARNING: invalid free of devm_ allocated data

vim +476 drivers/firmware/imx/se_ctrl.c

   460	
   461	static int init_device_context(struct se_if_priv *priv, int ch_id,
   462				       struct se_if_device_ctx **new_dev_ctx)
   463	{
   464		struct se_if_device_ctx *dev_ctx;
   465		int ret = 0;
   466	
   467		dev_ctx = kzalloc_obj(*dev_ctx, GFP_KERNEL);
   468	
   469		if (!dev_ctx)
   470			return -ENOMEM;
   471	
   472		dev_ctx->devname = kasprintf(GFP_KERNEL, "%s0_ch%d",
   473					     get_se_if_name(priv->if_defs->se_if_type),
   474					     ch_id);
   475		if (!dev_ctx->devname) {
 > 476			kfree(dev_ctx);
   477			return -ENOMEM;
   478		}
   479	
   480		mutex_init(&dev_ctx->fops_lock);
   481		dev_ctx->priv = priv;
   482		*new_dev_ctx = dev_ctx;
   483	
   484		ret = init_se_shared_mem(dev_ctx);
   485		if (ret < 0) {
   486			kfree(dev_ctx->devname);
   487			kfree(dev_ctx);
   488			*new_dev_ctx = NULL;
   489		}
   490	
   491		list_add_tail(&dev_ctx->link, &priv->dev_ctx_list);
   492		priv->active_devctx_count++;
   493	
   494		return ret;
   495	}
   496	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-06-24  5:10 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=202606241320.9gDd2s75-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Frank.Li@nxp.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pankaj.gupta@nxp.com \
    /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.