stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "net: thunderx: avoid dereferencing xcv when NULL" has been added to the 4.9-stable tree
@ 2017-12-06 17:00 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-12-06 17:00 UTC (permalink / raw)
  To: vincent.stehle, alexander.levin, davem, gregkh, sgoutham
  Cc: stable, stable-commits


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 <stable@vger.kernel.org> know about it.


>From foo@baz Wed Dec  6 17:39:55 CET 2017
From: Vincent <vincent.stehle@laposte.net>
Date: Mon, 30 Jan 2017 15:06:43 +0100
Subject: net: thunderx: avoid dereferencing xcv when NULL

From: Vincent <vincent.stehle@laposte.net>


[ 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")
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/cavium/thunder/thunder_xcv.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/net/ethernet/cavium/thunder/thunder_xcv.c
+++ b/drivers/net/ethernet/cavium/thunder/thunder_xcv.c
@@ -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 vincent.stehle@laposte.net are

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-06 17:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-06 17:00 Patch "net: thunderx: avoid dereferencing xcv when NULL" has been added to the 4.9-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).