Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031609AbbKEAwT (ORCPT ); Wed, 4 Nov 2015 19:52:19 -0500 Received: from mail-wi0-f180.google.com ([209.85.212.180]:33538 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031544AbbKEAwA (ORCPT ); Wed, 4 Nov 2015 19:52:00 -0500 From: "Amanieu d'Antras" To: linux-kernel@vger.kernel.org Cc: Oleg Nesterov , "Amanieu d'Antras" , Roland McGrath Subject: [PATCH v2 20/20] signal: Remove unnecessary zero-initialization of siginfo_t Date: Thu, 5 Nov 2015 00:50:39 +0000 Message-Id: <1446684640-4112-21-git-send-email-amanieu@gmail.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1446684640-4112-1-git-send-email-amanieu@gmail.com> References: <1446684640-4112-1-git-send-email-amanieu@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1530 Lines: 51 This is no longer required since copy_siginfo_from_user32 now initializes all siginfo_t fields properly. Signed-off-by: Amanieu d'Antras --- kernel/ptrace.c | 1 - kernel/signal.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 787320d..3aa383b 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -1147,7 +1147,6 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request, break; case PTRACE_SETSIGINFO: - memset(&siginfo, 0, sizeof siginfo); if (copy_siginfo_from_user32( &siginfo, (struct compat_siginfo __user *) datap)) ret = -EFAULT; diff --git a/kernel/signal.c b/kernel/signal.c index 873e8e2..ce992f2 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -3022,7 +3022,7 @@ COMPAT_SYSCALL_DEFINE3(rt_sigqueueinfo, int, sig, struct compat_siginfo __user *, uinfo) { - siginfo_t info = {}; + siginfo_t info; int ret = copy_siginfo_from_user32(&info, uinfo); if (unlikely(ret)) return ret; @@ -3066,7 +3066,7 @@ COMPAT_SYSCALL_DEFINE4(rt_tgsigqueueinfo, int, sig, struct compat_siginfo __user *, uinfo) { - siginfo_t info = {}; + siginfo_t info; if (copy_siginfo_from_user32(&info, uinfo)) return -EFAULT; -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/