mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sean Young <sean@mess.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Hans Verkuil <hverkuil@kernel.org>
Subject: drivers/media/rc/bpf-lirc.c:240:17: sparse: sparse: incorrect type in initializer (different base types)
Date: Fri, 04 Dec 2026 06:00:31 +0100	[thread overview]
Message-ID: <20261204055830.VxYkpYsF-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   007722b8211f7b34fdf21b1e6a9c32497633ea29
commit: f95a9f8472f97c30106513fc7494b7abad243949 media: rc: Fix use after free in bpf progs
date:   3 months ago
config: microblaze-randconfig-r2310-20261203 (https://download.01.org/0day-ci/archive/20261204/20261204055830.VxYkpYsF-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 13.5.0
sparse: v0.6.5-rc1-94-g0d159c10
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261204/20261204055830.VxYkpYsF-lkp@intel.com/reproduce)

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
| Fixes: f95a9f8472f9 ("media: rc: Fix use after free in bpf progs")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261204055830.VxYkpYsF-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/media/rc/bpf-lirc.c:240:17: sparse: sparse: incorrect type in initializer (different base types) @@     expected void *__tmp @@     got struct bpf_prog_array * @@
   drivers/media/rc/bpf-lirc.c:240:17: sparse:     expected void *__tmp
   drivers/media/rc/bpf-lirc.c:240:17: sparse:     got struct bpf_prog_array *

vim +240 drivers/media/rc/bpf-lirc.c

   228	
   229	/*
   230	 * This should be called once the rc thread has been stopped, so there can be
   231	 * no concurrent bpf execution.
   232	 *
   233	 * Should be called with the ir_raw_handler_lock held.
   234	 */
   235	void lirc_bpf_free(struct rc_dev *rcdev)
   236	{
   237		struct bpf_prog_array_item *item;
   238		struct bpf_prog_array *array;
   239	
 > 240		array = rcu_replace_pointer(rcdev->raw->progs, NULL,
   241					    lockdep_is_held(&ir_raw_handler_lock));
   242		if (!array)
   243			return;
   244	
   245		for (item = array->items; item->prog; item++)
   246			bpf_prog_put(item->prog);
   247	
   248		bpf_prog_array_free(array);
   249	}
   250	

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

                 reply	other threads:[~2026-12-04  5:00 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=20261204055830.VxYkpYsF-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hverkuil@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sean@mess.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®