Hi David,

On Tue, 1 Oct 2019 at 03:20, David Miller <da...@davemloft.net> wrote:
>
> From: Vladimir Oltean <olte...@gmail.com>
> Date: Sun, 29 Sep 2019 01:07:45 +0300
>
> > Currently this stack trace can be seen with CONFIG_DEBUG_ATOMIC_SLEEP=y:
>  ...
> > Enabling RX timestamping will logically disturb the fastpath (processing
> > of meta frames). Replace bool hwts_rx_en with a bit that is checked
> > atomically from the fastpath and temporarily unset from the sleepable
> > context during a change of the RX timestamping process (a destructive
> > operation anyways, requires switch reset).
> > If found unset, the fastpath will just drop any received meta frame and
> > not take the meta_lock at all.
> >
> > Fixes: a602afd200f5 ("net: dsa: sja1105: Expose PTP timestamping ioctls to 
> > userspace")
> > Signed-off-by: Vladimir Oltean <olte...@gmail.com>
>
> Well, two things:
>
> 1) Even assuming #2 wasn't true, you're adding the missing initialization
>    of meta_lock and that would need to be mentioned in the commit message.
>

Thanks, I forgot to break that line apart into a new patch.

> 2) After these changes meta_lock is no longer used so it should be removed.

The meta_lock is still very much used: see net/dsa/tag_sja1105.c (that
is where DSA keeps its fastpath). The fact that meta_lock is no longer
used within the driver (slowpath) is entirely the point of the patch.

-Vladimir

Reply via email to