Skip to contentSkip to conversation

kernel panic with b44 and netifd

DISCUSSION Peter Münster 3 participants 4 messages Apr 3, 2024

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
Quoted 11 lines · Peter Münster

Hi,

Unfortunately linux-5.15.153 crashes on my router when netifd is running.

Further information and a patch are here:
https://github.com/openwrt/openwrt/issues/13789#issuecomment-1944799389

Could you please fix b44.c in linux-5.15?

Since you already have the patch, please post the patch to netdev for review. After the patch is accepted, it can then be back ported to the stable trees. Thanks.

#2 lore raw
Quoted 1 line · Michael Chan

please post the patch to netdev for review.

Ok, please find it here attached.

And please consider also KanjiMonster’s comment here:
https://github.com/openwrt/openwrt/issues/13789#issuecomment-2034601851

Signature · 1 line
           Peter
target-mipsel_mips32_musl/linux-bcm47xx_legacy/linux-5.15.153/drivers/net/ethernet/broadcom/b44.c renamed from target-mipsel_mips32_musl/linux-bcm47xx_legacy/linux-5.15.153/drivers/net/ethernet/broadcom/b44.c~ +8 -6
@@ -2056,12 +2056,14 @@
 		bp->flags |= B44_FLAG_TX_PAUSE;
 	else
 		bp->flags &= ~B44_FLAG_TX_PAUSE;
-	if (bp->flags & B44_FLAG_PAUSE_AUTO) {
-		b44_halt(bp);
-		b44_init_rings(bp);
-		b44_init_hw(bp, B44_FULL_RESET);
-	} else {
-		__b44_set_flow_ctrl(bp, bp->flags);
+	if (netif_running(dev)) {
+		if (bp->flags & B44_FLAG_PAUSE_AUTO) {
+			b44_halt(bp);
+			b44_init_rings(bp);
+			b44_init_hw(bp, B44_FULL_RESET);
+		} else {
+			__b44_set_flow_ctrl(bp, bp->flags);
+		}
 	}
 	spin_unlock_irq(&bp->lock);
 
#3 lore raw
Quoted 9 lines · Peter Münster
Quoted 1 line · Michael Chan

please post the patch to netdev for review.

Ok, please find it here attached.

And please consider also KanjiMonster’s comment here:
https://github.com/openwrt/openwrt/issues/13789#issuecomment-2034601851

This is not the proper way to post the patch, please follow the guidelines documented here:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst

and here:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/maintainer-netdev.rst

Signature · 1 line
Florian