Thread (30 messages) 30 messages, 7 authors, 2010-09-11

Re: [PATCH 1/2] posix clocks: introduce a syscall for clock tuning.

flat view

From: Richard Cochran <hidden>
Date: 2010-09-03 09:58:32
Also in: lkml, netdev

On Fri, Sep 03, 2010 at 11:29:05AM +0200, Richard Cochran wrote:
quoted hunk ↗ jump to hunk
+long compat_sys_clock_adjtime(clockid_t which_clock,
+		struct compat_timex __user *utp)
+{
+	struct timex txc;
+	mm_segment_t oldfs;
+	int err, ret;
+
+	err = compat_get_timex(&txc, utp);
+	if (err)
+		return err;
+
+	oldfs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = sys_clock_adjtime(which_clock, (struct timex __user *) &txc);
+	set_fs(oldfs);
I don't know what the purpose of get_fs, set_fs is, but the other
clock_ functions have it that way. The adjtimex call does not have
this at all, so I ask, do we need this here, or not?

Thanks,
Richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help