From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan Mallon Subject: [RFC PATCH 0/2] Introduce unlocked version of igrab Date: Mon, 28 Mar 2011 14:55:59 +1300 Message-ID: <1301277361-9453-1-git-send-email-ryan@bluewatersys.com> Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Ryan Mallon To: viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org, dchinner-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org Return-path: Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org Commit 250df6ed274d767da844a5d9f05720b804240197 "fs: protect inode->i_state with inode->i_lock" introduces a change to igrab to acquire inode->i_lock. This change causes a panic on boot on my ARM EP93xx board when the rootfs uses NFS. The problem occurs because nfs_inode_add_request acquires inode->i_lock and then calls igrab, resulting in the following panic: BUG: spinlock recursion on CPU#0, getty/262 lock: cc421cb4, .magic: dead4ead, .owner: getty/262, .owner_cpu: 0 [] (unwind_backtrace+0x0/0xe4) from [] (do_raw_spin_lock+0x40/0x13c) [] (do_raw_spin_lock+0x40/0x13c) from [] (igrab+0x14/0x48) [] (igrab+0x14/0x48) from [] (nfs_updatepage+0x2e0/0x524) [] (nfs_updatepage+0x2e0/0x524) from [] (nfs_write_end+0x23c/0x270) [] (nfs_write_end+0x23c/0x270) from [] (generic_file_buffered_write+0x180/0x248) [] (generic_file_buffered_write+0x180/0x248) from [] (__generic_file_aio_write+0x3b8/0x3f4) [] (__generic_file_aio_write+0x3b8/0x3f4) from [] (generic_file_aio_write+0x6c/0xdc) [] (generic_file_aio_write+0x6c/0xdc) from [] (nfs_file_write+0xec/0x178) [] (nfs_file_write+0xec/0x178) from [] (do_sync_write+0xa4/0xe4) [] (do_sync_write+0xa4/0xe4) from [] (vfs_write+0xb4/0x12c) [] (vfs_write+0xb4/0x12c) from [] (sys_write+0x3c/0x68) [] (sys_write+0x3c/0x68) from [] (ret_fast_syscall+0x0/0x2c) This series introduces a new function called __igrab, which is an unlocked version of igrab and modifies nfs_inode_add_request to use the unlocked version. Ryan Mallon (2): Add unlocked version of igrab. Use __igrab instead of igrab in nfs_inode_add_request fs/inode.c | 16 ++++++++++++---- fs/nfs/write.c | 2 +- include/linux/fs.h | 1 + 3 files changed, 14 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html