All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] mmc: check correct variable after kzalloc()
@ 2013-02-12 12:24 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2013-02-12 12:24 UTC (permalink / raw)
  To: Chris Ball
  Cc: Seungwon Jeon, Namjae Jeon, Konstantin Dorfman, Venkatraman S,
	linux-mmc, kbuild, kernel-janitors

There is a typo here so we check "mqrq_cur->packed" instead of
"mqrq_prev->packed".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index c0d1315..97a848b 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -378,7 +378,7 @@ int mmc_packed_init(struct mmc_queue *mq, struct mmc_card *card)
 	}
 
 	mqrq_prev->packed = kzalloc(sizeof(struct mmc_packed), GFP_KERNEL);
-	if (!mqrq_cur->packed) {
+	if (!mqrq_prev->packed) {
 		pr_warn("%s: unable to allocate packed cmd for mqrq_prev\n",
 			   mmc_card_name(card));
 		kfree(mqrq_cur->packed);

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

* [patch] mmc: check correct variable after kzalloc()
@ 2013-02-12 12:24 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2013-02-12 12:24 UTC (permalink / raw)
  To: Chris Ball
  Cc: Seungwon Jeon, Namjae Jeon, Konstantin Dorfman, Venkatraman S,
	linux-mmc, kbuild, kernel-janitors

There is a typo here so we check "mqrq_cur->packed" instead of
"mqrq_prev->packed".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index c0d1315..97a848b 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -378,7 +378,7 @@ int mmc_packed_init(struct mmc_queue *mq, struct mmc_card *card)
 	}
 
 	mqrq_prev->packed = kzalloc(sizeof(struct mmc_packed), GFP_KERNEL);
-	if (!mqrq_cur->packed) {
+	if (!mqrq_prev->packed) {
 		pr_warn("%s: unable to allocate packed cmd for mqrq_prev\n",
 			   mmc_card_name(card));
 		kfree(mqrq_cur->packed);

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

* Re: [patch] mmc: check correct variable after kzalloc()
  2013-02-12 12:24 ` Dan Carpenter
@ 2013-02-12 12:27   ` Chris Ball
  -1 siblings, 0 replies; 6+ messages in thread
From: Chris Ball @ 2013-02-12 12:27 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Seungwon Jeon, Namjae Jeon, Konstantin Dorfman, Venkatraman S,
	linux-mmc, kbuild, kernel-janitors

Hi Dan,

On Tue, Feb 12 2013, Dan Carpenter wrote:
> There is a typo here so we check "mqrq_cur->packed" instead of
> "mqrq_prev->packed".
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
> index c0d1315..97a848b 100644
> --- a/drivers/mmc/card/queue.c
> +++ b/drivers/mmc/card/queue.c
> @@ -378,7 +378,7 @@ int mmc_packed_init(struct mmc_queue *mq, struct mmc_card *card)
>  	}
>  
>  	mqrq_prev->packed = kzalloc(sizeof(struct mmc_packed), GFP_KERNEL);
> -	if (!mqrq_cur->packed) {
> +	if (!mqrq_prev->packed) {
>  		pr_warn("%s: unable to allocate packed cmd for mqrq_prev\n",
>  			   mmc_card_name(card));
>  		kfree(mqrq_cur->packed);
>

Thanks, this is already fixed via a rebase edit to to the original patch
in mmc-next.  (Fengguang's 0-day bot caught it.)

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* Re: [patch] mmc: check correct variable after kzalloc()
@ 2013-02-12 12:27   ` Chris Ball
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Ball @ 2013-02-12 12:27 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Seungwon Jeon, Namjae Jeon, Konstantin Dorfman, Venkatraman S,
	linux-mmc, kbuild, kernel-janitors

Hi Dan,

On Tue, Feb 12 2013, Dan Carpenter wrote:
> There is a typo here so we check "mqrq_cur->packed" instead of
> "mqrq_prev->packed".
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
> index c0d1315..97a848b 100644
> --- a/drivers/mmc/card/queue.c
> +++ b/drivers/mmc/card/queue.c
> @@ -378,7 +378,7 @@ int mmc_packed_init(struct mmc_queue *mq, struct mmc_card *card)
>  	}
>  
>  	mqrq_prev->packed = kzalloc(sizeof(struct mmc_packed), GFP_KERNEL);
> -	if (!mqrq_cur->packed) {
> +	if (!mqrq_prev->packed) {
>  		pr_warn("%s: unable to allocate packed cmd for mqrq_prev\n",
>  			   mmc_card_name(card));
>  		kfree(mqrq_cur->packed);
>

Thanks, this is already fixed via a rebase edit to to the original patch
in mmc-next.  (Fengguang's 0-day bot caught it.)

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* Re: [patch] mmc: check correct variable after kzalloc()
  2013-02-12 12:27   ` Chris Ball
@ 2013-02-12 12:35     ` Dan Carpenter
  -1 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2013-02-12 12:35 UTC (permalink / raw)
  To: Chris Ball
  Cc: Seungwon Jeon, Namjae Jeon, Konstantin Dorfman, Venkatraman S,
	linux-mmc, kbuild, kernel-janitors

On Tue, Feb 12, 2013 at 07:27:26AM -0500, Chris Ball wrote:
> Hi Dan,
> 
> On Tue, Feb 12 2013, Dan Carpenter wrote:
> > There is a typo here so we check "mqrq_cur->packed" instead of
> > "mqrq_prev->packed".
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
> > index c0d1315..97a848b 100644
> > --- a/drivers/mmc/card/queue.c
> > +++ b/drivers/mmc/card/queue.c
> > @@ -378,7 +378,7 @@ int mmc_packed_init(struct mmc_queue *mq, struct mmc_card *card)
> >  	}
> >  
> >  	mqrq_prev->packed = kzalloc(sizeof(struct mmc_packed), GFP_KERNEL);
> > -	if (!mqrq_cur->packed) {
> > +	if (!mqrq_prev->packed) {
> >  		pr_warn("%s: unable to allocate packed cmd for mqrq_prev\n",
> >  			   mmc_card_name(card));
> >  		kfree(mqrq_cur->packed);
> >
> 
> Thanks, this is already fixed via a rebase edit to to the original patch
> in mmc-next.  (Fengguang's 0-day bot caught it.)
> 

Ah, grand.  We try to avoid duplicates but there is a gap in our
system...

regards,
dan carpenter

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

* Re: [patch] mmc: check correct variable after kzalloc()
@ 2013-02-12 12:35     ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2013-02-12 12:35 UTC (permalink / raw)
  To: Chris Ball
  Cc: Seungwon Jeon, Namjae Jeon, Konstantin Dorfman, Venkatraman S,
	linux-mmc, kbuild, kernel-janitors

On Tue, Feb 12, 2013 at 07:27:26AM -0500, Chris Ball wrote:
> Hi Dan,
> 
> On Tue, Feb 12 2013, Dan Carpenter wrote:
> > There is a typo here so we check "mqrq_cur->packed" instead of
> > "mqrq_prev->packed".
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
> > index c0d1315..97a848b 100644
> > --- a/drivers/mmc/card/queue.c
> > +++ b/drivers/mmc/card/queue.c
> > @@ -378,7 +378,7 @@ int mmc_packed_init(struct mmc_queue *mq, struct mmc_card *card)
> >  	}
> >  
> >  	mqrq_prev->packed = kzalloc(sizeof(struct mmc_packed), GFP_KERNEL);
> > -	if (!mqrq_cur->packed) {
> > +	if (!mqrq_prev->packed) {
> >  		pr_warn("%s: unable to allocate packed cmd for mqrq_prev\n",
> >  			   mmc_card_name(card));
> >  		kfree(mqrq_cur->packed);
> >
> 
> Thanks, this is already fixed via a rebase edit to to the original patch
> in mmc-next.  (Fengguang's 0-day bot caught it.)
> 

Ah, grand.  We try to avoid duplicates but there is a gap in our
system...

regards,
dan carpenter

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

end of thread, other threads:[~2013-02-12 12:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-12 12:24 [patch] mmc: check correct variable after kzalloc() Dan Carpenter
2013-02-12 12:24 ` Dan Carpenter
2013-02-12 12:27 ` Chris Ball
2013-02-12 12:27   ` Chris Ball
2013-02-12 12:35   ` Dan Carpenter
2013-02-12 12:35     ` Dan Carpenter

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.