From: Roland McGrath <roland@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Michael Kerrisk <mtk-lkml@gmx.net>,
torvalds@osdl.org, akpm@osdl.org, drepper@redhat.com,
linux-kernel@vger.kernel.org, michael.kerrisk@gmx.net,
Tonnerre <tonnerre@thundrix.ch>
Subject: Re: [PATCH] waitid system call
Date: Mon, 30 Aug 2004 23:37:42 -0700 [thread overview]
Message-ID: <200408310637.i7V6bgSD000489@magilla.sf.frob.com> (raw)
In-Reply-To: Jakub Jelinek's message of Tuesday, 31 August 2004 02:26:56 -0400 <20040831062656.GU11465@devserv.devel.redhat.com>
> Is it really necessary to check the exit code after each put_user?
> if (!retval && access_ok(VERIFY_WRITE, infop, sizeof(*infop)))) {
> retval = __put_user(0, &infop->si_signo);
> retval |= __put_user(0, &infop->si_errno);
> retval |= __put_user(0, &infop->si_code);
> retval |= __put_user(0, &infop->si_pid);
> retval |= __put_user(0, &infop->si_uid);
> retval |= __put_user(0, &infop->si_status);
> }
> is what kernel usually does when filling multiple structure members.
That is certainly fine by me, but shouldn't that be setting retval to
-EFAULT if access_ok fails? The waitid patch has a couple of other spots
where those several members are filled in and the code uses the several if's.
If one should change I suppose they all should.
Thanks,
Roland
next prev parent reply other threads:[~2004-08-31 6:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-15 23:03 Roland McGrath
2004-08-16 5:40 ` Roland McGrath
2004-08-16 17:15 ` Michael Kerrisk
2004-08-16 21:12 ` Roland McGrath
2004-08-19 17:20 ` Michael Kerrisk
2004-08-19 20:53 ` Roland McGrath
2004-08-20 6:00 ` Michael Kerrisk
2004-08-20 9:02 ` Michael Kerrisk
2004-08-20 20:04 ` Roland McGrath
2004-08-24 11:51 ` Michael Kerrisk
2004-08-31 6:04 ` Roland McGrath
2004-08-31 6:26 ` Jakub Jelinek
2004-08-31 6:37 ` Roland McGrath [this message]
2004-08-31 6:40 ` Andrew Morton
2004-08-31 15:53 ` Bill Davidsen
2004-08-31 18:26 ` Linus Torvalds
2004-08-31 23:51 ` Roland McGrath
2004-09-01 11:31 ` Michael Kerrisk
2004-08-31 7:22 ` Michael Kerrisk
2004-08-22 8:53 ` Tonnerre
[not found] <2tCiy-8pK-13@gated-at.bofh.it>
2004-08-16 0:03 ` Andi Kleen
2004-08-16 2:10 ` Roland McGrath
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=200408310637.i7V6bgSD000489@magilla.sf.frob.com \
--to=roland@redhat.com \
--cc=akpm@osdl.org \
--cc=drepper@redhat.com \
--cc=jakub@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.kerrisk@gmx.net \
--cc=mtk-lkml@gmx.net \
--cc=tonnerre@thundrix.ch \
--cc=torvalds@osdl.org \
/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®