All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jpirko@redhat.com
Cc: error27@gmail.com, netdev@vger.kernel.org, florian@openwrt.org,
	ralf@linux-mips.org, weil@mail.berlios.de,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] cpmac: use after free
Date: Wed, 03 Mar 2010 09:07:33 +0000	[thread overview]
Message-ID: <20100303.010733.98407421.davem@davemloft.net> (raw)
In-Reply-To: <20100303085957.GA2961@psychotron.lab.eng.brq.redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Wed, 3 Mar 2010 09:59:58 +0100

> Wed, Mar 03, 2010 at 09:46:10AM CET, error27@gmail.com wrote:
>>The original code dereferenced "cpmac_mii" after calling 
>>"mdiobus_free(cpmac_mii);"
>>
>>Signed-off-by: Dan Carpenter <error27@gmail.com>
>>---
>>Found by a static checker and not tested.  Sorry.  :/
>>
>>diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
>>index b85c81f..9d48942 100644
>>--- a/drivers/net/cpmac.c
>>+++ b/drivers/net/cpmac.c
>>@@ -1290,8 +1290,8 @@ void __devexit cpmac_exit(void)
>> {
>> 	platform_driver_unregister(&cpmac_driver);
>> 	mdiobus_unregister(cpmac_mii);
>>-	mdiobus_free(cpmac_mii);
>> 	iounmap(cpmac_mii->priv);
>>+	mdiobus_free(cpmac_mii);
>> }
>> 
>> module_init(cpmac_init);
> 
> Looks good. Thanks.
> 
> Reviewed-by: Jiri Pirko <jpirko@redhat.com>

Applied.

WARNING: multiple messages have this Message-ID (diff)
From: David Miller <davem@davemloft.net>
To: jpirko@redhat.com
Cc: error27@gmail.com, netdev@vger.kernel.org, florian@openwrt.org,
	ralf@linux-mips.org, weil@mail.berlios.de,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] cpmac: use after free
Date: Wed, 03 Mar 2010 01:07:33 -0800 (PST)	[thread overview]
Message-ID: <20100303.010733.98407421.davem@davemloft.net> (raw)
In-Reply-To: <20100303085957.GA2961@psychotron.lab.eng.brq.redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Wed, 3 Mar 2010 09:59:58 +0100

> Wed, Mar 03, 2010 at 09:46:10AM CET, error27@gmail.com wrote:
>>The original code dereferenced "cpmac_mii" after calling 
>>"mdiobus_free(cpmac_mii);"
>>
>>Signed-off-by: Dan Carpenter <error27@gmail.com>
>>---
>>Found by a static checker and not tested.  Sorry.  :/
>>
>>diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
>>index b85c81f..9d48942 100644
>>--- a/drivers/net/cpmac.c
>>+++ b/drivers/net/cpmac.c
>>@@ -1290,8 +1290,8 @@ void __devexit cpmac_exit(void)
>> {
>> 	platform_driver_unregister(&cpmac_driver);
>> 	mdiobus_unregister(cpmac_mii);
>>-	mdiobus_free(cpmac_mii);
>> 	iounmap(cpmac_mii->priv);
>>+	mdiobus_free(cpmac_mii);
>> }
>> 
>> module_init(cpmac_init);
> 
> Looks good. Thanks.
> 
> Reviewed-by: Jiri Pirko <jpirko@redhat.com>

Applied.

  reply	other threads:[~2010-03-03  9:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03  8:46 [patch] cpmac: use after free Dan Carpenter
2010-03-03  8:46 ` Dan Carpenter
2010-03-03  8:59 ` Jiri Pirko
2010-03-03  8:59   ` Jiri Pirko
2010-03-03  9:07   ` David Miller [this message]
2010-03-03  9:07     ` David Miller

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=20100303.010733.98407421.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=error27@gmail.com \
    --cc=florian@openwrt.org \
    --cc=jpirko@redhat.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=weil@mail.berlios.de \
    /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.