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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110406211214.GA2795@local>
Date:	Wed, 6 Apr 2011 23:12:15 +0200
From:	"Hans J. Koch" <hjk@...sjkoch.de>
To:	Aisheng Dong <b29396@...escale.com>
Cc:	hjk@...sjkoch.de, greg@...ah.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 1/1] uio: clean uioinfo when uninstall uio driver

On Wed, Apr 06, 2011 at 02:42:40PM +0800, Aisheng Dong wrote:
> From: Jie Zhou <b30303@...escale.com>
> 
> The uioinfo should be cleaned up when uninstall, otherwise re-install
> failure of uio_pdrv_genirq.ko will happen.

Looks good.

Thanks for your help,
Hans

> 
> Signed-off-by: Jie Zhou <b30303@...escale.com>
> Signed-off-by: Aisheng Dong <b29396@...escale.com>

Signed-off-by: Hans J. Koch <hjk@...sjkoch.de>

> 
> ---
> Changes for v2:
>  Address the comments from Hans:
>    - The uioinfo->irq_flags and uioinfo->priv do not have to be cleaned
> ---
>  drivers/uio/uio_pdrv_genirq.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
> index 7174d51..0f424af 100644
> --- a/drivers/uio/uio_pdrv_genirq.c
> +++ b/drivers/uio/uio_pdrv_genirq.c
> @@ -189,6 +189,10 @@ static int uio_pdrv_genirq_remove(struct platform_device *pdev)
>  
>  	uio_unregister_device(priv->uioinfo);
>  	pm_runtime_disable(&pdev->dev);
> +
> +	priv->uioinfo->handler = NULL;
> +	priv->uioinfo->irqcontrol = NULL;
> +
>  	kfree(priv);
>  	return 0;
>  }
> -- 
> 1.7.0.4
> 
> 
> 
--
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