From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 008A519E7F7 for ; Mon, 24 Aug 2026 08:04:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787558695; cv=none; b=ifjq3c5XTAYFtDtU7FhXp6wz7bNW4BMNoDlVQrNsz2hu6kfFNqXNyjAEdBGFVtauW+Q4MOdJaM+jC/7FFcjTDxuzB2n/OZyBoimgvltOgMApwJ9PLRewTcLDC66Y86onPg2TN3deUoEee+Qxp9k7Q5J3De0kPp1mZ33rrDgiP+Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787558695; c=relaxed/simple; bh=yrjrkPX4nciqFDfP2dUxXGxnWOr9r4KSYDmajQFrOP0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=oip9LmWvul/TEMnH0LOT0FM0foDCzBZT4OJygZNjQhXzrOZi0s7TLWbgtmcR3eISFZXpnah8P1htQZiZ4Pns/oJto3wH3rAT2xiOYcj0U/zkjw5pEcfl0x25roPupwlM2W8VhXPmilTguuXlz1GkKBAd4z0DCXwGjbLANtHrv18= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Wbqum93C; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Wbqum93C" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFCEE1F000E9; Mon, 24 Aug 2026 08:04:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787558693; bh=kXo/VKimNKFjaSvlDV6kxQlKwxgv1vRfGIo20ZbGuaA=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=Wbqum93CXgkT/bopipWC4x2Nmj5fUpivl6UeeavfkFI5N5KqAH9LzN3hHkh/mZXOk yrvr6WDQJI8zEYTVw71pJJpNzTMBIV2+OtpPgOmuIasWSdVFkbOlhp1l5cfcPyNz6E NkK5KuDQ6X1IpOFhKDkfdCtVw1zRJrdt08cM0gG0ujSFJPquvAJIJBnHhMgmmk0pWz LWzWfeF146Ekx+Ma0+QEDv5ZBZhz5xG1CS8L/oxGlUG/4QysSQ2BmtyeDDO5lh8/oB rmdDO42uA1+tYFSzsrSqt/tOgWnqzytw9+yqkjk6BYj07/WzFDOaajB4w7Ef+9O2tp 9HE9uYKXBWgMQ== From: Thomas Gleixner To: Hyunwoo Kim , oleg@redhat.com, frederic@kernel.org, brauner@kernel.org, peterz@infradead.org, anna-maria@linutronix.de, ebiederm@xmission.com Cc: linux-kernel@vger.kernel.org, imv4bel@gmail.com Subject: Re: [PATCH] signal: Use list_del_init_careful() in flush_sigqueue() In-Reply-To: References: Date: Mon, 24 Aug 2026 10:04:50 +0200 Message-ID: <875x10hrkt.ffs@fw13> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Sat, Aug 22 2026 at 14:37, Hyunwoo Kim wrote: > diff --git a/kernel/signal.c b/kernel/signal.c > index bbc0fd4cc4d7c1..ec9a0a0490d19f 100644 > --- a/kernel/signal.c > +++ b/kernel/signal.c > @@ -482,7 +482,11 @@ void flush_sigqueue(struct sigpending *queue) > sigemptyset(&queue->signal); > while (!list_empty(&queue->list)) { > q = list_entry(queue->list.next, struct sigqueue , list); > - list_del_init(&q->list); > + /* > + * Pairs with the list_empty() in posixtimer_send_sigqueue(). No. That list_empty() would need to be changed to list_empty_careful() to be correct on weakly ordered architectures. Aside of that I'm not convinced that this is the right way to handle this as it cures the symptom and not the underlying problem. Let me stare at this some more. Thanks, tglx