Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758713AbYHDFLR (ORCPT ); Mon, 4 Aug 2008 01:11:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751972AbYHDFLI (ORCPT ); Mon, 4 Aug 2008 01:11:08 -0400 Received: from jenny.ondioline.org ([66.220.1.122]:47056 "EHLO jenny.ondioline.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751959AbYHDFLH (ORCPT ); Mon, 4 Aug 2008 01:11:07 -0400 From: Paul Collins To: Neil Brown Cc: "J. Bruce Fields" , linuxppc-dev@ozlabs.org, nfsv4@linux-nfs.org, linux-kernel@vger.kernel.org Subject: Re: nfsd, v4: oops in find_acceptable_alias, ppc32 Linux, post-2.6.27-rc1 References: <87tze38vzt.fsf@burly.wgtn.ondioline.org> <20080802184554.GB715@fieldses.org> <87abfvm4cc.fsf@burly.wgtn.ondioline.org> <877iayy4qc.fsf@burly.wgtn.ondioline.org> <18581.40960.737792.454035@notabene.brown> <87r696l1yo.fsf@burly.wgtn.ondioline.org> <18582.32935.501672.689845@notabene.brown> Date: Mon, 04 Aug 2008 17:11:05 +1200 In-Reply-To: <18582.32935.501672.689845@notabene.brown> (Neil Brown's message of "Mon, 4 Aug 2008 14:08:07 +1000") Message-ID: <87fxpll5zq.fsf@burly.wgtn.ondioline.org> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5762 Lines: 123 Neil Brown writes: > bctrl appears to be the indirect-function-call opcode. There are > three of them one each for > ->fh_to_dentry > acceptable > ->fh_to_parent > > 0xa8 is 'acceptable'. > > In the first traceback, the crash was a call from very early in > find_acceptable_alias, The first significant thing it does is call > the 'acceptable' function. > > So it seems clear that 'acceptable' is NULL. > It is equally clear that we never ever set it to NULL in the code. > The logical conclusion is "compiler error". > We can confirm (hopefully) by looking at a disassembly of fh_verify. > > Maybe because nfsd_acceptable is 'static' and never explicitly called, > gcc gets confused and optimises it away. Maybe a disassembly of > nfsd_acceptable would be informative ... particularly if it turns out > to be empty. Here's the disassembly. Dump of assembler code for function nfsd_acceptable: 0xc015f450 : mflr r0 0xc015f454 : stw r0,4(r1) 0xc015f458 : bl 0xc0013154 <_mcount> 0xc015f45c : stwu r1,-32(r1) 0xc015f460 : mflr r0 0xc015f464 : stmw r28,16(r1) 0xc015f468 : mr r28,r3 0xc015f46c : mr r31,r1 0xc015f470 : stw r0,36(r1) 0xc015f474 : li r30,1 0xc015f478 : lwz r0,24(r3) 0xc015f47c : mr r3,r4 0xc015f480 : andi. r9,r0,1024 0xc015f484 : bne- 0xc015f56c 0xc015f488 : cmpwi cr7,r4,0 0xc015f48c : beq- cr7,0xc015f4b0 0xc015f490 : lwz r0,0(r4) 0xc015f494 : cntlzw r0,r0 0xc015f498 : rlwinm r0,r0,27,5,31 0xc015f49c : twnei r0,0 0xc015f4a0 : lwarx r0,0,r4 0xc015f4a4 : addic r0,r0,1 0xc015f4a8 : stwcx. r0,0,r4 0xc015f4ac : bne- 0xc015f4a0 0xc015f4b0 : mr r29,r3 0xc015f4b4 : b 0xc015f508 0xc015f4b8 : beq- cr6,0xc015f4dc 0xc015f4bc : lwz r0,0(r30) 0xc015f4c0 : cntlzw r0,r0 0xc015f4c4 : rlwinm r0,r0,27,5,31 0xc015f4c8 : twnei r0,0 0xc015f4cc : lwarx r0,0,r30 0xc015f4d0 : addic r0,r0,1 0xc015f4d4 : stwcx. r0,0,r30 0xc015f4d8 : bne- 0xc015f4cc 0xc015f4dc : lwz r3,8(r30) 0xc015f4e0 : li r4,1 0xc015f4e4 : bl 0xc00b2f50 0xc015f4e8 : cmpwi cr7,r3,0 0xc015f4ec : mr r3,r29 0xc015f4f0 : bge+ cr7,0xc015f500 0xc015f4f4 : mr r3,r30 0xc015f4f8 : bl 0xc00befb0 0xc015f4fc : b 0xc015f524 0xc015f500 : bl 0xc00befb0 0xc015f504 : mr r29,r30 0xc015f508 : lwz r0,32(r28) 0xc015f50c : cmpw cr7,r29,r0 0xc015f510 : beq- cr7,0xc015f524 0xc015f514 : lwz r30,20(r29) 0xc015f518 : cmpw cr7,r29,r30 0xc015f51c : cmpwi cr6,r30,0 0xc015f520 : bne+ cr7,0xc015f4b8 0xc015f524 : lwz r0,32(r28) 0xc015f528 : cmpw cr7,r29,r0 0xc015f52c : beq- cr7,0xc015f554 0xc015f530 : lis r9,-16296 0xc015f534 : lwz r0,17792(r9) 0xc015f538 : andi. r9,r0,2 0xc015f53c : beq+ 0xc015f554 0xc015f540 : lis r3,-16309 0xc015f544 : lwz r5,32(r29) 0xc015f548 : mr r4,r29 0xc015f54c : addi r3,r3,7972 0xc015f550 : bl 0xc00330d4 0xc015f554 : lwz r0,32(r28) 0xc015f558 : mr r3,r29 0xc015f55c : xor r30,r29,r0 0xc015f560 : cntlzw r30,r30 0xc015f564 : rlwinm r30,r30,27,5,31 0xc015f568 : bl 0xc00befb0 0xc015f56c : lwz r11,0(r1) 0xc015f570 : mr r3,r30 0xc015f574 : lwz r0,4(r11) 0xc015f578 : lmw r28,-16(r11) 0xc015f57c : mr r1,r11 0xc015f580 : mtlr r0 0xc015f584 : blr End of assembler dump. > Could you try removing the 'static' declaration for nfsd_acceptable > and recompile? > Or maybe try a different compiler? I will give these a try this evening. -- Paul Collins Wellington, New Zealand Dag vijandelijk luchtschip de huismeester is dood -- 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/