Received: by mail.netbsd.org (Postfix, from userid 605) id D0C0C84DCE; Sun, 17 Dec 2017 21:57:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 59B6784DA0 for ; Sun, 17 Dec 2017 21:57:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 8qOTM6fmHkk1 for ; Sun, 17 Dec 2017 21:57:12 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id F1CCE84CFB for ; Sun, 17 Dec 2017 21:57:11 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id EBEA5FB40; Sun, 17 Dec 2017 21:57:11 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sun, 17 Dec 2017 21:57:11 +0000 From: "Paul Goyette" Subject: CVS commit: src/sys/dev/pad To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20171217215711.EBEA5FB40@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Paul Goyette" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: pgoyette Date: Sun Dec 17 21:57:11 UTC 2017 Modified Files: src/sys/dev/pad: pad.c Log Message: If config_fini_component() fails (due to device driver busy), don't discard its error value when re-attaching the devsw. If the devsw is successfully re-attached and we return success, the module will get detached anyway. And, since the device is actually busy, we'll eventually panic. Thanks to nat@ for providing the reproduction instructions. XXX A driver-busy condition will currently still trigger the error XXX message from config_fini_component() XXX configure: attachment `pad' of `pad' driver fini failed: 16 XXX This will be addresses separately by having pad maintain its own XXX ref-count and not relying on config_fini_component() to detect XXX the busy state. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pad/pad.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.