[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190930.172027.1837315999928472989.davem@davemloft.net>
Date: Mon, 30 Sep 2019 17:20:27 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: olteanv@...il.com
Cc: richardcochran@...il.com, andrew@...n.ch, f.fainelli@...il.com,
vivien.didelot@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH net] net: dsa: sja1105: Fix sleeping while atomic in
.port_hwtstamp_set
From: Vladimir Oltean <olteanv@...il.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 <olteanv@...il.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.
2) After these changes meta_lock is no longer used so it should be removed.
Powered by blists - more mailing lists