Received: with ECARTIS (v1.0.0; list linux-xfs); Sun, 29 Jun 2003 23:20:30 -0700 (PDT) Received: from rj.sgi.com (rj.SGI.COM [192.82.208.96]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5U6KP2x025051 for ; Sun, 29 Jun 2003 23:20:26 -0700 Received: from sherman.melbourne.sgi.com (sherman.melbourne.sgi.com [134.14.54.232]) by rj.sgi.com (8.12.9/8.12.2/linux-outbound_gateway-1.2) with ESMTP id h5U6JtWr019174 for ; Sun, 29 Jun 2003 23:19:55 -0700 Received: (from kaos@localhost) by sherman.melbourne.sgi.com (8.11.6/8.11.6) id h5U6JIv06741; Mon, 30 Jun 2003 16:19:18 +1000 Date: Mon, 30 Jun 2003 16:19:18 +1000 From: Keith Owens Message-Id: <200306300619.h5U6JIv06741@sherman.melbourne.sgi.com> Subject: TAKE - Correct i386 backtrace on out of line lock code using jmp disp8 to get back to mainline X-archive-position: 4503 X-ecartis-version: Ecartis v1.0.0 Sender: linux-xfs-bounce@oss.sgi.com Errors-to: linux-xfs-bounce@oss.sgi.com X-original-sender: kaos@sherman.melbourne.sgi.com Precedence: bulk X-list: linux-xfs When backtracing through i386 out of line lock code, any code that used jmp disp8 to get back to the mainline code resulted in an incorrect calculation for the new eip due to incorrect sign extension, which in turn messes up the backtrace. AFAICT it is only the XFS pagebuf lock code that hit this special case. --- /usr/tmp/TmpDir.6202-0/linux/arch/i386/kdb/kdba_bt.c_1.21 Mon Jun 30 16:11:16 2003 +++ linux/arch/i386/kdb/kdba_bt.c Mon Jun 30 16:11:03 2003 @@ -268,7 +268,7 @@ kdb_di.fprintf_func = save_fprintf_func; if (offsize) { - realeip += 1 + offsize + offset; + realeip += 1 + offsize + (offsize == 1 ? (s8)offset : (s32)(offset)); if (kdbnearsym(realeip, &lock_symtab)) { /* Print the stext entry without args */ bt_print_one(eip, NOBP, &ar, &symtab, 0); Date: Sun Jun 29 23:16:04 PDT 2003 Workarea: sherman.melbourne.sgi.com:/build/kaos/2.4.x-xfs The following file(s) were checked into: bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs Modid: 2.4.x-xfs:slinx:152253a linux/arch/i386/kdb/kdba_bt.c - 1.22