RE: [PATCH v2 2/2] soc: fsl: qbman: Use raw spinlock for cgr_lock
> -Original Message- > From: Sean Anderson > Sent: Friday, March 31, 2023 18:14 > To: Leo Li ; linuxppc-dev@lists.ozlabs.org; linux-arm- > ker...@lists.infradead.org > Cc: Scott Wood ; Camelia Alexandra Groza > ; linux-ker...@vger.kernel.org; Roy Pledge > ; David S . Miller ; Claudiu > Manoil ; Vladimir Oltean > ; Sean Anderson > Subject: [PATCH v2 2/2] soc: fsl: qbman: Use raw spinlock for cgr_lock > > cgr_lock may be locked with interrupts already disabled by > smp_call_function_single. As such, we must use a raw spinlock to avoid > problems on PREEMPT_RT kernels. Although this bug has existed for a > while, it was not apparent until commit ef2a8d5478b9 ("net: dpaa: Adjust > queue depth on rate change") which invokes smp_call_function_single via > qman_update_cgr_safe every time a link goes up or down. > > Fixes: c535e923bb97 ("soc/fsl: Introduce DPAA 1.x QMan device driver") > Reported-by: Vladimir Oltean > Link: https://lore.kernel.org/all/20230323153935.nofnjucqjqnz34ej@skbuf/ > Signed-off-by: Sean Anderson Reviewed-by: Camelia Groza
Re: [PATCH v2 2/2] soc: fsl: qbman: Use raw spinlock for cgr_lock
On Fri, Mar 31, 2023 at 11:14:13AM -0400, Sean Anderson wrote: > cgr_lock may be locked with interrupts already disabled by > smp_call_function_single. As such, we must use a raw spinlock to avoid > problems on PREEMPT_RT kernels. Although this bug has existed for a > while, it was not apparent until commit ef2a8d5478b9 ("net: dpaa: Adjust > queue depth on rate change") which invokes smp_call_function_single via > qman_update_cgr_safe every time a link goes up or down. > > Fixes: c535e923bb97 ("soc/fsl: Introduce DPAA 1.x QMan device driver") Same comment about the Fixes tag. git tag --contains c535e923bb97 v4.9 git tag --contains 96f413f47677 v4.16 Looking at https://www.kernel.org/, I see that kernel 4.14 is still maintained but should not have this patch backported, do you agree? > Reported-by: Vladimir Oltean > Link: https://lore.kernel.org/all/20230323153935.nofnjucqjqnz34ej@skbuf/ > Signed-off-by: Sean Anderson > --- Anyway, Tested-by: Vladimir Oltean