* [KJ] Re: kernel-2.6.9: make sock_init() notice errors
@ 2004-12-15 16:01 Domen Puncer
2004-12-15 17:27 ` walter harms
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Domen Puncer @ 2004-12-15 16:01 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
On 27/11/04 17:26 +0100, walter harms wrote:
> Hi list,
> by accident i found that that sock_init never checks the return code of
> called init functions. I have no idea why this is not done so i added
> only a printk() to inform the user about the problem.
> The function returns no error indicator. i left it this way.
I don't like this patch: it doesn't really do anything useful...
ie. if user runs out of memory on boot, he'll have other problems
than caring about sock_init failing somewhere.
Comments?
Also, there's still whitespace damage like:
> + ret=init_inodecache();
> + if ( ret < 0 ) {
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
* [KJ] Re: kernel-2.6.9: make sock_init() notice errors
2004-12-15 16:01 [KJ] Re: kernel-2.6.9: make sock_init() notice errors Domen Puncer
@ 2004-12-15 17:27 ` walter harms
2004-12-15 21:45 ` Arnaldo Carvalho de Melo
2004-12-18 9:58 ` Domen Puncer
2 siblings, 0 replies; 4+ messages in thread
From: walter harms @ 2004-12-15 17:27 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]
Hi domen, hi list,
its true that the user can not do much about missing memmory but he
should know WHAT error occured.
NTL not checking returncodes is an error.
Continuing when one earlier function did not work is also an error and
may cause problems in unexspected places.
Since this is an init code its no performance consideration to be made.
re,
walter
Domen Puncer wrote:
> On 27/11/04 17:26 +0100, walter harms wrote:
>
>>Hi list,
>>by accident i found that that sock_init never checks the return code of
>>called init functions. I have no idea why this is not done so i added
>>only a printk() to inform the user about the problem.
>>The function returns no error indicator. i left it this way.
>
>
> I don't like this patch: it doesn't really do anything useful...
> ie. if user runs out of memory on boot, he'll have other problems
> than caring about sock_init failing somewhere.
>
> Comments?
>
> Also, there's still whitespace damage like:
>
>>+ ret=init_inodecache();
>>+ if ( ret < 0 ) {
>
>
>
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [KJ] Re: kernel-2.6.9: make sock_init() notice errors
2004-12-15 16:01 [KJ] Re: kernel-2.6.9: make sock_init() notice errors Domen Puncer
2004-12-15 17:27 ` walter harms
@ 2004-12-15 21:45 ` Arnaldo Carvalho de Melo
2004-12-18 9:58 ` Domen Puncer
2 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2004-12-15 21:45 UTC (permalink / raw)
To: kernel-janitors
Domen Puncer wrote:
> On 27/11/04 17:26 +0100, walter harms wrote:
>
>>Hi list,
>>by accident i found that that sock_init never checks the return code of
>>called init functions. I have no idea why this is not done so i added
>>only a printk() to inform the user about the problem.
>>The function returns no error indicator. i left it this way.
>
>
> I don't like this patch: it doesn't really do anything useful...
> ie. if user runs out of memory on boot, he'll have other problems
> than caring about sock_init failing somewhere.
>
> Comments?
Better have a message that gives a clue about where things went wrong
than nothing.
If a function is not to be checked against failure, convert it to
return void 8) IOW: always check non void returning functions.
- Arnaldo
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
* [KJ] Re: kernel-2.6.9: make sock_init() notice errors
2004-12-15 16:01 [KJ] Re: kernel-2.6.9: make sock_init() notice errors Domen Puncer
2004-12-15 17:27 ` walter harms
2004-12-15 21:45 ` Arnaldo Carvalho de Melo
@ 2004-12-18 9:58 ` Domen Puncer
2 siblings, 0 replies; 4+ messages in thread
From: Domen Puncer @ 2004-12-18 9:58 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 623 bytes --]
On 15/12/04 18:27 +0100, walter harms wrote:
>
> Hi domen, hi list,
>
> its true that the user can not do much about missing memmory but he
> should know WHAT error occured.
> NTL not checking returncodes is an error.
> Continuing when one earlier function did not work is also an error and
> may cause problems in unexspected places.
> Since this is an init code its no performance consideration to be made.
Ok, fair enough; if you fix whitespace i'll include it.
>
> re,
> walter
>
>
>
> Domen Puncer wrote:
> >Also, there's still whitespace damage like:
> >
> >>+ ret=init_inodecache();
> >>+ if ( ret < 0 ) {
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-12-18 9:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-15 16:01 [KJ] Re: kernel-2.6.9: make sock_init() notice errors Domen Puncer
2004-12-15 17:27 ` walter harms
2004-12-15 21:45 ` Arnaldo Carvalho de Melo
2004-12-18 9:58 ` Domen Puncer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.