From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262101AbVGKGjE (ORCPT ); Mon, 11 Jul 2005 02:39:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261642AbVGKGjE (ORCPT ); Mon, 11 Jul 2005 02:39:04 -0400 Received: from wproxy.gmail.com ([64.233.184.197]:55450 "EHLO wproxy.gmail.com") by vger.kernel.org with ESMTP id S262266AbVGKGhb convert rfc822-to-8bit (ORCPT ); Mon, 11 Jul 2005 02:37:31 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=mfbdKQevhwvTx1q9Skn36wyLenrL85lah9YNTFFdHWkdB52yuQ1Gxxck+H6Hn/3cNLWnyrj2FphPpRUTJiKKbMjKxGzrGNCbrpOTLaYy+qiyuENSiuQyiZr6OzvHQxBS9BRPSKqrt/vCYH7xyaS5MXyWUdcNK7gNltkDNm76e60= Message-ID: <4ae3c14050710233714a37814@mail.gmail.com> Date: Mon, 11 Jul 2005 02:37:31 -0400 From: Xin Zhao Reply-To: Xin Zhao To: linux-kernel@vger.kernel.org Subject: NFS and RPC question under kernel 2.6 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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 [] snprintf+0x27/0x2b [] nfs_sb_init+0x9a/0x527 [nfs] [] unx_create+0x4e/0x6b [sunrpc] [] rpcauth_create+0x6a/0xb1 [sunrpc] [] rpc_create_client+0x18a/0x269 [sunrpc] [] nfs_create_client+0xc4/0x138 [nfs] [] lockd_up+0xd0/0x13d [lockd] [] nfs_fill_super+0x2de/0x36c [nfs] [] nfs_get_sb+0x231/0x265 [nfs] [] do_kern_mount+0x4f/0xc5 [] do_new_mount+0x82/0xc3 [] do_mount+0x179/0x197 [] copy_mount_options+0x54/0x9f [] sys_mount+0x9f/0xe0 [] 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