From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 6D98F2D839C for ; Sat, 2 May 2026 14:13:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777731204; cv=none; b=BfjVGNoFd1+pvzTdVncOXf7NyEaLDzQMin1XgSDexM92lQZGD2fTDQz/8eGSpsHcGc2scbpUhbl+0YjqLvqCUo+lQs0X6G5cppRkPnJnPqbMTaP+HyZkD8aRJqfwYjdfhHjbAwLzdypbb8ja+6M94+BF/XMi/O5QUapFBK7ggpQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777731204; c=relaxed/simple; bh=Mh2HxJJCTb0yoNCaGRhpLA2Dx4aIYrqicH676l6BEU8=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=KyfJyef5xYtaB2iat4o1isp/7ufLlrmDBlckbYmB7nMpQerRn468NJQhkjNj5hfsb3/Azw6iyEw8irzfLlUFiT6kyOCZDg7qX/Xnpg+kEA4oq8gmSQt/SdrUZFJFvkI6hATD8vBcwRC6hxrLO+ME47Hz17vhqWRHok51RkfkUWM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Gweo1UEe; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Gweo1UEe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777731202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=ePf/Q09j9dMfzVgCi9b+HSXcBTtZuuOkyEU64BM/H8I=; b=Gweo1UEex3pQRBckBjgp0OtRhZE+dg/rekjif2z3jTXK004FKI4P9MNkEL2oHMEX4JXOhz tVQReH/7qGSMypqup8P6EQpUI4pxz8eZyjfJm3OYhYBURgg/INfs0Tj5pET5xqraTX3eoF fdXwOOXRl85auguEOl7saCPj/QVBurA= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-16-DcG4X4HHPxai1IZ9MnSblQ-1; Sat, 02 May 2026 10:13:19 -0400 X-MC-Unique: DcG4X4HHPxai1IZ9MnSblQ-1 X-Mimecast-MFC-AGG-ID: DcG4X4HHPxai1IZ9MnSblQ_1777731197 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4347619560B4; Sat, 2 May 2026 14:13:17 +0000 (UTC) Received: from fedora (unknown [10.44.48.11]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id F2BE230001A1; Sat, 2 May 2026 14:13:12 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sat, 2 May 2026 16:13:17 +0200 (CEST) Date: Sat, 2 May 2026 16:13:12 +0200 From: Oleg Nesterov To: Andrew Morton Cc: Andy Lutomirski , Kees Cook , Kusaram Devineni , Peter Zijlstra , Thomas Gleixner , Will Drewry , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] signal: change force_sig_info_to_task() to call __send_signal_locked() Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 force_sig_info_to_task() calls send_signal_locked() but this is pointless; info is always valid and has_si_pid_and_uid(info) should never be true. Forced signals do not carry si_pid/si_uid, not to mention that info.si_pid overlaps with .si_addr/si_call_addr/etc. Signed-off-by: Oleg Nesterov --- kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/signal.c b/kernel/signal.c index 9924489c43a5..75e277e24b52 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1317,7 +1317,7 @@ force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t, if (action->sa.sa_handler == SIG_DFL && (!t->ptrace || (handler == HANDLER_EXIT))) t->signal->flags &= ~SIGNAL_UNKILLABLE; - ret = send_signal_locked(sig, info, t, PIDTYPE_PID); + ret = __send_signal_locked(sig, info, t, PIDTYPE_PID, false); /* This can happen if the signal was already pending and blocked */ if (!task_sigpending(t)) signal_wake_up(t, 0); -- 2.52.0