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]
Date:	Tue, 24 Oct 2006 07:24:37 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Neil Horman <nhorman@...driver.com>
Cc:	Benjamin Herrenschmidt <benh@...nel.crashing.org>, akpm@...l.org,
	kernel-janitors@...ts.osdl.org, maxk@...lcomm.com,
	kjhall@...ibm.com, linux-kernel@...r.kernel.org
Subject: Re: [KJ] [PATCH] Correct misc_register return code handling in several drivers

On Tue, Oct 24, 2006 at 08:53:06AM -0400, Neil Horman wrote:
> The INIT_LIST_HEAD is there to prevent a potential oops on module removal.
> misc_register, if it fails, leaves miscdevice.list unchanged.  That means its
> next and prev pointers contain NULL or garbage, when both pointers should contain
> &miscdevice.list. If we don't do that, then there is a chance we will oops on
> module removal when we do a list_del in misc_deregister on the moudule_exit
> routine.  I could have done this statically, but I thought it looked cleaner to
> do it with the macro in the code.

Maybe it would be better to have misc_register() call INIT_LIST_HEAD in
the failure case?
-
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