[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a38eZijQH=vChgm5fZBzOuV2Oi2c0LEdrMy4nKpL7QLbQ@mail.gmail.com>
Date: Sat, 9 Nov 2019 22:02:49 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Ondrej Mosnacek <omosnace@...hat.com>
Cc: y2038 Mailman List <y2038@...ts.linaro.org>,
John Stultz <john.stultz@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Paul Moore <paul@...l-moore.com>,
Stephen Smalley <sds@...ho.nsa.gov>,
Eric Paris <eparis@...isplace.org>,
Linux kernel mailing list <linux-kernel@...r.kernel.org>,
Stephen Boyd <sboyd@...nel.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
Anna-Maria Gleixner <anna-maria@...utronix.de>,
Al Viro <viro@...iv.linux.org.uk>,
SElinux list <selinux@...r.kernel.org>
Subject: Re: [PATCH 20/23] y2038: move itimer reset into itimer.c
On Sat, Nov 9, 2019 at 2:43 PM Ondrej Mosnacek <omosnace@...hat.com> wrote:
> > -struct itimerval;
> > -extern int do_setitimer(int which, struct itimerval *value,
> > - struct itimerval *ovalue);
> > -extern int do_getitimer(int which, struct itimerval *value);
> > +#ifdef CONFIG_POSIX_TIMERS
> > +extern void clear_itimer(void);
> > +#else
> > +static inline void clear_itimer(void) {}
> > +#endif
> >
> > @@ -249,6 +249,17 @@ int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue)
> > return 0;
> > }
> >
> > +#ifdef CONFIG_SECURITY_SELINUX
>
> Did you mean "#ifdef CONFIG_POSIX_TIMERS" here to match the header?
No, this part is intentional, CONFIG_POSIX_TIMERS already controls
whether itimer.c is
compiled in the first place, but this function is only needed when called from
the selinux driver.
> > - }
> > + if (IS_ENABLED(CONFIG_POSIX_TIMERS))
> > + clear_itimer();
>
> Since you already define a no-op fallback for the case of
> !IS_ENABLED(CONFIG_POSIX_TIMERS) in time.h, why not simply call
> clear_itimer() unconditionally?
Ah right, that was indeed my plan here when I changed the declaration
in the header, I just forgot to remove the if(). Fixed now.
Thanks for the review!
Arnd
Powered by blists - more mailing lists