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: <alpine.LFD.0.999.0707200910020.27249@woody.linux-foundation.org>
Date:	Fri, 20 Jul 2007 09:12:51 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Magnus Damm <magnus.damm@...il.com>
cc:	linux-kernel@...r.kernel.org, Paul Mundt <lethal@...ux-sh.org>,
	Jeff Garzik <jeff@...zik.org>
Subject: Re: pata_platform: Fix NULL pointer dereference



On Fri, 20 Jul 2007, Magnus Damm wrote:
> 
> pata_platform currently dereferences a NULL pointer in pata_platform_probe()
> if pdev->dev.platform_data is set to NULL. This breakage was most likely
> introduced by commit 5f45bc50976ee1f408f7171af155aec646655a37.

Ok, the *fix* looks real enough, but it seems that you have done your line 
splitting with a word processor rather than with a source code editor:

> +	return ata_host_activate(host, platform_get_irq(pdev, 0),
> +				 ata_interrupt, pp_info ? pp_info->irq_flags
> +				 : 0, &pata_platform_sht);

Please don't do things like this. Splitting up expressions across two 
lines just to make the line length come out "right" is silly.

So do the

	"pp_info ? pp_info->irq_flags : 0"

expression on one line.

And if it means that the line is longe rthan 80 characters, then so be it. 
It's ok. It's still more readable than the alternative.

			Linus "nit-picking bastard" Torvalds
-
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