kernel-2.6.9: make sock_init() notice errors
Quoted 5 lines · walter harms
Hi list,
by accident i found that thatsock_initnever checks the return code of called init functions. I have no idea why this is not done so i added only aprintk()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:
Review
Quoted 2 lines
(quoted diff) +2
-0+ ret=init_inodecache(); + if ( ret < 0 ) {
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
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
Quoted 13 lines · Domen Puncer
Quoted 5 lines · walter harms
Hi list,
by accident i found that thatsock_initnever checks the return code of called init functions. I have no idea why this is not done so i added only aprintk()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_initfailing somewhere.
Quoted 9 lines
Comments?
Also, there's still whitespace damage like:
Review
Quoted 2 lines
(quoted diff) +2
-0+ ret=init_inodecache(); + if ( ret < 0 ) {
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 9 lines · Domen Puncer
Quoted 5 lines · walter harms
Hi list,
by accident i found that thatsock_initnever checks the return code of called init functions. I have no idea why this is not done so i added only aprintk()to inform the user about the problem.
The function returns no error indicator. i left it this way.
Quoted 5 lines
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_initfailing 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
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 9 lines · walter harms
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.
Quoted 11 lines
re,
walterQuoted 4 lines · Domen Puncer
Also, there's still whitespace damage like:
Review
Quoted 2 lines
(quoted diff) +2
-0+ ret=init_inodecache(); + if ( ret < 0 ) {
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors