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] [thread-next>] [day] [month] [year] [list]
Message-ID: <502C0DEC.3010104@cinnamon-sage.de>
Date:	Wed, 15 Aug 2012 23:00:28 +0200
From:	Lars Hanisch <dvb@...namon-sage.de>
To:	Alexey Khoroshilov <khoroshilov@...ras.ru>
CC:	Mauro Carvalho Chehab <mchehab@...radead.org>,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
	ldv-project@...ras.ru
Subject: Re: [PATCH] [media] ddbridge: fix error handling in module_init_ddbridge()

Hi,

Am 15.08.2012 22:42, schrieb Alexey Khoroshilov:
> If pci_register_driver() failed, resources allocated in
> ddb_class_create() are leaked. The patch fixes it.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
> ---
>  drivers/media/dvb/ddbridge/ddbridge-core.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/dvb/ddbridge/ddbridge-core.c b/drivers/media/dvb/ddbridge/ddbridge-core.c
> index ebf3f05..36aa4e4 100644
> --- a/drivers/media/dvb/ddbridge/ddbridge-core.c
> +++ b/drivers/media/dvb/ddbridge/ddbridge-core.c
> @@ -1705,7 +1705,11 @@ static __init int module_init_ddbridge(void)
>  	       "Copyright (C) 2010-11 Digital Devices GmbH\n");
>  	if (ddb_class_create())
>  		return -1;
> -	return pci_register_driver(&ddb_pci_driver);
> +	if (pci_register_driver(&ddb_pci_driver) < 0) {
> +		ddb_class_destroy();
> +		return -1;

 Difference to before: the return value of pci_register_driver is not passed through.
 Is this a problem? I'm just an interested application developer, not a driver developer.

Regards,
Lars.

> +	}
> +	return 0;
>  }
>  
>  static __exit void module_exit_ddbridge(void)
>
--
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