From: Steven Rostedt <rostedt@goodmis.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: madhu.subbaiah@wipro.com, linux-kernel@vger.kernel.org
Subject: Re: select() for delay.
Date: Mon, 24 Oct 2005 09:37:52 -0400 [thread overview]
Message-ID: <1130161072.7804.20.camel@localhost.localdomain> (raw)
In-Reply-To: <1130160451.2775.8.camel@laptopd505.fenrus.org>
On Mon, 2005-10-24 at 15:27 +0200, Arjan van de Ven wrote:
> On Mon, 2005-10-24 at 09:18 -0400, Steven Rostedt wrote:
> > Hi Maduhu,
> >
> > On Mon, 2005-10-24 at 16:25 +0530, madhu.subbaiah@wipro.com wrote:
> >
> > > + put_user(sec, &tvp->tv_sec);
> > > + put_user(usec, &tvp->tv_usec);
> >
> > I won't comment on the rest of the patch, but this part is definitely
> > wrong. The pointer tvp is a user space address and once you dereference
> > that pointer to get to tv_sec, you can have a fault, which might
> > segfault the
>
> &pointer->member doesn't dereference the pointer, it just adds the
> offset of "member" to the content of the pointer.
>
Oh crap! You're right ;-)
Argh, that's what I get for replying before my first cup of coffee and
suffering jet lag.
I should have known this since I just copied over the container_of macro
to a user process, and if what I said was true, ((type *)0)->member
would never work.
Oh well, time to wake up :-)
-- Steve
next prev parent reply other threads:[~2005-10-24 13:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-24 10:55 madhu.subbaiah
2005-10-24 13:18 ` Steven Rostedt
2005-10-24 13:27 ` Arjan van de Ven
2005-10-24 13:37 ` Steven Rostedt [this message]
2005-10-25 6:26 ` Madhu K.S.
2005-10-30 19:06 ` Arnd Bergmann
2005-10-30 19:12 ` Arjan van de Ven
2005-10-31 15:46 ` Christopher Friesen
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=1130161072.7804.20.camel@localhost.localdomain \
--to=rostedt@goodmis.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=madhu.subbaiah@wipro.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
Powered by JetHome