Re: [PATCH] virtio: nsm: fix raw ioctl copy error path

From: Yousef Alhouseen

Date: Sat Jul 18 2026 - 08:21:01 EST


Yes, sorry about that. The prefix should be "virt: nsm", not "virtio:
nsm". I'll fix the subject and resend it as v2.

Thanks,
Yousef

On Fri, 17 Jul 2026 13:14:37 +0200, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Jun 24, 2026 at 07:35:01PM +0200, Yousef Alhouseen wrote:
> > nsm_dev_ioctl() uses a common exit path which unlocks nsm->lock.
> >
> > A failed copy_from_user() reaches that path before the mutex is locked.
> >
> > Return -EFAULT directly for that pre-lock failure.
> >
> > Signed-off-by: Yousef Alhouseen <alhouseenyousef@xxxxxxxxx>
> > ---
> > drivers/misc/nsm.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
>
> The subject says "virtio" yet that is not what this driver is :(
>
> Can you fix that up and resend?
>
> thanks,
>
> greg k-h