[{"id":629,"web_url":"http://patchwork.ozlabs.org/comment/629/","msgid":"<48CAC406.4060608@am.sony.com>","list_archive_url":null,"date":"2008-09-12T19:33:26","subject":"Re: [Cbe-oss-dev] [patch kexec] Fix test for loaded kernel","submitter":{"id":34,"url":"http://patchwork.ozlabs.org/api/people/34/","name":"Geoff Levand","email":"geoffrey.levand@am.sony.com"},"content":"Hi Simon,\n\nSorry, this does not work correctly.  Please ignore. \n\nGeoff Levand wrote:\n> Fix these reboot errors with NFS mounted root filesystems:\n> \n>   nfs: server 192.168.1.1 not responding, still trying\n> \n> The main kexec code that uses kexec_loaded() expects a non-zero \n> return to mean a kexec kernel has been loaded for execution.\n> Here is the current check:\n> \n> \tif ((result == 0) && (do_shutdown || do_exec) && !kexec_loaded())\n> \t\tdie\n> \n> In cases where the currently running kernel does not have kexec enabled,\n> or in cases where the distro init scripts (YDL, maybe others) have unmounted\n> the sys filesystem prior to running kexec, the open of\n> \"/sys/kernel/kexec_loaded\" will fail.  This result should be returned as\n> (0), meaning NOT LOADED.  The current kexec_loaded() code returns (-1),\n> meaning LOADED.\n\nUnfortunately, in the case where a kernel has been loaded, but the init\nscripts unmount sys_fs, my change will not allow the kexec to continue.\n\nThe only way to fix the NFS problem is to change the init scripts to\npass the -x option to kexec.\n\n-Geoff","headers":{"Return-Path":"<cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org>","X-Original-To":["patchwork@ozlabs.org","cbe-oss-dev@ozlabs.org"],"Delivered-To":["patchwork@ozlabs.org","cbe-oss-dev@ozlabs.org"],"Received":["from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id 5C661DDF4F\n\tfor <patchwork@ozlabs.org>; Sat, 13 Sep 2008 05:36:11 +1000 (EST)","from WA4EHSOBE003.bigfish.com (outbound-wa4.frontbridge.com\n\t[216.32.181.16]) by ozlabs.org (Postfix) with ESMTP id 30BD5DDEDA\n\tfor <cbe-oss-dev@ozlabs.org>; Sat, 13 Sep 2008 05:33:34 +1000 (EST)","from mail13-wa4-R.bigfish.com (10.8.14.245) by\n\tWA4EHSOBE003.bigfish.com (10.8.40.23) with Microsoft SMTP Server id\n\t8.1.291.1; Fri, 12 Sep 2008 19:33:31 +0000","from mail13-wa4 (localhost.localdomain [127.0.0.1])\tby\n\tmail13-wa4-R.bigfish.com (Postfix) with ESMTP id 075061660210;\n\tFri, 12 Sep 2008 19:33:31 +0000 (UTC)","by mail13-wa4 (MessageSwitch) id 1221248008747187_21245;\n\tFri, 12 Sep 2008 19:33:28 +0000 (UCT)","from mail8.fw-sd.sony.com (mail8.fw-sd.sony.com [160.33.66.75])\tby\n\tmail13-wa4.bigfish.com (Postfix) with ESMTP id 840B4F7804D;\n\tFri, 12 Sep 2008 19:33:28 +0000 (UTC)","from mail3.sjc.in.sel.sony.com (mail3.sjc.in.sel.sony.com\n\t[43.134.1.211])\tby mail8.fw-sd.sony.com (8.14.2/8.14.2) with ESMTP id\n\tm8CJXRDj014129;\tFri, 12 Sep 2008 19:33:28 GMT","from USSDIXIM01.am.sony.com (ussdixim01.am.sony.com\n\t[43.130.140.33])\n\tby mail3.sjc.in.sel.sony.com (8.12.11/8.12.11) with ESMTP id\n\tm8CJXR57013967; Fri, 12 Sep 2008 19:33:27 GMT","from ussdixms03.am.sony.com ([43.130.140.23]) by\n\tUSSDIXIM01.am.sony.com with Microsoft SMTPSVC(5.0.2195.6713);\n\tFri, 12 Sep 2008 12:33:27 -0700","from [192.168.1.10] ([43.135.148.226]) by ussdixms03.am.sony.com\n\twith Microsoft SMTPSVC(5.0.2195.6713); Fri, 12 Sep 2008 12:33:27 -0700"],"X-BigFish":"VPS-24(zz1432R98dR1805Mzz10d3izzz2fh6bh61h)","X-Spam-TCS-SCL":"0:0","Message-ID":"<48CAC406.4060608@am.sony.com>","Date":"Fri, 12 Sep 2008 12:33:26 -0700","From":"Geoff Levand <geoffrey.levand@am.sony.com>","User-Agent":"Thunderbird 2.0.0.16 (X11/20080723)","MIME-Version":"1.0","To":"Simon Horman <horms@verge.net.au>","References":"<48CABE27.10301@am.sony.com>","In-Reply-To":"<48CABE27.10301@am.sony.com>","X-Enigmail-Version":"0.95.7","X-OriginalArrivalTime":"12 Sep 2008 19:33:27.0113 (UTC)\n\tFILETIME=[6DB5DB90:01C9150E]","X-SEL-encryption-scan":"scanned","Cc":"kexec@lists.infradead.org,\n\tCell Broadband Engine OSS Development <cbe-oss-dev@ozlabs.org>","Subject":"Re: [Cbe-oss-dev] [patch kexec] Fix test for loaded kernel","X-BeenThere":"cbe-oss-dev@ozlabs.org","X-Mailman-Version":"2.1.11","Precedence":"list","List-Id":"Discussion about Open Source Software for the Cell Broadband Engine\n\t<cbe-oss-dev.ozlabs.org>","List-Unsubscribe":"<https://ozlabs.org/mailman/options/cbe-oss-dev>,\n\t<mailto:cbe-oss-dev-request@ozlabs.org?subject=unsubscribe>","List-Archive":"<http://ozlabs.org/pipermail/cbe-oss-dev>","List-Post":"<mailto:cbe-oss-dev@ozlabs.org>","List-Help":"<mailto:cbe-oss-dev-request@ozlabs.org?subject=help>","List-Subscribe":"<https://ozlabs.org/mailman/listinfo/cbe-oss-dev>,\n\t<mailto:cbe-oss-dev-request@ozlabs.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org","Errors-To":"cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org"}},{"id":666,"web_url":"http://patchwork.ozlabs.org/comment/666/","msgid":"<48CDFE50.8080003@in.ibm.com>","list_archive_url":null,"date":"2008-09-15T06:18:56","subject":"Re: [Cbe-oss-dev] [patch kexec] Fix test for loaded kernel","submitter":{"id":141,"url":"http://patchwork.ozlabs.org/api/people/141/","name":"Mohan Kumar M","email":"mohan@in.ibm.com"},"content":"Hi Geoff,\n\n> \n> The only way to fix the NFS problem is to change the init scripts to\n> pass the -x option to kexec.\n\nCan we simply call ifup (that function does not exist now) to bring up \nthe network interface while returning from main() in kexec.c? This will \nbe executed only if kexec'ing a kernel fails.\n\nRegards,\nMohan.","headers":{"Return-Path":"<cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org>","X-Original-To":["patchwork@ozlabs.org","cbe-oss-dev@ozlabs.org"],"Delivered-To":["patchwork@ozlabs.org","cbe-oss-dev@ozlabs.org"],"Received":["from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id 25C22DE14D\n\tfor <patchwork@ozlabs.org>; Mon, 15 Sep 2008 16:28:38 +1000 (EST)","from e4.ny.us.ibm.com (e4.ny.us.ibm.com [32.97.182.144])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(Client CN \"e4.ny.us.ibm.com\", Issuer \"Equifax\" (verified OK))\n\tby ozlabs.org (Postfix) with ESMTPS id E0197DDDEF\n\tfor <cbe-oss-dev@ozlabs.org>; Mon, 15 Sep 2008 16:19:43 +1000 (EST)","from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236])\n\tby e4.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id m8F6JdWY003313\n\tfor <cbe-oss-dev@ozlabs.org>; Mon, 15 Sep 2008 02:19:39 -0400","from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216])\n\tby d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id\n\tm8F6JdHe238444\n\tfor <cbe-oss-dev@ozlabs.org>; Mon, 15 Sep 2008 02:19:39 -0400","from d01av02.pok.ibm.com (loopback [127.0.0.1])\n\tby d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id\n\tm8F6JcuI024896\n\tfor <cbe-oss-dev@ozlabs.org>; Mon, 15 Sep 2008 02:19:38 -0400","from explorer.in.ibm.com (explorer.in.ibm.com [9.124.31.23] (may be\n\tforged))\n\tby d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id\n\tm8F6Jaeo024003; Mon, 15 Sep 2008 02:19:36 -0400"],"Message-ID":"<48CDFE50.8080003@in.ibm.com>","Date":"Mon, 15 Sep 2008 11:48:56 +0530","From":"Mohan Kumar M <mohan@in.ibm.com>","User-Agent":"Thunderbird 2.0.0.16 (X11/20080723)","MIME-Version":"1.0","To":"Geoff Levand <geoffrey.levand@am.sony.com>","References":"<48CABE27.10301@am.sony.com> <48CAC406.4060608@am.sony.com>","In-Reply-To":"<48CAC406.4060608@am.sony.com>","X-Mailman-Approved-At":"Mon, 15 Sep 2008 16:28:28 +1000","Cc":"Simon Horman <horms@verge.net.au>, kexec@lists.infradead.org,\n\tCell Broadband Engine OSS Development <cbe-oss-dev@ozlabs.org>","Subject":"Re: [Cbe-oss-dev] [patch kexec] Fix test for loaded kernel","X-BeenThere":"cbe-oss-dev@ozlabs.org","X-Mailman-Version":"2.1.11","Precedence":"list","List-Id":"Discussion about Open Source Software for the Cell Broadband Engine\n\t<cbe-oss-dev.ozlabs.org>","List-Unsubscribe":"<https://ozlabs.org/mailman/options/cbe-oss-dev>,\n\t<mailto:cbe-oss-dev-request@ozlabs.org?subject=unsubscribe>","List-Archive":"<http://ozlabs.org/pipermail/cbe-oss-dev>","List-Post":"<mailto:cbe-oss-dev@ozlabs.org>","List-Help":"<mailto:cbe-oss-dev-request@ozlabs.org?subject=help>","List-Subscribe":"<https://ozlabs.org/mailman/listinfo/cbe-oss-dev>,\n\t<mailto:cbe-oss-dev-request@ozlabs.org?subject=subscribe>","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Sender":"cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org","Errors-To":"cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org"}},{"id":667,"web_url":"http://patchwork.ozlabs.org/comment/667/","msgid":"<20080915070328.GC3160@verge.net.au>","list_archive_url":null,"date":"2008-09-15T07:03:29","subject":"Re: [Cbe-oss-dev] [patch kexec] Fix test for loaded kernel","submitter":{"id":106,"url":"http://patchwork.ozlabs.org/api/people/106/","name":"Simon Horman","email":"horms@verge.net.au"},"content":"On Mon, Sep 15, 2008 at 11:48:56AM +0530, Mohan Kumar M wrote:\n> Hi Geoff,\n>\n>>\n>> The only way to fix the NFS problem is to change the init scripts to\n>> pass the -x option to kexec.\n>\n> Can we simply call ifup (that function does not exist now) to bring up  \n> the network interface while returning from main() in kexec.c? This will  \n> be executed only if kexec'ing a kernel fails.\n\nGood greif, that ifdown() stuff seems horrible. I wonder what the\nmotivation for it is/was.","headers":{"Return-Path":"<cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org>","X-Original-To":["patchwork@ozlabs.org","cbe-oss-dev@ozlabs.org"],"Delivered-To":["patchwork@ozlabs.org","cbe-oss-dev@ozlabs.org"],"Received":["from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id 11F05DE239\n\tfor <patchwork@ozlabs.org>; Mon, 15 Sep 2008 17:03:44 +1000 (EST)","from kirsty.vergenet.net (kirsty.vergenet.net [202.4.237.240])\n\tby ozlabs.org (Postfix) with ESMTP id 7E9B7DE073\n\tfor <cbe-oss-dev@ozlabs.org>; Mon, 15 Sep 2008 17:03:31 +1000 (EST)","from yukiko.kent.sydney.vergenet.net\n\t(124-170-140-23.dyn.iinet.net.au [124.170.140.23])\n\tby kirsty.vergenet.net (Postfix) with ESMTP id E229724092;\n\tMon, 15 Sep 2008 17:03:29 +1000 (EST)","by yukiko.kent.sydney.vergenet.net (Postfix, from userid 7100)\n\tid AAD167E02; Mon, 15 Sep 2008 17:03:29 +1000 (EST)"],"Date":"Mon, 15 Sep 2008 17:03:29 +1000","From":"Simon Horman <horms@verge.net.au>","To":"Mohan Kumar M <mohan@in.ibm.com>","Message-ID":"<20080915070328.GC3160@verge.net.au>","References":"<48CABE27.10301@am.sony.com> <48CAC406.4060608@am.sony.com>\n\t<48CDFE50.8080003@in.ibm.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<48CDFE50.8080003@in.ibm.com>","User-Agent":"Mutt/1.5.18 (2008-05-17)","Cc":"kexec@lists.infradead.org,\n\tCell Broadband Engine OSS Development <cbe-oss-dev@ozlabs.org>","Subject":"Re: [Cbe-oss-dev] [patch kexec] Fix test for loaded kernel","X-BeenThere":"cbe-oss-dev@ozlabs.org","X-Mailman-Version":"2.1.11","Precedence":"list","List-Id":"Discussion about Open Source Software for the Cell Broadband Engine\n\t<cbe-oss-dev.ozlabs.org>","List-Unsubscribe":"<https://ozlabs.org/mailman/options/cbe-oss-dev>,\n\t<mailto:cbe-oss-dev-request@ozlabs.org?subject=unsubscribe>","List-Archive":"<http://ozlabs.org/pipermail/cbe-oss-dev>","List-Post":"<mailto:cbe-oss-dev@ozlabs.org>","List-Help":"<mailto:cbe-oss-dev-request@ozlabs.org?subject=help>","List-Subscribe":"<https://ozlabs.org/mailman/listinfo/cbe-oss-dev>,\n\t<mailto:cbe-oss-dev-request@ozlabs.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org","Errors-To":"cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org"}}]