mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: kernel test robot <lkp@intel.com>,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, mst@redhat.com,
	sgarzare@redhat.com, jasowang@redhat.com, stefanha@redhat.com,
	christian@brauner.io, akpm@linux-foundation.org,
	peterz@infradead.org, christian.brauner@ubuntu.com
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH 3/3] vhost: pass kthread user to check RLIMIT_NPROC
Date: Thu, 24 Jun 2021 11:18:39 -0500	[thread overview]
Message-ID: <14c70392-9fca-fb42-01ad-28821ab95aff@oracle.com> (raw)
In-Reply-To: <202106241618.nrJ23bPr-lkp@intel.com>

On 6/24/21 3:26 AM, kernel test robot wrote:
>>> drivers/vhost/vhost.c:599:57: sparse: sparse: dereference of noderef expression
> vim +599 drivers/vhost/vhost.c
> 
>    581	
>    582	/* Caller should have device mutex */
>    583	long vhost_dev_set_owner(struct vhost_dev *dev)
>    584	{
>    585		struct task_struct *worker;
>    586		int err;
>    587	
>    588		/* Is there an owner already? */
>    589		if (vhost_dev_has_owner(dev)) {
>    590			err = -EBUSY;
>    591			goto err_mm;
>    592		}
>    593	
>    594		vhost_attach_mm(dev);
>    595	
>    596		dev->kcov_handle = kcov_common_handle();
>    597		if (dev->use_worker) {
>    598			worker = kthread_create_for_user(vhost_worker, dev,
>  > 599							 current->real_cred->user,
>    600							 "vhost-%d", current->pid);

It looks like I should be doing something like get_uid(current_user())
then a free_uid() when doing using the user_struct.

Will fix.

  reply	other threads:[~2021-06-24 16:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24  3:08 [PATCH 0/3] kthread: pass in user and " Mike Christie
2021-06-24  3:08 ` [PATCH 1/3] kthread: allow caller to pass in user_struct Mike Christie
2021-06-24  4:34   ` kernel test robot
2021-06-24 16:19     ` Mike Christie
2021-06-24  3:08 ` [PATCH 2/3] kernel/fork, cred.c: allow copy_process to take user Mike Christie
2021-06-29 13:04   ` Christian Brauner
2021-06-29 16:53     ` Mike Christie
2021-07-01 23:59       ` michael.christie
2021-06-24  3:08 ` [PATCH 3/3] vhost: pass kthread user to check RLIMIT_NPROC Mike Christie
2021-06-24  8:26   ` kernel test robot
2021-06-24 16:18     ` Mike Christie [this message]
2021-06-24  7:34 ` [PATCH 0/3] kthread: pass in user and " Michael S. Tsirkin
2021-06-24  9:40 ` Stefan Hajnoczi

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=14c70392-9fca-fb42-01ad-28821ab95aff@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=christian.brauner@ubuntu.com \
    --cc=christian@brauner.io \
    --cc=jasowang@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mst@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.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®