lkml.org 
[lkml]   [2007]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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    [W:0.069 / U:5.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site