linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: fix to refer NULL pointer
@ 2013-01-26  5:19 Joonyoung Shim
  2013-01-27  8:10 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 3+ messages in thread
From: Joonyoung Shim @ 2013-01-26  5:19 UTC (permalink / raw)
  To: cjb; +Cc: linux-mmc, linux-kernel

Check whether host->sdio_irq_thread is NULL before wake_up_process() is
called about host->sdio_irq_thread.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
---
Currently the kernel panic to refer NULL pointer about
host->sdio_irq_thread are occuring at the trats board using Samsung
SDHCI driver.

 include/linux/mmc/host.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 61a10c1..2950fea 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -372,7 +372,8 @@ static inline void mmc_signal_sdio_irq(struct mmc_host *host)
 {
 	host->ops->enable_sdio_irq(host, 0);
 	host->sdio_irq_pending = true;
-	wake_up_process(host->sdio_irq_thread);
+	if (host->sdio_irq_thread)
+		wake_up_process(host->sdio_irq_thread);
 }
 
 #ifdef CONFIG_REGULATOR
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: fix to refer NULL pointer
  2013-01-26  5:19 [PATCH] mmc: fix to refer NULL pointer Joonyoung Shim
@ 2013-01-27  8:10 ` Guennadi Liakhovetski
  2013-01-28  2:14   ` Jaehoon Chung
  0 siblings, 1 reply; 3+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-27  8:10 UTC (permalink / raw)
  To: Joonyoung Shim; +Cc: cjb, linux-mmc, linux-kernel

On Sat, 26 Jan 2013, Joonyoung Shim wrote:

> Check whether host->sdio_irq_thread is NULL before wake_up_process() is
> called about host->sdio_irq_thread.

Actually, mmc_signal_sdio_irq() shouldn't be called if SDIO IRQ isn't 
used...

Thanks
Guennadi

> 
> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> ---
> Currently the kernel panic to refer NULL pointer about
> host->sdio_irq_thread are occuring at the trats board using Samsung
> SDHCI driver.
> 
>  include/linux/mmc/host.h |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index 61a10c1..2950fea 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -372,7 +372,8 @@ static inline void mmc_signal_sdio_irq(struct mmc_host *host)
>  {
>  	host->ops->enable_sdio_irq(host, 0);
>  	host->sdio_irq_pending = true;
> -	wake_up_process(host->sdio_irq_thread);
> +	if (host->sdio_irq_thread)
> +		wake_up_process(host->sdio_irq_thread);
>  }
>  
>  #ifdef CONFIG_REGULATOR
> -- 
> 1.7.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: fix to refer NULL pointer
  2013-01-27  8:10 ` Guennadi Liakhovetski
@ 2013-01-28  2:14   ` Jaehoon Chung
  0 siblings, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2013-01-28  2:14 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Joonyoung Shim, cjb, linux-mmc, linux-kernel

On 01/27/2013 05:10 PM, Guennadi Liakhovetski wrote:
> On Sat, 26 Jan 2013, Joonyoung Shim wrote:
> 
>> Check whether host->sdio_irq_thread is NULL before wake_up_process() is
>> called about host->sdio_irq_thread.
> 
> Actually, mmc_signal_sdio_irq() shouldn't be called if SDIO IRQ isn't 
> used...
Right, But I think that need to check whether the host->sdio_irq_thread is assigned or not.

Best Regards,
Jaehoon Chung
> 
> Thanks
> Guennadi
> 
>>
>> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
>> ---
>> Currently the kernel panic to refer NULL pointer about
>> host->sdio_irq_thread are occuring at the trats board using Samsung
>> SDHCI driver.
>>
>>  include/linux/mmc/host.h |    3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
>> index 61a10c1..2950fea 100644
>> --- a/include/linux/mmc/host.h
>> +++ b/include/linux/mmc/host.h
>> @@ -372,7 +372,8 @@ static inline void mmc_signal_sdio_irq(struct mmc_host *host)
>>  {
>>  	host->ops->enable_sdio_irq(host, 0);
>>  	host->sdio_irq_pending = true;
>> -	wake_up_process(host->sdio_irq_thread);
>> +	if (host->sdio_irq_thread)
>> +		wake_up_process(host->sdio_irq_thread);
>>  }
>>  
>>  #ifdef CONFIG_REGULATOR
>> -- 
>> 1.7.9.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-28  2:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-26  5:19 [PATCH] mmc: fix to refer NULL pointer Joonyoung Shim
2013-01-27  8:10 ` Guennadi Liakhovetski
2013-01-28  2:14   ` Jaehoon Chung

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).