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:	Mon, 11 Feb 2008 13:38:27 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	"Thomas, Sujith" <sujith.thomas@...el.com>
Cc:	lenb@...nel.org, mingo@...e.hu, torvalds@...ux-foundation.org,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-pm@...ts.linux-foundation.org, rui.zhang@...el.com
Subject: Re: [Bug-fix]:2.6.25-rc0 Generic thermal management [Patch 1/2]:
 validating input parameters

On Mon, 11 Feb 2008 15:57:06 +0530
"Thomas, Sujith" <sujith.thomas@...el.com> wrote:

> From: Thomas Sujith <sujith.thomas@...el.com>
> 
> Added sanity checks for interface functions in thermal with
> other modules such as fan, processor, video etc..
> 
> Signed-off-by: Thomas Sujith <sujith.thomas@...el.com>
> ---
> drivers/thermal/thermal.c |   69
> +++++++++++++++++++++++++++++-----------------

The patch is fairly seriously wordwrapped.

>  1 files changed, 44 insertions(+), 25 deletions(-)
> 
> Index: linux-2.6.24-rc3/drivers/thermal/thermal.c
> ===================================================================
> --- linux-2.6.24-rc3.orig/drivers/thermal/thermal.c
> +++ linux-2.6.24-rc3/drivers/thermal/thermal.c
> @@ -301,13 +301,27 @@ int thermal_zone_bind_cooling_device(str
>  {
>  	struct thermal_cooling_device_instance *dev;
>  	struct thermal_cooling_device_instance *pos;
> +	struct thermal_zone_device *pos1;
> +	struct thermal_cooling_device *pos2;
>  	int result;
>  
> +	if (!tz || !cdev)
> +		return -EINVAL;

Is this change actually needed?  It's sloppy for a caller to be passing
invalid arguments into a callee, and it's not good for the callee to just
hide that sloppiness.

> -		return NULL;
> +		return  ERR_PTR(-EINVAL);

the patch adds several spaces like this in places where we don't normally
put them.


--
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