[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: [PATCH] Enable olddelta to be NULL in adjtime(3)
From: |
Svante Signell |
Subject: |
Re: RFC: [PATCH] Enable olddelta to be NULL in adjtime(3) |
Date: |
Tue, 30 Aug 2016 17:40:00 +0200 |
On Tue, 2016-08-30 at 14:45 +0200, Pino Toscano wrote:
> On Tuesday, 30 August 2016 14:32:32 CEST Svante Signell wrote:
> >
> > The glibc patch sysdeps_mach_hurd_adjtime.c.diff use a dummy struct timeval
> > to
> > avoid calling ___host_adjust_time() in _adjtime() with a NULL third
> > argument.
> > Smarter solutions can probably be found, comments are welcome.
> You don't need to duplicate the whole __host_adjust_time call:
>
> struct timeval dummy;
> ..
> if (olddelta == NULL)
> olddelta = &dummy;
>
> should be enough.
Thanks!
Attached is an updated patch returning also EINVAL if abs(delta) is too large.
Whether the adjtime()/RPC_host_adjust_time.c:___host_adjust_time() survives a
delta being NULL remains to test. According to the manpage the bug was:
A longstanding bug meant that if delta was specified as NULL, no valid
information about the outstanding clock adjustment was returned in old-delta.
(In this circumstance, adjtime() should return the outstanding clock adjustment,
without changing it.) This bug is fixed on systems with glibc 2.8 or later and
Linux kernel 2.6.26 or later.
sysdeps_mach_hurd_adjtime.c.diff
Description: Text Data
- RFC: [PATCH] Enable olddelta to be NULL in adjtime(3), Svante Signell, 2016/08/30
- RFC: [PATCH] Fix setpriority calling __task_priority() for processes instead of threads., Svante Signell, 2016/08/31
- Re: RFC: [PATCH] Fix setpriority calling __task_priority() for processes instead of threads., Samuel Thibault, 2016/08/31
- Re: RFC: [PATCH] Fix setpriority calling __task_priority() for processes instead of threads., Svante Signell, 2016/08/31
- Re: RFC: [PATCH] Fix setpriority calling __task_priority() for processes instead of threads., Samuel Thibault, 2016/08/31
- Re: RFC: [PATCH] Fix setpriority calling __task_priority() for processes instead of threads., Svante Signell, 2016/08/31
- Re: RFC: [PATCH] Fix setpriority calling __task_priority() for processes instead of threads., Samuel Thibault, 2016/08/31
- Re: RFC: [PATCH] Fix setpriority calling __task_priority() for processes instead of threads., Svante Signell, 2016/08/31