public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Guangshuo Li <lgs201920130244@gmail.com>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
	Mahesh Salgaonkar <mahesh@linux.ibm.com>,
	Haren Myneni <haren@linux.ibm.com>,
	Tyrel Datwyler <tyreld@linux.ibm.com>,
	Christian Brauner <brauner@kernel.org>,
	Kees Cook <kees@kernel.org>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH v2] powerpc/pseries/papr-hvpipe: fix NULL dereference in handle creation
Date: Wed, 22 Apr 2026 16:54:41 +0800	[thread overview]
Message-ID: <202604221653.KzDQsCY8-lkp@intel.com> (raw)
In-Reply-To: <20260420132429.128075-1-lgs201920130244@gmail.com>

Hi Guangshuo,

kernel test robot noticed the following build errors:

[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v7.0 next-20260421]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Guangshuo-Li/powerpc-pseries-papr-hvpipe-fix-NULL-dereference-in-handle-creation/20260420-224327
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    https://lore.kernel.org/r/20260420132429.128075-1-lgs201920130244%40gmail.com
patch subject: [PATCH v2] powerpc/pseries/papr-hvpipe: fix NULL dereference in handle creation
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260422/202604221653.KzDQsCY8-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260422/202604221653.KzDQsCY8-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604221653.KzDQsCY8-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/powerpc/platforms/pseries/papr-hvpipe.c: In function 'papr_hvpipe_dev_create_handle':
>> arch/powerpc/platforms/pseries/papr-hvpipe.c:513:24: error: invalid use of void expression
     513 |         owned_src_info = retain_and_null_ptr(src_info);
         |                        ^


vim +513 arch/powerpc/platforms/pseries/papr-hvpipe.c

   479	
   480	static int papr_hvpipe_dev_create_handle(u32 srcID)
   481	{
   482		struct hvpipe_source_info *src_info __free(kfree) = NULL;
   483		struct hvpipe_source_info *owned_src_info;
   484	
   485		spin_lock(&hvpipe_src_list_lock);
   486		/*
   487		 * Do not allow more than one process communicates with
   488		 * each source.
   489		 */
   490		src_info = hvpipe_find_source(srcID);
   491		if (src_info) {
   492			spin_unlock(&hvpipe_src_list_lock);
   493			pr_err("pid(%d) is already using the source(%d)\n",
   494					src_info->tsk->pid, srcID);
   495			return -EALREADY;
   496		}
   497		spin_unlock(&hvpipe_src_list_lock);
   498	
   499		src_info = kzalloc_obj(*src_info, GFP_KERNEL_ACCOUNT);
   500		if (!src_info)
   501			return -ENOMEM;
   502	
   503		src_info->srcID = srcID;
   504		src_info->tsk = current;
   505		init_waitqueue_head(&src_info->recv_wqh);
   506	
   507		FD_PREPARE(fdf, O_RDONLY | O_CLOEXEC,
   508			   anon_inode_getfile("[papr-hvpipe]", &papr_hvpipe_handle_ops,
   509					      (void *)src_info, O_RDWR));
   510		if (fdf.err)
   511			return fdf.err;
   512	
 > 513		owned_src_info = retain_and_null_ptr(src_info);
   514		spin_lock(&hvpipe_src_list_lock);
   515		/*
   516		 * If two processes are executing ioctl() for the same
   517		 * source ID concurrently, prevent the second process to
   518		 * acquire FD.
   519		 */
   520		if (hvpipe_find_source(srcID)) {
   521			spin_unlock(&hvpipe_src_list_lock);
   522			return -EALREADY;
   523		}
   524		list_add(&owned_src_info->list, &hvpipe_src_list);
   525		spin_unlock(&hvpipe_src_list_lock);
   526		return fd_publish(fdf);
   527	}
   528	

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

      parent reply	other threads:[~2026-04-22  8:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 13:24 [PATCH v2] powerpc/pseries/papr-hvpipe: fix NULL dereference in handle creation Guangshuo Li
2026-04-21  1:04 ` Ritesh Harjani
2026-04-22  8:54 ` kernel test robot [this message]

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=202604221653.KzDQsCY8-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brauner@kernel.org \
    --cc=chleroy@kernel.org \
    --cc=haren@linux.ibm.com \
    --cc=kees@kernel.org \
    --cc=lgs201920130244@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mahesh@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=tyreld@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox