From: Wichert Akkerman <wichert@wiggy.net>
To: linux-kernel@vger.kernel.org
Subject: sys_gettimeofday racy or not?
Date: Fri, 25 Jun 2004 02:20:57 +0200 [thread overview]
Message-ID: <20040625002057.GA3052@wiggy.net> (raw)
This just happened to catch my eye and it's probably perfectly
valid, but if so please educate me on why it is. In kernel/time.c
sys_gettimeofday() there is this code:
if (unlikely(tz != NULL)) {
if (copy_to_user(tz, &sys_tz, sizeof(sys_tz)))
return -EFAULT;
}
what prevents sys_tz from being changed while this code runs?
Wichert.
--
Wichert Akkerman <wichert@wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
next reply other threads:[~2004-06-25 0:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-25 0:20 Wichert Akkerman [this message]
2004-06-25 4:53 ` sys_gettimeofday racy or not? Chris 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=20040625002057.GA3052@wiggy.net \
--to=wichert@wiggy.net \
--cc=linux-kernel@vger.kernel.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