From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 30709372042; Wed, 1 Jul 2026 16:36:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782923767; cv=none; b=YHdPHLL8OQUiYn74230xF7EulrZ4/EW1SU9SN+Dj/v43XAkeRGBuMYnFXIm8MBVTAS8PiecrYzFhc3obN41zr/pHLHslbsDXqd1BCSad6GOwYDLJJsIybOGHn6YD0Rv0Ku9g2PUXXSixNTqfZc6qVF/lY0qUHUZkettthIMQFJk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782923767; c=relaxed/simple; bh=CroDMHHmiIQyna0VCr/XtFwno+upP7Q2YV/zU8bejh8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=jaEhCaQo2scCGWJ85IJqT0y4WVjv0V5HEDJcWrL3lYaCknyeoRMbyg4AuT7QEW+gu1KTIc78PVG8n9hMpRmy9WyBlsZp5/IFiQfKs6wUOg/Bvm6tWxBnkZXOPWrY+bzGY51RSTRHupp3q4lMZJFLAFoyRIDTmu4uUp9WCwQmRAc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=bleQLgTr; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=xOfj7SO5; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bleQLgTr"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xOfj7SO5" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1782923762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=rUTUUgOylEJnjpHRy1A8ekyG049f1No/xJYdiwGlZcE=; b=bleQLgTrGeFx/D60sT7TK56L6eDCCeklZS153G7xhlf1vq6xYzZG+cujkWDi8VRU/OPUYu aL4JG50tGePOK42H4iPs8psejwyKuoG67W0xyHqYjvB+fjOCruy/Y2v2f5GNocV4hnxHWu 8pvStidTIKn0XlEdOOvw+0bajGltPBWYnd/X9+M509FJ2zxsmS9YRrzsdZmtGyfELafiHv aVxbDlqom92Qp9CfGp3CxcTIbibkFMdYU3QplXrOJ8w2qcfcpOSaMeSX5voHGPU8Vvqqj3 GPRISMI8OyaiFIk1VYHEokDtX7FaNZbEavl2/FQhieHc6lOhEHZXVktVp8DqFw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1782923762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=rUTUUgOylEJnjpHRy1A8ekyG049f1No/xJYdiwGlZcE=; b=xOfj7SO5mTVldqoNKtg1NhWXMTkcvrO73aYM0C44x4EQAXu6DkqY6Yr/g6epcK9bhanbj0 IVonhdpo1+pOMQDw== To: Kuniyuki Iwashima , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev Cc: Nam Cao Subject: [PATCH 0/2] af_unix: Fix priority inversion issue Date: Wed, 1 Jul 2026 18:35:52 +0200 Message-ID: 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 Hi, While auditing AF_UNIX sockets, I noticed that the sendmsg() code paths may block on the garbage collector running as workqueue. This can cause priority inversion and latency for real-time users. The implementation does kindly avoid blocking "sane users". However, it is impossible to tell whether the kernel's definition of "sane users" accurately describes all users out there. Digging into history and figuring out the reasons why sendmsg() needs to wait for garbage collector, it is determined that those reasons no longer apply. The first patch remove that block, and the second patch is a simple post cleanup. Nam Cao (2): af_unix: Do not wait for garbage collector in sendmsg() af_unix: Clean up unix_schedule_gc() net/unix/af_unix.c | 2 +- net/unix/af_unix.h | 2 +- net/unix/garbage.c | 16 +--------------- 3 files changed, 3 insertions(+), 17 deletions(-) --=20 2.47.3