Re: [PATCH 1/2] vdso/timens: Move functions to new file

From: Thomas Weißschuh

Date: Wed Mar 25 2026 - 04:01:51 EST


On Tue, Mar 24, 2026 at 08:36:48PM +0100, Thomas Gleixner wrote:
> On Mon, Mar 23 2026 at 09:07, Thomas Weißschuh wrote:
> > +static void timens_set_vvar_page(struct task_struct *task,
> > + struct time_namespace *ns)
> > +{
> > + struct vdso_time_data *vdata;
> > + struct vdso_clock *vc;
> > + unsigned int i;
> > +
> > + if (ns == &init_time_ns)
> > + return;
> > +
> > + /* Fast-path, taken by every task in namespace except the first. */
> > + if (likely(ns->frozen_offsets))
> > + return;
> > +
> > + mutex_lock(&timens_offset_lock);
>
> Please convert all the locking to guard() while at it.

I'll switch the one in timens_set_vvar_page().
proc_timens_set_offset() is not really touched in this series
and properly migrating it to guard() will also require the introduction
of __free(time_ns), which exceeds the scope of this series.

For this I'll send dedicated patches after the current series.


Thomas