All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jingoo Han" <jingoohan1@gmail.com>
To: "'Jaehoon Chung'" <jh80.chung@samsung.com>, <linux-pci@vger.kernel.org>
Cc: lorenzo.pieralisi@arm.com, krzk@kernel.org,
	linux-samsung-soc@vger.kernel.org, kgene@kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] PCI: exynos: fix the potential null pointer dereference
Date: Mon, 22 Jan 2018 11:52:46 -0500	[thread overview]
Message-ID: <000201d393a1$6e7c8b70$4b75a250$@gmail.com> (raw)
In-Reply-To: <20180122022854.3634-1-jh80.chung@samsung.com>

On Sunday, January 21, 2018 6:29 PM, Jaehoon Chung wrote:
> 
> Before calling the callback function, it needs to check whether
> init_clk_resources is assigned or not.
> Otherwise, it can be occurred the NULL pointer dereference when
> init_clk_resources is not assigned.
> 
> Even though init_clk_resources is assigned now, it needs to prevent the
> potential NULL pointer dereference in future.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

Acked-by: Jingoo Han <jingoohan1@gmail.com>

Best regards,
Jingoo Han

> ---
>  drivers/pci/dwc/pci-exynos.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/dwc/pci-exynos.c b/drivers/pci/dwc/pci-exynos.c
> index 56f32aeebd0a..39f08881f9a4 100644
> --- a/drivers/pci/dwc/pci-exynos.c
> +++ b/drivers/pci/dwc/pci-exynos.c
> @@ -499,7 +499,8 @@ static int __init exynos_pcie_probe(struct
> platform_device *pdev)
>  			return ret;
>  	}
> 
> -	if (ep->ops && ep->ops->get_clk_resources) {
> +	if (ep->ops && ep->ops->get_clk_resources &&
> +			ep->ops->init_clk_resources) {
>  		ret = ep->ops->get_clk_resources(ep);
>  		if (ret)
>  			return ret;
> --
> 2.15.1



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: "Jingoo Han" <jingoohan1@gmail.com>
To: 'Jaehoon Chung' <jh80.chung@samsung.com>, linux-pci@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, lorenzo.pieralisi@arm.com,
	kgene@kernel.org, krzk@kernel.org
Subject: Re: [PATCH] PCI: exynos: fix the potential null pointer dereference
Date: Mon, 22 Jan 2018 11:52:46 -0500	[thread overview]
Message-ID: <000201d393a1$6e7c8b70$4b75a250$@gmail.com> (raw)
In-Reply-To: <20180122022854.3634-1-jh80.chung@samsung.com>

On Sunday, January 21, 2018 6:29 PM, Jaehoon Chung wrote:
> 
> Before calling the callback function, it needs to check whether
> init_clk_resources is assigned or not.
> Otherwise, it can be occurred the NULL pointer dereference when
> init_clk_resources is not assigned.
> 
> Even though init_clk_resources is assigned now, it needs to prevent the
> potential NULL pointer dereference in future.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

Acked-by: Jingoo Han <jingoohan1@gmail.com>

Best regards,
Jingoo Han

> ---
>  drivers/pci/dwc/pci-exynos.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/dwc/pci-exynos.c b/drivers/pci/dwc/pci-exynos.c
> index 56f32aeebd0a..39f08881f9a4 100644
> --- a/drivers/pci/dwc/pci-exynos.c
> +++ b/drivers/pci/dwc/pci-exynos.c
> @@ -499,7 +499,8 @@ static int __init exynos_pcie_probe(struct
> platform_device *pdev)
>  			return ret;
>  	}
> 
> -	if (ep->ops && ep->ops->get_clk_resources) {
> +	if (ep->ops && ep->ops->get_clk_resources &&
> +			ep->ops->init_clk_resources) {
>  		ret = ep->ops->get_clk_resources(ep);
>  		if (ret)
>  			return ret;
> --
> 2.15.1

WARNING: multiple messages have this Message-ID (diff)
From: jingoohan1@gmail.com (Jingoo Han)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PCI: exynos: fix the potential null pointer dereference
Date: Mon, 22 Jan 2018 11:52:46 -0500	[thread overview]
Message-ID: <000201d393a1$6e7c8b70$4b75a250$@gmail.com> (raw)
In-Reply-To: <20180122022854.3634-1-jh80.chung@samsung.com>

On Sunday, January 21, 2018 6:29 PM, Jaehoon Chung wrote:
> 
> Before calling the callback function, it needs to check whether
> init_clk_resources is assigned or not.
> Otherwise, it can be occurred the NULL pointer dereference when
> init_clk_resources is not assigned.
> 
> Even though init_clk_resources is assigned now, it needs to prevent the
> potential NULL pointer dereference in future.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

Acked-by: Jingoo Han <jingoohan1@gmail.com>

Best regards,
Jingoo Han

> ---
>  drivers/pci/dwc/pci-exynos.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/dwc/pci-exynos.c b/drivers/pci/dwc/pci-exynos.c
> index 56f32aeebd0a..39f08881f9a4 100644
> --- a/drivers/pci/dwc/pci-exynos.c
> +++ b/drivers/pci/dwc/pci-exynos.c
> @@ -499,7 +499,8 @@ static int __init exynos_pcie_probe(struct
> platform_device *pdev)
>  			return ret;
>  	}
> 
> -	if (ep->ops && ep->ops->get_clk_resources) {
> +	if (ep->ops && ep->ops->get_clk_resources &&
> +			ep->ops->init_clk_resources) {
>  		ret = ep->ops->get_clk_resources(ep);
>  		if (ret)
>  			return ret;
> --
> 2.15.1

  reply	other threads:[~2018-01-22 16:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180122022856epcas1p494a9efeae478b299e3e8006adad71e6a@epcas1p4.samsung.com>
2018-01-22  2:28 ` [PATCH] PCI: exynos: fix the potential null pointer dereference Jaehoon Chung
2018-01-22  2:28   ` Jaehoon Chung
2018-01-22  2:28   ` Jaehoon Chung
2018-01-22 16:52   ` Jingoo Han [this message]
2018-01-22 16:52     ` Jingoo Han
2018-01-22 16:52     ` Jingoo Han
2018-01-29 17:10   ` Lorenzo Pieralisi
2018-01-29 17:10     ` Lorenzo Pieralisi
2018-01-29 17:10     ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000201d393a1$6e7c8b70$4b75a250$@gmail.com' \
    --to=jingoohan1@gmail.com \
    --cc=jh80.chung@samsung.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.