From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3A13217C9A9; Thu, 15 Aug 2024 13:58:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723730294; cv=none; b=huGcSbcUw9/zqrtnfMvr3MuNgPhV9qJGIUOqyuWM9M9ARZuAsVhexA9zhm6zP7mZRWIcwojCYTAOcJazAmj7eDTob7y4VU8lsr2ASkbEwtWb+5I310hkOdLgJYJabdbsDnzrl1f2ApaX3Cq1xyUN3C2YIRC7F2WzNfZ3jmUn6gQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723730294; c=relaxed/simple; bh=XUiYSOqt2WkAfRHpBWsN1rju+NbyN5r+sXNqW24NfCs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uOqqzP56U0Nkkx5Di1azodmeqHMFA9bGqiFGAzDc/uVrUc9mvjRYluiU+U6+KNTKl3KzLt7lSkodzwtxseZaMIiv0xJVd1MqlrbQN8TChRUSVtpuQAisNKeIi/PTzBFL06a9JswEuyWUmrffNQI+raORDU9Xt6axskvX1M5tPzc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZtvFKVfF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ZtvFKVfF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C8A2C32786; Thu, 15 Aug 2024 13:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723730294; bh=XUiYSOqt2WkAfRHpBWsN1rju+NbyN5r+sXNqW24NfCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZtvFKVfFdfOTx1jy0xYucRDTrsJ6t4gINngDw9I0qZUzOpwBYhkWbquIsUUvzZU2y C3maBgj2BK6xoUck8HvoJme2cqXGqKtv0vVSxaP9jvbNyMT34E33+FgqH5PrOkzo/Y dRouLMP+GcxrdLu53qQqMtgIccg/9NsSrxXQ9vU0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, syzbot , Eric Dumazet , Kuniyuki Iwashima , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 362/484] net: linkwatch: use system_unbound_wq Date: Thu, 15 Aug 2024 15:23:40 +0200 Message-ID: <20240815131955.414590939@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240815131941.255804951@linuxfoundation.org> References: <20240815131941.255804951@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet [ Upstream commit 3e7917c0cdad835a5121520fc5686d954b7a61ab ] linkwatch_event() grabs possibly very contended RTNL mutex. system_wq is not suitable for such work. Inspired by many noisy syzbot reports. 3 locks held by kworker/0:7/5266: #0: ffff888015480948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff888015480948 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc90003f6fd00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] , at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffffffff8fa6f208 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xe/0x60 net/core/link_watch.c:276 Reported-by: syzbot Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20240805085821.1616528-1-edumazet@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/core/link_watch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/link_watch.c b/net/core/link_watch.c index 9599afd0862da..010b39f4a189b 100644 --- a/net/core/link_watch.c +++ b/net/core/link_watch.c @@ -138,9 +138,9 @@ static void linkwatch_schedule_work(int urgent) * override the existing timer. */ if (test_bit(LW_URGENT, &linkwatch_flags)) - mod_delayed_work(system_wq, &linkwatch_work, 0); + mod_delayed_work(system_unbound_wq, &linkwatch_work, 0); else - schedule_delayed_work(&linkwatch_work, delay); + queue_delayed_work(system_unbound_wq, &linkwatch_work, delay); } -- 2.43.0