From: Hans de Goede <hdegoede@redhat.com>
To: Denis Efremov <efremov@linux.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] virt: vbox: Use current_uid() in vbg_misc_device_requestor()
Date: Mon, 24 Aug 2020 16:35:13 +0200 [thread overview]
Message-ID: <4f9ecef2-4ab1-e2c3-b8d4-0f24e999bd23@redhat.com> (raw)
In-Reply-To: <20200824125330.487083-1-efremov@linux.com>
Hi,
On 8/24/20 2:53 PM, Denis Efremov wrote:
> Modify vbg_misc_device_requestor() to use current_uid() wrapper.
>
> Signed-off-by: Denis Efremov <efremov@linux.com>
Thank you, patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/virt/vboxguest/vboxguest_linux.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/virt/vboxguest/vboxguest_linux.c b/drivers/virt/vboxguest/vboxguest_linux.c
> index 32c2c52f7e84..6215a688edaf 100644
> --- a/drivers/virt/vboxguest/vboxguest_linux.c
> +++ b/drivers/virt/vboxguest/vboxguest_linux.c
> @@ -35,7 +35,7 @@ static u32 vbg_misc_device_requestor(struct inode *inode)
> VMMDEV_REQUESTOR_CON_DONT_KNOW |
> VMMDEV_REQUESTOR_TRUST_NOT_GIVEN;
>
> - if (from_kuid(current_user_ns(), current->cred->uid) == 0)
> + if (from_kuid(current_user_ns(), current_uid()) == 0)
> requestor |= VMMDEV_REQUESTOR_USR_ROOT;
> else
> requestor |= VMMDEV_REQUESTOR_USR_USER;
>
prev parent reply other threads:[~2020-08-24 14:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 12:53 [PATCH] virt: vbox: Use current_uid() in vbg_misc_device_requestor() Denis Efremov
2020-08-24 14:35 ` Hans de Goede [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=4f9ecef2-4ab1-e2c3-b8d4-0f24e999bd23@redhat.com \
--to=hdegoede@redhat.com \
--cc=arnd@arndb.de \
--cc=efremov@linux.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.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