Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1247181

[PATCH 20/20] signal: Remove unnecessary zero-initialization of siginfo_t

From Amanieu d'Antras <amanieu@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 20/20] signal: Remove unnecessary zero-initialization of siginfo_t
Date 2015-10-14 23:10 +0200
Message-ID <qjBta-20C-75@gated-at.bofh.it> (permalink)
References <qjBt7-20C-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This is no longer required since copy_siginfo_from_user32 now
initializes all siginfo_t fields properly.

Signed-off-by: Amanieu d'Antras <amanieu@gmail.com>
---
 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.1

--
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/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/20] Fix handling of compat_siginfo_t Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 19/20] signalfd: Fix handling of ssi_ptr and ssi_int in signalfd_copyinfo Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
    Re: [PATCH 19/20] signalfd: Fix handling of ssi_ptr and ssi_int in signalfd_copyinfo "Amanieu d'Antras" <amanieu@gmail.com> - 2015-10-14 23:30 +0200
  [PATCH 12/20] s390: Use generic copy_siginfo_{to,from}_user32 Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 09/20] parisc: Use generic compat_siginfo_t Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 07/20] arm64: Use generic compat_siginfo_t Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 10/20] parsic: Use generic copy_siginfo_{to,from}_user32 Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 13/20] powerpc: Use generic compat_siginfo_t Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
    Re: [PATCH 13/20] powerpc: Use generic compat_siginfo_t kbuild test robot <lkp@intel.com> - 2015-10-17 01:10 +0200
  [PATCH 17/20] sparc: Use generic compat_siginfo_t Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 18/20] sparc: Use generic copy_siginfo_{to,from}_user32 Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 05/20] mips: Clean up compat_siginfo_t Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 19/20] signalfd: Fix some issues in signalfd_copyinfo Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 15/20] tile: Use generic compat_siginfo_t Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 20/20] signal: Remove unnecessary zero-initialization of siginfo_t Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 08/20] arm64: Use generic copy_siginfo_{to,from}_user32 Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 03/20] x86: Update compat_siginfo_t to be closer to the generic version Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200
  [PATCH 16/20] tile: Use generic copy_siginfo_{to,from}_user32 Amanieu d'Antras <amanieu@gmail.com> - 2015-10-14 23:10 +0200

csiph-web