modified netlock.c
Use rw_sema to implement net_lock and net_unlock