lkml.org 
[lkml]   [2013]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel: kallsyms: parameters checking, for EXPORT_SYMBOL_GPL functions
On 2013年04月10日 14:57, Rusty Russell wrote:
> Chen Gang <gang.chen@asianux.com> writes:
>> > for EXPORT_SYMBOL_GPL functions, necessary to check their parameters.
>> >
>> > Signed-off-by: Chen Gang <gang.chen@asianux.com>
> Why?
>
> If someone misuses these functions, they crash and thus indicate that
> the caller shouldn't do that.
>

for me, I think:

if it is used by self (such as static functions):
I prefer to crash immediatly.
it will help us to find issue, quickly.

if it can be used by others (such as EXPORT_SYMBOL_GPL):
I prefer to return fail and tell caller that parameter is invalid.
it is more polite to callers, and still indicate it may be an issue.

:-)


> Or is someone already doing this?
>

really has:

kernel: __wake_up_sync_key in kernel/sched/core.c.
lib: *printf.
mm: kfree.


> Confused,
> Rusty.
>


--
Chen Gang

Asianux Corporation
--
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: 2013-04-10 13:41    [W:0.344 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site