All of 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: drivers/gpu/drm/msm/msm_iommu.c:341:16-17: WARNING kvmalloc is used to allocate this memory at line 335
Date: Tue, 18 Nov 2025 10:52:09 +0800	[thread overview]
Message-ID: <202511181058.kGAA7N2y-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Rob Clark <robin.clark@oss.qualcomm.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e7c375b181600caf135cfd03eadbc45eb530f2cb
commit: 830d68f2cb8ab6fb798bb9555016709a9e012af0 drm/msm: Fix pgtable prealloc error path
date:   5 weeks ago
:::::: branch date: 9 hours ago
:::::: commit date: 5 weeks ago
config: um-randconfig-r053-20251118 (https://download.01.org/0day-ci/archive/20251118/202511181058.kGAA7N2y-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 0bba1e76581bad04e7d7f09f5115ae5e2989e0d9)

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/202511181058.kGAA7N2y-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/msm/msm_iommu.c:341:16-17: WARNING kvmalloc is used to allocate this memory at line 335

vim +341 drivers/gpu/drm/msm/msm_iommu.c

e601ea31d66ba8 Rob Clark 2025-06-29  328  
e601ea31d66ba8 Rob Clark 2025-06-29  329  static int
e601ea31d66ba8 Rob Clark 2025-06-29  330  msm_iommu_pagetable_prealloc_allocate(struct msm_mmu *mmu, struct msm_mmu_prealloc *p)
e601ea31d66ba8 Rob Clark 2025-06-29  331  {
e601ea31d66ba8 Rob Clark 2025-06-29  332  	struct kmem_cache *pt_cache = get_pt_cache(mmu);
e601ea31d66ba8 Rob Clark 2025-06-29  333  	int ret;
e601ea31d66ba8 Rob Clark 2025-06-29  334  
e601ea31d66ba8 Rob Clark 2025-06-29 @335  	p->pages = kvmalloc_array(p->count, sizeof(p->pages), GFP_KERNEL);
e601ea31d66ba8 Rob Clark 2025-06-29  336  	if (!p->pages)
e601ea31d66ba8 Rob Clark 2025-06-29  337  		return -ENOMEM;
e601ea31d66ba8 Rob Clark 2025-06-29  338  
e601ea31d66ba8 Rob Clark 2025-06-29  339  	ret = kmem_cache_alloc_bulk(pt_cache, GFP_KERNEL, p->count, p->pages);
e601ea31d66ba8 Rob Clark 2025-06-29  340  	if (ret != p->count) {
830d68f2cb8ab6 Rob Clark 2025-10-06 @341  		kfree(p->pages);
830d68f2cb8ab6 Rob Clark 2025-10-06  342  		p->pages = NULL;
e601ea31d66ba8 Rob Clark 2025-06-29  343  		p->count = ret;
e601ea31d66ba8 Rob Clark 2025-06-29  344  		return -ENOMEM;
e601ea31d66ba8 Rob Clark 2025-06-29  345  	}
e601ea31d66ba8 Rob Clark 2025-06-29  346  
e601ea31d66ba8 Rob Clark 2025-06-29  347  	return 0;
e601ea31d66ba8 Rob Clark 2025-06-29  348  }
e601ea31d66ba8 Rob Clark 2025-06-29  349  

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

                 reply	other threads:[~2025-11-18  2:52 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=202511181058.kGAA7N2y-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.