Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452811 > unrolled thread
| Started by | Heinrich Schuchardt <xypron.glpk@gmx.de> |
|---|---|
| First post | 2016-07-31 13:20 +0200 |
| Last post | 2016-08-01 22:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] wan/fsl_ucc_hdlc: avoid possible NULL pointer dereference Heinrich Schuchardt <xypron.glpk@gmx.de> - 2016-07-31 13:20 +0200
Re: [PATCH 1/1] wan/fsl_ucc_hdlc: avoid possible NULL pointer dereference David Miller <davem@davemloft.net> - 2016-08-01 22:50 +0200
| From | Heinrich Schuchardt <xypron.glpk@gmx.de> |
|---|---|
| Date | 2016-07-31 13:20 +0200 |
| Subject | [PATCH 1/1] wan/fsl_ucc_hdlc: avoid possible NULL pointer dereference |
| Message-ID | <s0WWJ-7NU-9@gated-at.bofh.it> |
All assignments to components of priv should only
occur after the check if prif is NULL.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
drivers/net/wan/fsl_ucc_hdlc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index 2fc50ec..6f04445 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -862,7 +862,7 @@ static int uhdlc_suspend(struct device *dev)
static int uhdlc_resume(struct device *dev)
{
struct ucc_hdlc_private *priv = dev_get_drvdata(dev);
- struct ucc_tdm *utdm = priv->utdm;
+ struct ucc_tdm *utdm;
struct ucc_tdm_info *ut_info;
struct ucc_fast __iomem *uf_regs;
struct ucc_fast_private *uccf;
@@ -877,6 +877,7 @@ static int uhdlc_resume(struct device *dev)
if (!netif_running(priv->ndev))
return 0;
+ utdm = priv->utdm;
ut_info = priv->ut_info;
uf_info = &ut_info->uf_info;
uf_regs = priv->uf_regs;
--
2.8.1
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-08-01 22:50 +0200 |
| Subject | Re: [PATCH 1/1] wan/fsl_ucc_hdlc: avoid possible NULL pointer dereference |
| Message-ID | <s1sjU-2WL-25@gated-at.bofh.it> |
| In reply to | #1452811 |
From: Heinrich Schuchardt <xypron.glpk@gmx.de> Date: Sun, 31 Jul 2016 13:14:23 +0200 > All assignments to components of priv should only > occur after the check if prif is NULL. > > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web