Content-Type: multipart/mixed; boundary="===============2581971218621909982==" MIME-Version: 1.0 From: Mike Christie To: 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 Message-ID: <14c70392-9fca-fb42-01ad-28821ab95aff@oracle.com> In-Reply-To: <202106241618.nrJ23bPr-lkp@intel.com> List-Id: --===============2581971218621909982== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 6/24/21 3:26 AM, kernel test robot wrote: >>> drivers/vhost/vhost.c:599:57: sparse: sparse: dereference of noderef ex= pression > 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 =3D -EBUSY; > 591 goto err_mm; > 592 } > 593 = > 594 vhost_attach_mm(dev); > 595 = > 596 dev->kcov_handle =3D kcov_common_handle(); > 597 if (dev->use_worker) { > 598 worker =3D 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. --===============2581971218621909982==--