Skip to contentSkip to conversation

Audit return codes (Question about getting started)

KJ Jesse Millan 3 participants 3 messages Apr 20, 2005 Kernel janitors

lore
Share & tools
lore
#0 lore raw

I just want to make sure that I understand the process correctly:

For example, take kalloc(). If I find instances that that the return value is not checked (and I have) i.e. they call kalloc() and automatically assume success and dereference the allocated memory without checking for NULL. I would insert to proper error checking, create the patch and mail the patch to [email protected]?

Is this the process?

Thanks.

Quoted 11 lines · Jesse Millan

Is anyone already working on this?

Its the first item in the TODO list:

http://janitor.kernelnewbies.org/TODO

I am looking for an easy project. I am a total newbie, but I want to get involved with Kernel Janitors.

Thanks.

Signature · 14 lines
Jesse Millan
CNS Unix Team
Portland State University
Phone: (503) 725-3285
Fax: (503) 725-6487
Mobile: (503) 453-0748
GPG key: www.system-calls.com/gpg.php

Recursive: Adj. See Recursive.

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
#1 lore raw

On Wed, 20 Apr 2005 11:19:15 -0700 Jesse Millan wrote:

| I just want to make sure that I understand the process correctly:
| 
| For example, take kalloc(). If I find instances that that the return

take kmalloc() or kcalloc() [there is no kalloc()]

| value is not checked (and I have) i.e. they call kalloc() and
| automatically assume success and dereference the allocated memory
| without checking for NULL. I would insert to proper error checking,
| create the patch and mail the patch to [email protected]?

and usually cc: the maintainer...

| Is this the process?

That's the process, but there is a caveat. (There are probably caveats for everything...)

During kernel/system init, if an allocation fails, it's useless to report an error and try to keep going, so just let it fail by referencing an invalid memory address (like near NULL).

If you find places after system init has completed that do not check for allocation failures, then they should be fixed (in general); i.e., send patches and we will evaluate them.

| Jesse Millan wrote:
| > Is anyone already working on this?
| > 
| > Its the first item in the TODO list:
| > 
| > http://janitor.kernelnewbies.org/TODO
| > 
| > I am looking for an easy project. I am a total newbie, but I want to get
| > involved with Kernel Janitors.

---
~Randy

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#2 lore raw
In reply to Jesse Millan
Quoted 10 lines · Jesse Millan

I just want to make sure that I understand the process correctly:

For example, take kalloc(). If I find instances that that the return value is not checked (and I have) i.e. they call kalloc() and automatically assume success and dereference the allocated memory without checking for NULL. I would insert to proper error checking, create the patch and mail the patch to [email protected]?

Is this the process?

Generally, yes. You probably should verify the patch doesn't wrap in your mail & applies cleanly by mailing to yourself.

Otherwise, send patches to the KJML and wait for replies.

Thanks,
Nish

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors