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:	Mon, 17 Dec 2012 12:01:20 +0000
From:	Martyn Welch <martyn.welch@...com>
To:	Konstantin Khlebnikov <khlebnikov@...nvz.org>
CC:	linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org, Manohar Vanga <manohar.vanga@...il.com>
Subject: Re: [PATCH 05/12] staging: vme_pio2: fix oops on module unloading

On 14/12/12 11:02, Konstantin Khlebnikov wrote:
> This patch forbids loading vme_pio2 module without specifing "num_bus" parameter.
> Otherwise on module unloading pio2_exit() calls vme_unregister_driver() for not
> registered pio2_driver.
> 

Acked-by: Martyn Welch <martyn.welch@...com>

> Signed-off-by: Konstantin Khlebnikov <khlebnikov@...nvz.org>
> Cc: Martyn Welch <martyn.welch@...com>
> Cc: Manohar Vanga <manohar.vanga@...il.com>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: devel@...verdev.osuosl.org
> ---
>  drivers/staging/vme/devices/vme_pio2_core.c |   14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/staging/vme/devices/vme_pio2_core.c b/drivers/staging/vme/devices/vme_pio2_core.c
> index 0331178..bf73ba2 100644
> --- a/drivers/staging/vme/devices/vme_pio2_core.c
> +++ b/drivers/staging/vme/devices/vme_pio2_core.c
> @@ -162,11 +162,9 @@ static struct vme_driver pio2_driver = {
>  
>  static int __init pio2_init(void)
>  {
> -	int retval = 0;
> -
>  	if (bus_num == 0) {
>  		pr_err("No cards, skipping registration\n");
> -		goto err_nocard;
> +		return -ENODEV;
>  	}
>  
>  	if (bus_num > PIO2_CARDS_MAX) {
> @@ -176,15 +174,7 @@ static int __init pio2_init(void)
>  	}
>  
>  	/* Register the PIO2 driver */
> -	retval = vme_register_driver(&pio2_driver, bus_num);
> -	if (retval != 0)
> -		goto err_reg;
> -
> -	return retval;
> -
> -err_reg:
> -err_nocard:
> -	return retval;
> +	return  vme_register_driver(&pio2_driver, bus_num);
>  }
>  
>  static int pio2_match(struct vme_dev *vdev)
> 


-- 
Martyn Welch (Lead Software Engineer)  | Registered in England and Wales
GE Intelligent Platforms               | (3828642) at 100 Barbirolli Square
T +44(0)1327322748                     | Manchester, M2 3AB
E martyn.welch@...com                  | VAT:GB 927559189
--
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