[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1471272304-12488-1-git-send-email-colin.king@canonical.com>
Date: Mon, 15 Aug 2016 15:45:04 +0100
From: Colin King <colin.king@...onical.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
devel@...verdev.osuosl.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] staging: ks7010: don't print skb->dev->name if skb is null
From: Colin Ian King <colin.king@...onical.com>
A null pointer dereference will occur when skb is null and
skb->dev->name is printed. Replace the skb->dev->name with
plain text "ks_wlan" to fix this.
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
drivers/staging/ks7010/ks_hostif.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index a8822fe..e8a2564 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -481,8 +481,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
netif_rx(skb);
} else {
printk(KERN_WARNING
- "%s: Memory squeeze, dropping packet.\n",
- skb->dev->name);
+ "ks_wlan: Memory squeeze, dropping packet.\n");
priv->nstats.rx_dropped++;
}
break;
@@ -517,8 +516,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
netif_rx(skb);
} else {
printk(KERN_WARNING
- "%s: Memory squeeze, dropping packet.\n",
- skb->dev->name);
+ "ks_wlan: Memory squeeze, dropping packet.\n");
priv->nstats.rx_dropped++;
}
break;
--
2.8.1
Powered by blists - more mailing lists