Authentication-Results: name.execsw.org; dkim=pass (1024-bit key) header.d=netbsd.org header.i=@netbsd.org header.b=YngTFJ5y; dkim=fail reason="signature verification failed" (1024-bit key) header.d=netbsd.org header.i=@netbsd.org header.b=KD05B4/m Received: by mail.netbsd.org (Postfix, from userid 605) id 86B9884F40; Thu, 18 Apr 2024 18:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org; s=20240131; t=1713464673; bh=z2QRS1ctWq1CNsTagtBrPIlhxCPEI0S4laV3E431+DY=; h=Date:From:Subject:To:List-Id:Reply-To:List-Unsubscribe; b=YngTFJ5yuL9XuAqXRQqHoEK+N17oqxRA1L3c3gmVOBOY9Y2j/0H/VBa0zMxwMZkzT SD4dQK6JxbsMKgjOMuAPLV7QyljZ/zQ3V7ZMxmQ30jen2+LH7QexcLO5VRnU43YBc3 e6toqHwev498OetDCsGfBjntjl6u+O7rjipZBCKY= Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 69F6084F44 for ; Thu, 18 Apr 2024 18:24:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id VY3XyWGx5ZFe for ; Thu, 18 Apr 2024 18:24:32 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id EDBB184CE2 for ; Thu, 18 Apr 2024 18:24:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org; s=20240131; t=1713464672; bh=z2QRS1ctWq1CNsTagtBrPIlhxCPEI0S4laV3E431+DY=; h=Date:From:Subject:To:Reply-To; b=KD05B4/mVQsbZjFS0Z6NiPKVLaHJiMfONgjAS8aLeYKu15J+/td0LoyVJhMpJMIsA CEETuio5bphwBKYBcp/UkUrby8TPkomUmOrK+mr9jjf/4DfxbHKq0Vot+XQ2hd0g/h cQEzSAk5OpA0d8kA8DDkQnUOKNFeixOhvkqxCnqU= Received: by cvs.NetBSD.org (Postfix, from userid 500) id E59FBFA2C; Thu, 18 Apr 2024 18:24:31 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Thu, 18 Apr 2024 18:24:31 +0000 From: "Martin Husemann" Subject: CVS commit: [netbsd-10] src/sys/dev To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20240418182431.E59FBFA2C@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Martin Husemann" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: martin Date: Thu Apr 18 18:24:31 UTC 2024 Modified Files: src/sys/dev [netbsd-10]: ccd.c Log Message: Pull up following revision(s) (requested by hannken in ticket #669): sys/dev/ccd.c: revision 1.190 Using a ccd(4) with GPT (dk* at ccd*) the disk framework will call ccdstrategy() -> ccdstart() -> ccdbuffer() from softint context. Allocating the buffer with PR_WAITOK here is forbidden. Change ccdstart() / ccdbuffer() to report failure back to caller and pass PR_WAITOK / PR_NOWAIT as an additional argument. Call ccdstart() with PR_NOPWAIT from ccdstrategy() and on error defer to the kthread. Call ccdstart() with PR_WAITOK from kthread so requests from kthread always succeed to allocate the buffers. Remove the (non working) throttling on low memory as it is no longer needed. Fixes PR kern/58043 "kernel crash in assert_sleepable() in -current, dk(4) driver?" To generate a diff of this commit: cvs rdiff -u -r1.189 -r1.189.4.1 src/sys/dev/ccd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.