mbox series

[SRU,J:linux-bluefield,0/1] net/sched: flower: Add lock protection when remove filter handle

Message ID 20240226230230.86102-1-witu@nvidia.com
Headers show
Series net/sched: flower: Add lock protection when remove filter handle | expand

Message

William Tu Feb. 26, 2024, 11:02 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2055052

* intro
As IDR can't protect itself from the concurrent modification, place
idr_remove() under the protection of tp->lock.

* how to fix
need to backport the patch from Jianbo
"net/sched: flower: Add lock protection when remove filter handle"
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=1fde0ca3a0de7e9f917668941156959dd5e9108b

* reproduce and verification
It's hard to reproduce because it is a race condition we found in k8s+ovn deployment.


Jianbo Liu (1):
  net/sched: flower: Add lock protection when remove filter handle

 net/sched/cls_flower.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Bartlomiej Zolnierkiewicz March 1, 2024, 10:43 a.m. UTC | #1
[ reply to 0/1 email this time ]

Acked-by: Bartlomiej Zolnierkiewicz <bartlomiej.zolnierkiewicz@canonical.com>

On Tue, Feb 27, 2024 at 12:04 AM William Tu <witu@nvidia.com> wrote:
>
> BugLink: https://bugs.launchpad.net/bugs/2055052
>
> * intro
> As IDR can't protect itself from the concurrent modification, place
> idr_remove() under the protection of tp->lock.
>
> * how to fix
> need to backport the patch from Jianbo
> "net/sched: flower: Add lock protection when remove filter handle"
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=1fde0ca3a0de7e9f917668941156959dd5e9108b
>
> * reproduce and verification
> It's hard to reproduce because it is a race condition we found in k8s+ovn deployment.
>
>
> Jianbo Liu (1):
>   net/sched: flower: Add lock protection when remove filter handle
>
>  net/sched/cls_flower.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
Bartlomiej Zolnierkiewicz March 6, 2024, 12:37 p.m. UTC | #2
Applied to jammy:linux-bluefield/master-next. Thanks.

--
Best regards,
Bartlomiej

On Tue, Feb 27, 2024 at 12:04 AM William Tu <witu@nvidia.com> wrote:
>
> BugLink: https://bugs.launchpad.net/bugs/2055052
>
> * intro
> As IDR can't protect itself from the concurrent modification, place
> idr_remove() under the protection of tp->lock.
>
> * how to fix
> need to backport the patch from Jianbo
> "net/sched: flower: Add lock protection when remove filter handle"
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=1fde0ca3a0de7e9f917668941156959dd5e9108b
>
> * reproduce and verification
> It's hard to reproduce because it is a race condition we found in k8s+ovn deployment.
>
>
> Jianbo Liu (1):
>   net/sched: flower: Add lock protection when remove filter handle
>
>  net/sched/cls_flower.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>