Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 29F0C84F5D for ; Sat, 29 Jul 2023 22:43:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id W98C7k9zmaz0 for ; Sat, 29 Jul 2023 22:43:56 +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 AE0C884E6B for ; Sat, 29 Jul 2023 22:43:56 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id A73FBFBDB; Sat, 29 Jul 2023 22:43:56 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sat, 29 Jul 2023 22:43:56 +0000 From: "Taylor R Campbell" Subject: CVS commit: src/sys/external/bsd/drm2/linux To: source-changes@NetBSD.org Approved: for-source-only Reply-To: riastradh@netbsd.org X-Mailer: log_accum Message-Id: <20230729224356.A73FBFBDB@cvs.NetBSD.org> Module Name: src Committed By: riastradh Date: Sat Jul 29 22:43:56 UTC 2023 Modified Files: src/sys/external/bsd/drm2/linux: linux_ww_mutex.c Log Message: drm/linux_ww_mutex: Fix wait loops. If cv_wait_sig returns because a signal is delivered, we may nonetheless have been granted the lock. It is harmless for us to ignore this fact in three of the four paths, but in ww_mutex_state_wait_sig, we may now have ownership of the lock and MUST NOT return failure because the caller MUST release the lock before destroying the ww_acquire_ctx. While here, restructure the other three loops for clarity, so they match the structure of the fourth and so they have a little less impenetrable negation. PR kern/57537 XXX pullup-8 XXX pullup-9 XXX pullup-10 To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/external/bsd/drm2/linux/linux_ww_mutex.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.