Let's start saying that your job is awesome. I found it really helful!!
I am working on kernel 2.4 andI modified a little bit your APIs.
I think you might find helpful these few notes.
On kclose function:
Line 228: ret = sk->ops->release(sk);
is not necessary since sock_release already do that. Moreover, it would lead to a segmentation fault if sk is already closed.
kclose does not set the socket pointer to NULL. This mean that if you kclose it again, it will result in a segmentation fault.
It is important because the check if(sk) will never fail on a socket even if it was closed.
Same problem come out with kfree. I suggest to implement a kfree that also set the pointer to NULL.
If you need any clarification or any help, just contact me :D
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.