* [PATCH v2] soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create
@ 2017-07-31 4:31 ` Keerthy
0 siblings, 0 replies; 8+ messages in thread
From: Keerthy @ 2017-07-31 4:31 UTC (permalink / raw
To: ssantosh, m-karicheri2
Cc: t-kristo, linux-arm-kernel, linux-kernel, j-keerthy
knav_pool_create is an exported function. In the event of a call
before knav_queue_probe, we encounter a NULL pointer dereference
in the following line. Hence return -EPROBE_DEFER to the caller till
the kdev pointer is non-NULL.
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
Changes in v2:
* Fixed returning an int to returning pointer.
drivers/soc/ti/knav_qmss_queue.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index 279e7c5..d91626b 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -745,6 +745,9 @@ void *knav_pool_create(const char *name,
bool slot_found;
int ret;
+ if (!kdev)
+ return ERR_PTR(-EPROBE_DEFER);
+
if (!kdev->dev)
return ERR_PTR(-ENODEV);
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2] soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create
@ 2017-07-31 4:31 ` Keerthy
0 siblings, 0 replies; 8+ messages in thread
From: Keerthy @ 2017-07-31 4:31 UTC (permalink / raw
To: linux-arm-kernel
knav_pool_create is an exported function. In the event of a call
before knav_queue_probe, we encounter a NULL pointer dereference
in the following line. Hence return -EPROBE_DEFER to the caller till
the kdev pointer is non-NULL.
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
Changes in v2:
* Fixed returning an int to returning pointer.
drivers/soc/ti/knav_qmss_queue.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index 279e7c5..d91626b 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -745,6 +745,9 @@ void *knav_pool_create(const char *name,
bool slot_found;
int ret;
+ if (!kdev)
+ return ERR_PTR(-EPROBE_DEFER);
+
if (!kdev->dev)
return ERR_PTR(-ENODEV);
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create
2017-07-31 4:31 ` Keerthy
@ 2017-07-31 20:09 ` Santosh Shilimkar
-1 siblings, 0 replies; 8+ messages in thread
From: Santosh Shilimkar @ 2017-07-31 20:09 UTC (permalink / raw
To: Keerthy; +Cc: ssantosh, m-karicheri2, t-kristo, linux-arm-kernel, linux-kernel
On 7/30/2017 9:31 PM, Keerthy wrote:
> knav_pool_create is an exported function. In the event of a call
> before knav_queue_probe, we encounter a NULL pointer dereference
> in the following line. Hence return -EPROBE_DEFER to the caller till
> the kdev pointer is non-NULL.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
>
> Changes in v2:
>
> * Fixed returning an int to returning pointer.
Thanks. Will add it to the queue.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create
@ 2017-07-31 20:09 ` Santosh Shilimkar
0 siblings, 0 replies; 8+ messages in thread
From: Santosh Shilimkar @ 2017-07-31 20:09 UTC (permalink / raw
To: linux-arm-kernel
On 7/30/2017 9:31 PM, Keerthy wrote:
> knav_pool_create is an exported function. In the event of a call
> before knav_queue_probe, we encounter a NULL pointer dereference
> in the following line. Hence return -EPROBE_DEFER to the caller till
> the kdev pointer is non-NULL.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
>
> Changes in v2:
>
> * Fixed returning an int to returning pointer.
Thanks. Will add it to the queue.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create
2017-07-31 4:31 ` Keerthy
@ 2017-08-21 5:44 ` santosh.shilimkar at oracle.com
-1 siblings, 0 replies; 8+ messages in thread
From: santosh.shilimkar @ 2017-08-21 5:44 UTC (permalink / raw
To: arm@kernel.org, Arnd Bergmann
Cc: Keerthy, ssantosh, m-karicheri2, t-kristo, linux-arm-kernel,
linux-kernel
Hi Arnd,
On 7/30/17 9:31 PM, Keerthy wrote:
> knav_pool_create is an exported function. In the event of a call
> before knav_queue_probe, we encounter a NULL pointer dereference
> in the following line. Hence return -EPROBE_DEFER to the caller till
> the kdev pointer is non-NULL.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
>
> Changes in v2:
>
> * Fixed returning an int to returning pointer.
FWIW, Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Can you please also apply this fix in your fixes branch ?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create
@ 2017-08-21 5:44 ` santosh.shilimkar at oracle.com
0 siblings, 0 replies; 8+ messages in thread
From: santosh.shilimkar at oracle.com @ 2017-08-21 5:44 UTC (permalink / raw
To: linux-arm-kernel
Hi Arnd,
On 7/30/17 9:31 PM, Keerthy wrote:
> knav_pool_create is an exported function. In the event of a call
> before knav_queue_probe, we encounter a NULL pointer dereference
> in the following line. Hence return -EPROBE_DEFER to the caller till
> the kdev pointer is non-NULL.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
>
> Changes in v2:
>
> * Fixed returning an int to returning pointer.
FWIW, Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Can you please also apply this fix in your fixes branch ?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create
2017-08-21 5:44 ` santosh.shilimkar at oracle.com
@ 2017-08-21 7:21 ` Arnd Bergmann
-1 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2017-08-21 7:21 UTC (permalink / raw
To: santosh.shilimkar@oracle.com
Cc: arm@kernel.org, Keerthy, Santosh Shilimkar, Murali Karicheri,
Tero Kristo, Linux ARM, Linux Kernel Mailing List
On Mon, Aug 21, 2017 at 7:44 AM, santosh.shilimkar@oracle.com
<santosh.shilimkar@oracle.com> wrote:
> Hi Arnd,
>
> On 7/30/17 9:31 PM, Keerthy wrote:
>>
>> knav_pool_create is an exported function. In the event of a call
>> before knav_queue_probe, we encounter a NULL pointer dereference
>> in the following line. Hence return -EPROBE_DEFER to the caller till
>> the kdev pointer is non-NULL.
>>
>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>> ---
>>
>> Changes in v2:
>>
>> * Fixed returning an int to returning pointer.
>
> FWIW, Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
>
> Can you please also apply this fix in your fixes branch ?
Applied now, thanks!
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create
@ 2017-08-21 7:21 ` Arnd Bergmann
0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2017-08-21 7:21 UTC (permalink / raw
To: linux-arm-kernel
On Mon, Aug 21, 2017 at 7:44 AM, santosh.shilimkar at oracle.com
<santosh.shilimkar@oracle.com> wrote:
> Hi Arnd,
>
> On 7/30/17 9:31 PM, Keerthy wrote:
>>
>> knav_pool_create is an exported function. In the event of a call
>> before knav_queue_probe, we encounter a NULL pointer dereference
>> in the following line. Hence return -EPROBE_DEFER to the caller till
>> the kdev pointer is non-NULL.
>>
>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>> ---
>>
>> Changes in v2:
>>
>> * Fixed returning an int to returning pointer.
>
> FWIW, Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
>
> Can you please also apply this fix in your fixes branch ?
Applied now, thanks!
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-08-21 7:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-31 4:31 [PATCH v2] soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create Keerthy
2017-07-31 4:31 ` Keerthy
2017-07-31 20:09 ` Santosh Shilimkar
2017-07-31 20:09 ` Santosh Shilimkar
2017-08-21 5:44 ` santosh.shilimkar
2017-08-21 5:44 ` santosh.shilimkar at oracle.com
2017-08-21 7:21 ` Arnd Bergmann
2017-08-21 7:21 ` Arnd Bergmann
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.