Skip to content

Commit ce335e3

Browse files
PancakeTASfrank-w
authored andcommitted
net: ethernet: mtk_eth_soc: Fix immutable string IRQ setup
The PDMA IRQ setup code uses a string literal pointer for the ring name, which is mutated shortly after. Change rxring to a character array as to not write to immutable-memory. Signed-off-by: Emilia Schotte <[email protected]>
1 parent d3bac1b commit ce335e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mediatek/mtk_eth_soc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3720,7 +3720,7 @@ static int mtk_get_irqs_fe(struct platform_device *pdev, struct mtk_eth *eth)
37203720

37213721
static int mtk_get_irqs_pdma(struct platform_device *pdev, struct mtk_eth *eth)
37223722
{
3723-
char *rxring = "pdma0";
3723+
char rxring[] = "pdma0";
37243724
int i;
37253725

37263726
for (i = 0; i < MTK_PDMA_IRQ_NUM; i++) {

0 commit comments

Comments
 (0)