From: Ruben Carlo Benante <rcb@beco.cc>
To: roland@hack.frob.com
Cc: oleg@redhat.com, linux-kernel@vger.kernel.org,
Ruben Carlo Benante <rcb@beco.cc>
Subject: [PATCH] kernel/ptrace.c: 2 blank lines, 2 sizeof parentheses
Date: Mon, 29 Jun 2015 00:34:04 -0300 [thread overview]
Message-ID: <1435548844-11433-1-git-send-email-rcb@beco.cc> (raw)
Fixed 4 checkpatch.pl warnings:
kernel/ptrace.c:270: WARNING: Missing a blank line after declarations
kernel/ptrace.c:413: WARNING: Missing a blank line after declarations
kernel/ptrace.c:841: WARNING: sizeof siginfo should be sizeof(siginfo)
kernel/ptrace.c:1140: WARNING: sizeof siginfo should be sizeof(siginfo)
Signed-off-by: Ruben Carlo Benante <rcb@beco.cc>
---
kernel/ptrace.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index c8e0e05..0759a65 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -264,6 +264,7 @@ ok:
bool ptrace_may_access(struct task_struct *task, unsigned int mode)
{
int err;
+
task_lock(task);
err = __ptrace_may_access(task, mode);
task_unlock(task);
@@ -407,6 +408,7 @@ static int ptrace_traceme(void)
static int ignoring_children(struct sighand_struct *sigh)
{
int ret;
+
spin_lock(&sigh->siglock);
ret = (sigh->action[SIGCHLD-1].sa.sa_handler == SIG_IGN) ||
(sigh->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDWAIT);
@@ -835,7 +837,7 @@ int ptrace_request(struct task_struct *child, long request,
break;
case PTRACE_SETSIGINFO:
- if (copy_from_user(&siginfo, datavp, sizeof siginfo))
+ if (copy_from_user(&siginfo, datavp, sizeof(siginfo)))
ret = -EFAULT;
else
ret = ptrace_setsiginfo(child, &siginfo);
@@ -1134,7 +1136,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
break;
case PTRACE_SETSIGINFO:
- memset(&siginfo, 0, sizeof siginfo);
+ memset(&siginfo, 0, sizeof(siginfo));
if (copy_siginfo_from_user32(
&siginfo, (struct compat_siginfo __user *) datap))
ret = -EFAULT;
--
2.1.4
reply other threads:[~2015-06-29 3:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435548844-11433-1-git-send-email-rcb@beco.cc \
--to=rcb@beco.cc \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=roland@hack.frob.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®