[Devel] Re: [PATCH net-next 3/9] ipv4: remove static flush_delay variable

Eric W. Biederman ebiederm at xmission.com
Mon Jul 7 01:43:06 PDT 2008


"Denis V. Lunev" <den at openvz.org> writes:

> flush delay is used as an external storage for net.ipv4.route.flush sysctl
> entry. It is write-only.
>
> The ctl_table->data for this entry is used once. Fix this case to point
> to the stack to remove global variable. Do this to avoid additional
> variable on struct net in the next patch.
>
> Possible race (as it was before) accessing this local variable is removed
> using flush_mutex.

FYI.  You can avoid the locking entirely by defining a local struct ctl_table variable
on the stack.

Eric
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list