]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
net: hsr: serialize seq_blocks merge across nodes
authorLuka Gejak <luka.gejak@linux.dev>
Wed, 1 Apr 2026 09:22:42 +0000 (11:22 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 2 Apr 2026 15:23:49 +0000 (08:23 -0700)
commitf5df2990c364d1ac596d24b3118dbc56503f7cd4
tree6880b505f23185d5a0cf2a4e18cb057ead890203
parentb18c833888742ca9de80c250f9d40d0e97caa9f6
net: hsr: serialize seq_blocks merge across nodes

During node merging, hsr_handle_sup_frame() walks node_curr->seq_blocks
to update node_real without holding node_curr->seq_out_lock. This
allows concurrent mutations from duplicate registration paths, risking
inconsistent state or XArray/bitmap corruption.

Fix this by locking both nodes' seq_out_lock during the merge.
To prevent ABBA deadlocks, locks are acquired in order of memory
address.

Reviewed-by: Felix Maurer <fmaurer@redhat.com>
Fixes: 415e6367512b ("hsr: Implement more robust duplicate discard for PRP")
Signed-off-by: Luka Gejak <luka.gejak@linux.dev>
Link: https://patch.msgid.link/20260401092243.52121-2-luka.gejak@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/hsr/hsr_framereg.c