lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 05 Jun 2013 09:11:22 -0600
From:	Alex Williamson <alex.williamson@...hat.com>
To:	Alexey Kardashevskiy <aik@...abs.ru>
Cc:	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfio: fix crash on rmmod

On Wed, 2013-06-05 at 16:03 +1000, Alexey Kardashevskiy wrote:
> devtmpfs_delete_node() calls devnode() callback with mode==NULL but
> vfio still tries to write there.
> 
> The patch fixes this.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@...abs.ru>
> 
> ---

Oops.  Applied.  The mode change just went in for 3.10, so I'll get this
in before the final rc.  Thanks,

Alex

> Steps to reproduce on freshly booted system with no devices given to VFIO:
> modprobe vfio
> rmmod vfio_iommu_spapr_tce
> rmmod vfio
> ---
>  drivers/vfio/vfio.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
> index 523c121..259ad28 100644
> --- a/drivers/vfio/vfio.c
> +++ b/drivers/vfio/vfio.c
> @@ -1360,7 +1360,7 @@ static const struct file_operations vfio_device_fops = {
>   */
>  static char *vfio_devnode(struct device *dev, umode_t *mode)
>  {
> -	if (MINOR(dev->devt) == 0)
> +	if (mode && (MINOR(dev->devt) == 0))
>  		*mode = S_IRUGO | S_IWUGO;
>  
>  	return kasprintf(GFP_KERNEL, "vfio/%s", dev_name(dev));



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ