lkml.org 
[lkml]   [2007]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] atm/ambassador: kmalloc + memset conversion to kzalloc
2007/11/26, Robert P. J. Day <rpjday@crashcourse.ca>:
> i realized that. but all you can say is that only amb_init() calls
> setup_dev() *currently*. when you're not looking, someone else might
> (for whatever reason) call setup_dev() from elsewhere, and *that* call
> might not zero that memory area.
>
> IMHO, the only safe transforms of kmalloc+memset -> kzalloc are those
> in which the flow of control is unmistakable and invariant. splitting
> that across a function call seems like a dangerous thing to do.
> (except, of course, in the case, where the kzalloc() is added inside
> the function -- then all callers are entitled to simplify *their*
> code. but that's different.)
>
> in any event, i just thought i'd point it out. if you're absolutely
> sure there will never be another call to setup_dev() from somewhere
> else, then, yes, it's safe.
>

I understood your opinions. and partially agree with you.
But isn't it a unfounded fear?

Thanks
Joonwoo
-
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-11-26 11:55    [W:0.051 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site