lkml.org 
[lkml]   [2007]   [Aug]   [25]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 24 Aug 2007 21:49:44 -0700
FromGreg KH <>
SubjectRe: [PATCH] Fix kobject uevent string handling errors
On Sat, Aug 25, 2007 at 12:17:54AM -0400, Mathieu Desnoyers wrote:
> Fix kobject uevent string handling errors
> 
> - increment env->buflen in dmi-id.c
> - fix off-by-one in add_uevent_var in error checking of vsnprintf
> - add warnings when add_uevent_var. Proper handling of its return values should
>   really be done by the callers, but they aren't, so things currently
>   fail silently. This is why I add warnings.

Ah, thanks, but Kay just sent me an updated version with portions of
this fix in it already.

Thanks a lot for helping us track this all down, hopefully the scsi
layer isn't still overflowing the buffer :(

> -	if (env->envp_idx >= ARRAY_SIZE(env->envp))
> +	if (env->envp_idx >= ARRAY_SIZE(env->envp)) {
> +		printk("add_uevent_var: too small array size %u %u\n",
> +			env->envp_idx, ARRAY_SIZE(env->envp));
> +		WARN_ON(1);

printk's always need a KERN_level.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-08-25 06:55    [from the cache]
©2003-2008