public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Xin Zhao <uszhaoxin@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: NFS and RPC question under kernel 2.6
Date: Mon, 11 Jul 2005 02:37:31 -0400	[thread overview]
Message-ID: <4ae3c14050710233714a37814@mail.gmail.com> (raw)

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

                 reply	other threads:[~2005-07-11  6:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ae3c14050710233714a37814@mail.gmail.com \
    --to=uszhaoxin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox