* [PATCH] memory: ti-aemif: fix a potential NULL-pointer dereference
@ 2018-09-06 12:12 Bartosz Golaszewski
2018-09-06 16:58 ` Santosh Shilimkar
0 siblings, 1 reply; 4+ messages in thread
From: Bartosz Golaszewski @ 2018-09-06 12:12 UTC (permalink / raw)
To: Santosh Shilimkar, Sekhar Nori, Kevin Hilman, Dan Carpenter
Cc: linux-kernel, Bartosz Golaszewski, stable
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Platform data pointer may be NULL. We check it everywhere but in one
place. Fix it.
Fixes: 8af70cd2ca50 ("memory: aemif: add support for board files")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: stable@vger.kernel.org
---
drivers/memory/ti-aemif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/memory/ti-aemif.c b/drivers/memory/ti-aemif.c
index 31112f622b88..475e5b3790ed 100644
--- a/drivers/memory/ti-aemif.c
+++ b/drivers/memory/ti-aemif.c
@@ -411,7 +411,7 @@ static int aemif_probe(struct platform_device *pdev)
if (ret < 0)
goto error;
}
- } else {
+ } else if (pdata) {
for (i = 0; i < pdata->num_sub_devices; i++) {
pdata->sub_devices[i].dev.parent = dev;
ret = platform_device_register(&pdata->sub_devices[i]);
--
2.18.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] memory: ti-aemif: fix a potential NULL-pointer dereference
2018-09-06 12:12 [PATCH] memory: ti-aemif: fix a potential NULL-pointer dereference Bartosz Golaszewski
@ 2018-09-06 16:58 ` Santosh Shilimkar
2018-09-06 17:03 ` Olof Johansson
0 siblings, 1 reply; 4+ messages in thread
From: Santosh Shilimkar @ 2018-09-06 16:58 UTC (permalink / raw)
To: Kevin Hilman, Dan Carpenter, Arnd Bergmann, arm, Olof Johansson
Cc: Bartosz Golaszewski, Santosh Shilimkar, Sekhar Nori,
linux-kernel, Bartosz Golaszewski, stable
Hi Arnd, Olof,
On 9/6/2018 5:12 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> Platform data pointer may be NULL. We check it everywhere but in one
> place. Fix it.
>
> Fixes: 8af70cd2ca50 ("memory: aemif: add support for board files")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> Cc: stable@vger.kernel.org
> ---
> drivers/memory/ti-aemif.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Will you be able to push this via drivers-soc fixes ?
Regards,
Santosh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] memory: ti-aemif: fix a potential NULL-pointer dereference
2018-09-06 16:58 ` Santosh Shilimkar
@ 2018-09-06 17:03 ` Olof Johansson
2018-09-06 17:07 ` Santosh Shilimkar
0 siblings, 1 reply; 4+ messages in thread
From: Olof Johansson @ 2018-09-06 17:03 UTC (permalink / raw)
To: Santosh Shilimkar
Cc: Kevin Hilman, Dan Carpenter, Arnd Bergmann, arm,
Bartosz Golaszewski, Santosh Shilimkar, Sekhar Nori,
linux-kernel, Bartosz Golaszewski, stable
On Thu, Sep 06, 2018 at 09:58:54AM -0700, Santosh Shilimkar wrote:
> Hi Arnd, Olof,
>
> On 9/6/2018 5:12 AM, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > Platform data pointer may be NULL. We check it everywhere but in one
> > place. Fix it.
> >
> > Fixes: 8af70cd2ca50 ("memory: aemif: add support for board files")
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > Cc: stable@vger.kernel.org
> > ---
> > drivers/memory/ti-aemif.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> Will you be able to push this via drivers-soc fixes ?
Applied to fixes.
-Olof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] memory: ti-aemif: fix a potential NULL-pointer dereference
2018-09-06 17:03 ` Olof Johansson
@ 2018-09-06 17:07 ` Santosh Shilimkar
0 siblings, 0 replies; 4+ messages in thread
From: Santosh Shilimkar @ 2018-09-06 17:07 UTC (permalink / raw)
To: Olof Johansson
Cc: Kevin Hilman, Dan Carpenter, Arnd Bergmann, arm,
Bartosz Golaszewski, Santosh Shilimkar, Sekhar Nori,
linux-kernel, Bartosz Golaszewski, stable
On 9/6/2018 10:03 AM, Olof Johansson wrote:
> On Thu, Sep 06, 2018 at 09:58:54AM -0700, Santosh Shilimkar wrote:
>> Hi Arnd, Olof,
>>
>> On 9/6/2018 5:12 AM, Bartosz Golaszewski wrote:
>>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>>
>>> Platform data pointer may be NULL. We check it everywhere but in one
>>> place. Fix it.
>>>
>>> Fixes: 8af70cd2ca50 ("memory: aemif: add support for board files")
>>> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>> Cc: stable@vger.kernel.org
>>> ---
>>> drivers/memory/ti-aemif.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>> Will you be able to push this via drivers-soc fixes ?
>
> Applied to fixes.
>
Thanks Olof !!
Regards,
Santosh
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-06 17:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-06 12:12 [PATCH] memory: ti-aemif: fix a potential NULL-pointer dereference Bartosz Golaszewski
2018-09-06 16:58 ` Santosh Shilimkar
2018-09-06 17:03 ` Olof Johansson
2018-09-06 17:07 ` Santosh Shilimkar
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).