lkml.org 
[lkml]   [2005]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectNFS and RPC question under kernel 2.6
Sorry if this question is dumb.

I am trying to modify NFS to add some more features. I changed the
rpc_clnt struct in include/linux/sunrpc/clnt.h to add some more
fields:

vrpc_comm_t *cl_comm;
wait_queue_head_t cl_callwaitq[MAX_PENDING_REQS];
int cl_blocked[MAX_PENDING_REQS]; /* indicates whether a request
is blocked */
svdif_response_t cl_resp_ring[MAX_PENDING_REQS];

I tried to initialise those fields in nfs_fill_super function, but
once those initialization codes are executed, if a nfs client tries to
mount a directory, its underlying linux will crash with the following
dump out:

Unable to handle kernel NULL pointer dereference at virtual address 00000008
printing eip:
d085ff29
*pde = ma 00000000 pa 55555000
[<c01e5564>] snprintf+0x27/0x2b
[<d086002b>] nfs_sb_init+0x9a/0x527 [nfs]
[<d08344c6>] unx_create+0x4e/0x6b [sunrpc]
[<d08338cb>] rpcauth_create+0x6a/0xb1 [sunrpc]
[<d082e212>] rpc_create_client+0x18a/0x269 [sunrpc]
[<d086057c>] nfs_create_client+0xc4/0x138 [nfs]
[<d084f4bb>] lockd_up+0xd0/0x13d [lockd]
[<d08608ce>] nfs_fill_super+0x2de/0x36c [nfs]
[<d0862821>] nfs_get_sb+0x231/0x265 [nfs]
[<c0158cdc>] do_kern_mount+0x4f/0xc5
[<c016dfd4>] do_new_mount+0x82/0xc3
[<c016e687>] do_mount+0x179/0x197
[<c016e4c3>] copy_mount_options+0x54/0x9f
[<c016ea38>] sys_mount+0x9f/0xe0
[<c0108e2c>] syscall_call+0x7/0xb

My initialization codes work well on kernel 2.4, but do not work on
2.6. :( I was stuck on this problem for a couple of days.

Can someone help me out? Many thanks in advance!!!

BTW: after I change clnt.h, I recompiled the kernel and restart the
machine, so kernel should know rpc_clnt struct is changed.

-x
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-11 08:43    [W:0.026 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site