{"id":654349,"url":"http://patchwork.ozlabs.org/api/patches/654349/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1469963663-3005-1-git-send-email-xypron.glpk@gmx.de/","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/","list_archive_url":"https://lore.kernel.org/linuxppc-dev/","list_archive_url_format":"https://lore.kernel.org/linuxppc-dev/{}/","commit_url_format":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"},"msgid":"<1469963663-3005-1-git-send-email-xypron.glpk@gmx.de>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/1469963663-3005-1-git-send-email-xypron.glpk@gmx.de/","date":"2016-07-31T11:14:23","name":"[1/1] wan/fsl_ucc_hdlc: avoid possible NULL pointer dereference","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":false,"hash":"0b70f788274fcf1ad28e4441ce0e80669132f44a","submitter":{"id":61270,"url":"http://patchwork.ozlabs.org/api/people/61270/?format=json","name":"Heinrich Schuchardt","email":"xypron.glpk@gmx.de"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1469963663-3005-1-git-send-email-xypron.glpk@gmx.de/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/654349/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/654349/checks/","tags":{},"related":[],"headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3s2Klh02TDz9sXx\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun, 31 Jul 2016 21:21:04 +1000 (AEST)","from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3s2Klg64VbzDqPs\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun, 31 Jul 2016 21:21:03 +1000 (AEST)","from mout.gmx.net (mout.gmx.net [212.227.15.18])\n\t(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3s2KkQ4TtQzDqMg\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSun, 31 Jul 2016 21:19:58 +1000 (AEST)","from LT002.fritz.box ([109.91.48.91]) by mail.gmx.com (mrgmx002)\n\twith ESMTPSA (Nemesis) id 0Lz3rc-1bGQcP3dE8-014Bbc;\n\tSun, 31 Jul 2016 13:14:29 +0200"],"X-Greylist":"delayed 313 seconds by postgrey-1.35 at bilbo;\n\tSun, 31 Jul 2016 21:19:58 AEST","From":"Heinrich Schuchardt <xypron.glpk@gmx.de>","To":"Zhao Qiang <qiang.zhao@nxp.com>","Subject":"[PATCH 1/1] wan/fsl_ucc_hdlc: avoid possible NULL pointer\n\tdereference","Date":"Sun, 31 Jul 2016 13:14:23 +0200","Message-Id":"<1469963663-3005-1-git-send-email-xypron.glpk@gmx.de>","X-Mailer":"git-send-email 2.8.1","X-Provags-ID":"V03:K0:QHCYJuiDwAHpvz/hSgxM8BIIOEeeyvvwxDc0Ftui4uj6ODltysR\n\ttncLQUjFgaF1ezvtKmFEuyddq6hhE/X9Reo8xWhOIomHm30K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PO/zhr1pSfMTq40nYAkNVM3Bxrx8smJ0xJOeu7yJpGL\n\tzIqbu32YDhQEqnq6fBsvqNXIXoLZDjUP0NclkZYKxxTRaFrXPoOmcM94Hp+rz6Tg8jgkxHwrm\n\tOsGbVzJDe0eLCguc3kk+u1S+R4l3cNZQ=","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.22","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,\n\tlinux-kernel@vger.kernel.org, Heinrich Schuchardt <xypron.glpk@gmx.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"},"content":"All assignments to components of priv should only\noccur after the check if prif is NULL.\n\nSigned-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n---\n drivers/net/wan/fsl_ucc_hdlc.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)","diff":"diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c\nindex 2fc50ec..6f04445 100644\n--- a/drivers/net/wan/fsl_ucc_hdlc.c\n+++ b/drivers/net/wan/fsl_ucc_hdlc.c\n@@ -862,7 +862,7 @@ static int uhdlc_suspend(struct device *dev)\n static int uhdlc_resume(struct device *dev)\n {\n \tstruct ucc_hdlc_private *priv = dev_get_drvdata(dev);\n-\tstruct ucc_tdm *utdm = priv->utdm;\n+\tstruct ucc_tdm *utdm;\n \tstruct ucc_tdm_info *ut_info;\n \tstruct ucc_fast __iomem *uf_regs;\n \tstruct ucc_fast_private *uccf;\n@@ -877,6 +877,7 @@ static int uhdlc_resume(struct device *dev)\n \tif (!netif_running(priv->ndev))\n \t\treturn 0;\n \n+\tutdm = priv->utdm;\n \tut_info = priv->ut_info;\n \tuf_info = &ut_info->uf_info;\n \tuf_regs = priv->uf_regs;\n","prefixes":["1/1"]}