Skip to contentSkip to conversation

Patch "net: thunderx: avoid dereferencing xcv when NULL" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Dec 6, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

net: thunderx: avoid dereferencing xcv when NULL

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
net-thunderx-avoid-dereferencing-xcv-when-null.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Wed Dec 6 17:39:55 CET 2017

From: Vincent <[email protected]>
Date: Mon, 30 Jan 2017 15:06:43 +0100
Subject: net: thunderx: avoid dereferencing xcv when NULL

From: Vincent <[email protected]>

[ Upstream commit c73e44269369e936165f0f9b61f1f09a11dae01c ]

This fixes the following smatch and coccinelle warnings:

drivers/net/ethernet/cavium/thunder/thunder_xcv.c:119 xcv_setup_link() error: we previously assumed 'xcv' could be null (see line 118) [smatch] drivers/net/ethernet/cavium/thunder/thunder_xcv.c:119:16-20: ERROR: xcv is NULL but dereferenced. [coccinelle]

Fixes 6465859aba1e66a5 ("net: thunderx: Add RGMII interface type support")
Cc Sunil Goutham <[email protected]>
---
 drivers/net/ethernet/cavium/thunder/thunder_xcv.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/cavium/thunder/thunder_xcv.c +1 -2
@@ -116,8 +116,7 @@ void xcv_setup_link(bool link_up, int li
 	int speed = 2;
 
 	if (!xcv) {
-		dev_err(&xcv->pdev->dev,
-			"XCV init not done, probe may have failed\n");
+		pr_err("XCV init not done, probe may have failed\n");
 		return;
 	}
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/net-thunderx-avoid-dereferencing-xcv-when-null.patch