From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S272505AbTHAVpQ (ORCPT ); Fri, 1 Aug 2003 17:45:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S274957AbTHAVpQ (ORCPT ); Fri, 1 Aug 2003 17:45:16 -0400 Received: from hueytecuilhuitl.mtu.ru ([195.34.32.123]:49161 "EHLO hueymiccailhuitl.mtu.ru") by vger.kernel.org with ESMTP id S272505AbTHAVpB (ORCPT ); Fri, 1 Aug 2003 17:45:01 -0400 From: Andrey Borzenkov To: Rusty Russell Subject: [PATCH] 2.6: races between modprobe and depmod in rc.sysinit Date: Sat, 2 Aug 2003 01:22:55 +0400 User-Agent: KMail/1.5 Cc: linux-kernel@vger.kernel.org References: <20030801064916.46F842C2B9@lists.samba.org> In-Reply-To: <20030801064916.46F842C2B9@lists.samba.org> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_votK/+LqUjB7uHm" Message-Id: <200308020122.55169.arvidjaar@mail.ru> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org --Boundary-00=_votK/+LqUjB7uHm Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 01 August 2003 10:34, Rusty Russell wrote: > In message <200307312145.01711.arvidjaar@mail.ru> you write: > > the only reason I can imagine is that it hits depmod -A that runs in > > rc.sysinit and does > > > > truncate /lib/modules/`uname -r`/modules.* > > scan modules > > write files > > > > So, quesitons > > > > - would anybody (Rusty?) object if I change depmod to do > > build temp name > > move temp name into original > > No, that's definitely my preferred method anyway: please send patch. > Although I double this causes your problem here. > this does :) I have seen even more incredible races during boot recently. It affects other modules as well, like input loaded by hotplug triggered by USB load. depmod on current 2.6 takes some not negligible time. anyway here is patch against 0.9.13-pre that makes depmod output in temp file and rename it after. It fixed the problem for sure for me (like commenting out depmod in rc.sysinit did but most people seem to object to it). > > - Chmouel, Fred - is depmod on every boot really neccessary? When people > > install modules they are expected to run it actually ... > > People get it wrong, and you still want them to boot. Increasingly we > can live without depmod though: I might fix this in a near-future > version to live without it. > would be nice. -andrey --Boundary-00=_votK/+LqUjB7uHm Content-Type: application/x-bzip2; name="module-init-tools-0.9.13-tempfile.patch.bz2" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="module-init-tools-0.9.13-tempfile.patch.bz2" QlpoOTFBWSZTWcnQlSUAAzZfgHJwe////2+t2w6////6YAd/AKA3zuOncwAOhQB1CSQkTQaNMj1N AbRADTYU0aGgAA0ABomiY0mk0TQyGg00AAAAAAAAHGRpkxNBkyYTTIGQ0BoDTJoYATQGOMjTJiaD JkwmmQMhoDQGmTQwAmgMNpSaSNqND0Q0yHqAaAAGgAA0eoAASIhBGhoCNNTEEynp6p6mjT1PUaM1 DI00yemppvUl1kMBsDiOBBv3IYExEDhpNNkESgcOBsgglOREwEjlpkshjSlOHBCRMx7/qmtAKtJQ 4GNksCSIBpNIljGxjlkE7/OPz+MnZS6W7Orbbxf6Kzhs0X+vDS3cHv+7CTtKxjpY2qso5YpYQ6kM NmFq3TWfj5ZAzslCwsamIzSZg5pBLRpYFNMUJi+RB1IAYIN2ppMCdHgwWhttttttgT94HD8NiD43 0PtBfb8SNfuqesbWVkTSZmHDcolSyJFNiMrWjgmlvTTTXEsrQLE7BPScGmDMq1z0jzsUeq60dLpA /FpB92PLq4nUT7jiNbREQ4a8uKOLz89SzRS2yTdQLpN40jxLrFrwLwHt9/pKlMLui6QvZiRW4NTS 7PCKoKQBXQQaHPY7MbTHR0L90EvJZRYxKoLllT4brXVrcS23N7RE+q4CeyyavviQlZjf0AuTYjh+ dIUJOH+O9B/F0Aoxg3+y+9oGJtAWaCtAHMNBIL77oMYgFsj0IIxphj+V+534GCBiJjcIwoGFTe4d Gy0ztYSUNM8BbWINhGI1gAu/CAPO2crDw86oZhAb1ia7MJzgoqsoaUUECLUQlvRltoxQN1pWmTNB QIGwTCxxQIFb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