From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o57.zoho.eu (sender-of-o57.zoho.eu [136.143.169.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2FF438CFFB for ; Sat, 14 Mar 2026 23:50:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773532256; cv=pass; b=Bm7pl27Dk9B4396aoJYl55neG/CmQtEI4tG+rldqQQCbZ2xpea2Kiu9r8NVspkGjKL/BFVPnVvlMoaDdjPADz6AHcX1EslxP2CfgqlvNLU1KXSaNycQj9bbIRPhLNRV7bNS/+smJbjqDtrZK4dP1dCNhpM3SA7m58TVWeUy5qgI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773532256; c=relaxed/simple; bh=HDWfHxH2zI4fJwu2rlnGGnYTKmy2HwupsW1My5kpJUg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oNAWHWbFNtnDr7GcV8VdmwlAfLu/RrcV9L7NSXDjcnNl+2lRyjCOnh6qZ4jC/nusAf7y/bWWVFhErF6hVj9IszpUn2hL6ymYttEGvMd43ziIRoCTWQ5xepcBiIgxQuCFeEb3QuY1B+GJTuyQj+GCtvvvzQSkJpLnRNrNeMReD5M= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=nyQKCn47; arc=pass smtp.client-ip=136.143.169.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="nyQKCn47" ARC-Seal: i=1; a=rsa-sha256; t=1773532247; cv=none; d=zohomail.eu; s=zohoarc; b=bYH148mkEXzpHD5wibzLG2tcSM5hS7/ejbtRiI+p8MHrp1hisp+JrKORkQkvMn/j5Kijz3PtM9QowENUzfKCfo0oJuTKIoyxHWA+ZN9kvAqP2ewvxAmSmhgEy2H4cB7PaqAFaxMpqPo6NbpT4n1f3GQPNbMBA/kFFbzgu1up6Ic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773532247; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=utH2CJruXBa0wmELa4vzEbNYAlzzH97hfuKsfsnnNdc=; b=ZiSZqZ52NA7jAJsVUBIVMu+Y/iC3WZuB7TnoOwcTQfuoEQoBfkhZssjzKcONZe0v3BKfnhOOqZP2apnxgGNZ8he8l3GK4bw85biCDEBfE36cDGmZMzQdGcfAjn35ZrmSPwRNMUW51ZtFqJLKKhBAhqYqSDJ+9A9hnx0oZwNRSdY= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773532247; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=utH2CJruXBa0wmELa4vzEbNYAlzzH97hfuKsfsnnNdc=; b=nyQKCn47Q4MelQql4rOx3Uz2c9ojmkJ1wUHhzrIDPnVq5wB+exjV0pZsr10g7dik CAg8VS7JQUkj7DBydlW77pTwLoH1UXhIvy+v0udOA5flQ1ZFOFUu863KPlXO/2WC4Hi cZm6IlgXYKAQ+CErl2lfps1Rdt0ojRMNmxBwI7/4= Received: by mx.zoho.eu with SMTPS id 1773532244579235.23364523214184; Sun, 15 Mar 2026 00:50:44 +0100 (CET) From: Josh Law To: NeilBrown , Andrew Morton Cc: Chuck Lever , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] lib/lwq: fix potential kthread_stop() hang in test Date: Sat, 14 Mar 2026 23:50:41 +0000 Message-Id: <20260314235042.189833-2-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314235042.189833-1-objecting@objecting.org> References: <20260314235042.189833-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" From: Josh Law Check kthread_should_stop() in lwq_exercise()'s wait_var_event() so the thread can exit cleanly when kthread_stop() is called while the queue is empty. Signed-off-by: Josh Law --- lib/lwq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/lwq.c b/lib/lwq.c index c1e11ba6f254..1fd2ed612c75 100644 --- a/lib/lwq.c +++ b/lib/lwq.c @@ -86,7 +86,10 @@ static int lwq_exercise(void *qv) struct tnode *t; =20 for (cnt =3D 0; cnt < 10000; cnt++) { - wait_var_event(q, (t =3D lwq_dequeue(q, struct tnode, n)) !=3D NULL); + wait_var_event(q, (t =3D lwq_dequeue(q, struct tnode, n)) !=3D NULL || + kthread_should_stop()); + if (!t) + break; t->c++; if (lwq_enqueue(&t->n, q)) wake_up_var(q); --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o57.zoho.eu (sender-of-o57.zoho.eu [136.143.169.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2F6F38CFF8 for ; Sat, 14 Mar 2026 23:50:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773532255; cv=pass; b=bmTBMp/TOZeqgiM2D+odIngLlR/IMLMyC/ZJ2duxFox//b6ewlX1UrG6cM2u9KGvpjvVekTYYxkDQXR0ygPa1Xm3zwaOEhpW9SyD0DasfF38p90VJT5dBc2w+VXtHaoOO52z0owA6Kj/am2k8j7SSkTsuxKbkZ15GJz6ielUC3I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773532255; c=relaxed/simple; bh=V8l5ThSZkZupn29m2Qj3aKRxe+sAvRi8k6z8V/0UDgw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=H9JfQucsl3tuncSroUqz+0uTGWHkxupvJ8yo7SWWA+/dGU0usBwd5utVvxZzYf8CYi6jhqd0gSoDTbAvlexb1A7UNpu55IIX+qrgna+SdtMnD1VWkBMN/8f8MO2Q4WL7+3jfEyZMQ+pbmz2NgVmkue3anbwOUruGGq4y0plj9eg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=agWFNrm4; arc=pass smtp.client-ip=136.143.169.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="agWFNrm4" ARC-Seal: i=1; a=rsa-sha256; t=1773532247; cv=none; d=zohomail.eu; s=zohoarc; b=B5dGXlLOyUKYzAZqM0ateQ7SROmochuEmYg6WKzCZjMir6g10i593e0B4RFG37ZsTTPdVO1JhmoELSrhHdHiyKtnMyzuc4b7fI0TnV8qMTG91CdklV4Ulkrl0gLo18ZgTwjqu0OLV1ol64ZyiTioxNSUK2o8v+1RAsklRXEH4MA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773532247; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=HejGri6FdvgNBJAukqHKlTno36GpiEINbeGb+IZqJXk=; b=fXI4z5HR3yk45IZXJiggH32RpMJsvmxsIYNVe4EWGxVaYZ35hOLoMcMzUxyOLz5Y1AZ1/LiKE3zvNFhdtYmOr3qz8OuMa9pwH3rka7jnJuClrGOQ9/nvcfzEFN+yhHHM1Ecm5iCbd9WSeTykxwyKQn3bRGHLbQlApkaMFlLJn2I= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773532247; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=HejGri6FdvgNBJAukqHKlTno36GpiEINbeGb+IZqJXk=; b=agWFNrm4B7AnKi+YmuDJTkrgfrHTS9aKz7E796n071FkE4FCGtd9t+OqhKnjpZYe J5Y0wkHGIoqVZ+dtcophWjxCFN38k8dZtByTRYkhoJeeJDfYw+v4nP1vYGBy6BQgxTu w6P3WTn62DhKTXw7CVqZmBBFheiPNI0h43ozf+ek= Received: by mx.zoho.eu with SMTPS id 1773532245151981.2072667966981; Sun, 15 Mar 2026 00:50:45 +0100 (CET) From: Josh Law To: NeilBrown , Andrew Morton Cc: Chuck Lever , linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] lib/lwq: add missing module_exit for test module Date: Sat, 14 Mar 2026 23:50:42 +0000 Message-Id: <20260314235042.189833-3-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314235042.189833-1-objecting@objecting.org> References: <20260314235042.189833-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" From: Josh Law module_init(lwq_test) is declared without a corresponding module_exit, preventing the module from being unloaded when built as a module. Add an empty module_exit handler. Signed-off-by: Josh Law --- lib/lwq.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/lwq.c b/lib/lwq.c index 1fd2ed612c75..cf4d174d6898 100644 --- a/lib/lwq.c +++ b/lib/lwq.c @@ -157,5 +157,10 @@ static int lwq_test(void) return 0; } =20 +static void lwq_test_exit(void) +{ +} + module_init(lwq_test); +module_exit(lwq_test_exit); #endif /* CONFIG_LWQ_TEST*/ --=20 2.34.1