* [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove @ 2010-09-23 14:22 ` Marek Szyprowski 0 siblings, 0 replies; 14+ messages in thread From: Marek Szyprowski @ 2010-09-23 14:22 UTC (permalink / raw) To: linux-mmc, linux-samsung-soc, linux-arm-kernel Cc: m.szyprowski, kyungmin.park, kgene.kim, ben-linux, akpm, w.sang If not all clocks has been defined in platform data, driver will cause a null pointer dereference when it is being removed. This patch fixes this issue. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> --- drivers/mmc/host/sdhci-s3c.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 71ad416..757d92c 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -481,8 +481,10 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) sdhci_remove_host(host, 1); for (ptr = 0; ptr < 3; ptr++) { - clk_disable(sc->clk_bus[ptr]); - clk_put(sc->clk_bus[ptr]); + if (sc->clk_bus[ptr]) { + clk_disable(sc->clk_bus[ptr]); + clk_put(sc->clk_bus[ptr]); + } } clk_disable(sc->clk_io); clk_put(sc->clk_io); -- 1.7.1.569.g6f426 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove @ 2010-09-23 14:22 ` Marek Szyprowski 0 siblings, 0 replies; 14+ messages in thread From: Marek Szyprowski @ 2010-09-23 14:22 UTC (permalink / raw) To: linux-arm-kernel If not all clocks has been defined in platform data, driver will cause a null pointer dereference when it is being removed. This patch fixes this issue. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> --- drivers/mmc/host/sdhci-s3c.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 71ad416..757d92c 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -481,8 +481,10 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) sdhci_remove_host(host, 1); for (ptr = 0; ptr < 3; ptr++) { - clk_disable(sc->clk_bus[ptr]); - clk_put(sc->clk_bus[ptr]); + if (sc->clk_bus[ptr]) { + clk_disable(sc->clk_bus[ptr]); + clk_put(sc->clk_bus[ptr]); + } } clk_disable(sc->clk_io); clk_put(sc->clk_io); -- 1.7.1.569.g6f426 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove 2010-09-23 14:22 ` Marek Szyprowski @ 2010-09-23 19:08 ` Andrew Morton -1 siblings, 0 replies; 14+ messages in thread From: Andrew Morton @ 2010-09-23 19:08 UTC (permalink / raw) To: Marek Szyprowski Cc: linux-mmc, linux-samsung-soc, linux-arm-kernel, kyungmin.park, kgene.kim, ben-linux, w.sang On Thu, 23 Sep 2010 16:22:05 +0200 Marek Szyprowski <m.szyprowski@samsung.com> wrote: > If not all clocks has been defined in platform data, driver will cause > a null pointer dereference when it is being removed. This patch fixes > this issue. > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> > --- > drivers/mmc/host/sdhci-s3c.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c > index 71ad416..757d92c 100644 > --- a/drivers/mmc/host/sdhci-s3c.c > +++ b/drivers/mmc/host/sdhci-s3c.c > @@ -481,8 +481,10 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) > sdhci_remove_host(host, 1); > > for (ptr = 0; ptr < 3; ptr++) { > - clk_disable(sc->clk_bus[ptr]); > - clk_put(sc->clk_bus[ptr]); > + if (sc->clk_bus[ptr]) { > + clk_disable(sc->clk_bus[ptr]); > + clk_put(sc->clk_bus[ptr]); > + } > } > clk_disable(sc->clk_io); > clk_put(sc->clk_io); The patch applies OK to 2.6.35. Is the bug present there as well? If so, should we fix it in earlier kernels? If so then the way in which we indicate this is by adding Cc: <stable@kernel.org> to the changelog. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove @ 2010-09-23 19:08 ` Andrew Morton 0 siblings, 0 replies; 14+ messages in thread From: Andrew Morton @ 2010-09-23 19:08 UTC (permalink / raw) To: linux-arm-kernel On Thu, 23 Sep 2010 16:22:05 +0200 Marek Szyprowski <m.szyprowski@samsung.com> wrote: > If not all clocks has been defined in platform data, driver will cause > a null pointer dereference when it is being removed. This patch fixes > this issue. > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> > --- > drivers/mmc/host/sdhci-s3c.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c > index 71ad416..757d92c 100644 > --- a/drivers/mmc/host/sdhci-s3c.c > +++ b/drivers/mmc/host/sdhci-s3c.c > @@ -481,8 +481,10 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) > sdhci_remove_host(host, 1); > > for (ptr = 0; ptr < 3; ptr++) { > - clk_disable(sc->clk_bus[ptr]); > - clk_put(sc->clk_bus[ptr]); > + if (sc->clk_bus[ptr]) { > + clk_disable(sc->clk_bus[ptr]); > + clk_put(sc->clk_bus[ptr]); > + } > } > clk_disable(sc->clk_io); > clk_put(sc->clk_io); The patch applies OK to 2.6.35. Is the bug present there as well? If so, should we fix it in earlier kernels? If so then the way in which we indicate this is by adding Cc: <stable@kernel.org> to the changelog. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove 2010-09-23 19:08 ` Andrew Morton @ 2010-09-25 22:53 ` Chris Ball -1 siblings, 0 replies; 14+ messages in thread From: Chris Ball @ 2010-09-25 22:53 UTC (permalink / raw) To: Andrew Morton Cc: Marek Szyprowski, linux-mmc, linux-samsung-soc, linux-arm-kernel, kyungmin.park, kgene.kim, ben-linux, w.sang On Thu, Sep 23, 2010 at 12:08:03PM -0700, Andrew Morton wrote: > The patch applies OK to 2.6.35. Is the bug present there as well? If > so, should we fix it in earlier kernels? If so then the way in which > we indicate this is by adding > > Cc: <stable@kernel.org> > > to the changelog. Marek, Kyungmin, what do you think? Andrew, I've been waiting for an ACK from Ben Dooks, since he's listed in MAINTAINERS for this driver, but he hasn't replied yet (I've tried pinging privately). I'll plan on sending Marek's two s3c fixes to Linus tomorrow regardless (this one with Cc: <stable@kernel.org>) along with my MAINTAINERS update for MMC unless anyone objects. Thanks, -- Chris Ball <cjb@laptop.org> <http://printf.net/> One Laptop Per Child ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove @ 2010-09-25 22:53 ` Chris Ball 0 siblings, 0 replies; 14+ messages in thread From: Chris Ball @ 2010-09-25 22:53 UTC (permalink / raw) To: linux-arm-kernel On Thu, Sep 23, 2010 at 12:08:03PM -0700, Andrew Morton wrote: > The patch applies OK to 2.6.35. Is the bug present there as well? If > so, should we fix it in earlier kernels? If so then the way in which > we indicate this is by adding > > Cc: <stable@kernel.org> > > to the changelog. Marek, Kyungmin, what do you think? Andrew, I've been waiting for an ACK from Ben Dooks, since he's listed in MAINTAINERS for this driver, but he hasn't replied yet (I've tried pinging privately). I'll plan on sending Marek's two s3c fixes to Linus tomorrow regardless (this one with Cc: <stable@kernel.org>) along with my MAINTAINERS update for MMC unless anyone objects. Thanks, -- Chris Ball <cjb@laptop.org> <http://printf.net/> One Laptop Per Child ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove 2010-09-25 22:53 ` Chris Ball @ 2010-09-26 10:53 ` Kyungmin Park -1 siblings, 0 replies; 14+ messages in thread From: Kyungmin Park @ 2010-09-26 10:53 UTC (permalink / raw) To: Chris Ball Cc: Andrew Morton, Marek Szyprowski, linux-mmc, linux-samsung-soc, linux-arm-kernel, kgene.kim, ben-linux, w.sang On Sun, Sep 26, 2010 at 7:53 AM, Chris Ball <cjb@laptop.org> wrote: > On Thu, Sep 23, 2010 at 12:08:03PM -0700, Andrew Morton wrote: >> The patch applies OK to 2.6.35. Is the bug present there as well? If >> so, should we fix it in earlier kernels? If so then the way in which >> we indicate this is by adding >> >> Cc: <stable@kernel.org> >> >> to the changelog. > > Marek, Kyungmin, what do you think? Of course my opinion is should be merged at this time. In normal case it's built as static module. so there's no complains. but it should be fixed. My SOB is already included at patch. so no need to ACK from me. Thank you, Kyungmin Park > > Andrew, I've been waiting for an ACK from Ben Dooks, since he's listed > in MAINTAINERS for this driver, but he hasn't replied yet (I've tried > pinging privately). I'll plan on sending Marek's two s3c fixes to > Linus tomorrow regardless (this one with Cc: <stable@kernel.org>) > along with my MAINTAINERS update for MMC unless anyone objects. > > Thanks, > > -- > Chris Ball <cjb@laptop.org> <http://printf.net/> > One Laptop Per Child > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove @ 2010-09-26 10:53 ` Kyungmin Park 0 siblings, 0 replies; 14+ messages in thread From: Kyungmin Park @ 2010-09-26 10:53 UTC (permalink / raw) To: linux-arm-kernel On Sun, Sep 26, 2010 at 7:53 AM, Chris Ball <cjb@laptop.org> wrote: > On Thu, Sep 23, 2010 at 12:08:03PM -0700, Andrew Morton wrote: >> The patch applies OK to 2.6.35. ?Is the bug present there as well? ?If >> so, should we fix it in earlier kernels? ?If so then the way in which >> we indicate this is by adding >> >> ? ? ? Cc: <stable@kernel.org> >> >> to the changelog. > > Marek, Kyungmin, what do you think? Of course my opinion is should be merged at this time. In normal case it's built as static module. so there's no complains. but it should be fixed. My SOB is already included at patch. so no need to ACK from me. Thank you, Kyungmin Park > > Andrew, I've been waiting for an ACK from Ben Dooks, since he's listed > in MAINTAINERS for this driver, but he hasn't replied yet (I've tried > pinging privately). ?I'll plan on sending Marek's two s3c fixes to > Linus tomorrow regardless (this one with Cc: <stable@kernel.org>) > along with my MAINTAINERS update for MMC unless anyone objects. > > Thanks, > > -- > Chris Ball ? <cjb@laptop.org> ? <http://printf.net/> > One Laptop Per Child > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at ?http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove 2010-09-26 10:53 ` Kyungmin Park @ 2010-09-26 15:25 ` Chris Ball -1 siblings, 0 replies; 14+ messages in thread From: Chris Ball @ 2010-09-26 15:25 UTC (permalink / raw) To: Kyungmin Park Cc: Andrew Morton, Marek Szyprowski, linux-mmc, linux-samsung-soc, linux-arm-kernel, kgene.kim, ben-linux, w.sang Hi Kyungmin, On Sun, Sep 26, 2010 at 07:53:48PM +0900, Kyungmin Park wrote: > On Sun, Sep 26, 2010 at 7:53 AM, Chris Ball <cjb@laptop.org> wrote: > > On Thu, Sep 23, 2010 at 12:08:03PM -0700, Andrew Morton wrote: > >> The patch applies OK to 2.6.35. Is the bug present there as well? If > >> so, should we fix it in earlier kernels? If so then the way in which > >> we indicate this is by adding > >> > >> Cc: <stable@kernel.org> > >> > >> to the changelog. > > > > Marek, Kyungmin, what do you think? > > Of course my opinion is should be merged at this time. > In normal case it's built as static module. so there's no complains. > but it should be fixed. > My SOB is already included at patch. so no need to ACK from me. Andrew's question isn't whether it should be merged, but whether it should also be applied to the stable kernel, since the bug appears to be present in the 2.6.35 release as well. Thanks, -- Chris Ball <cjb@laptop.org> <http://printf.net/> One Laptop Per Child ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove @ 2010-09-26 15:25 ` Chris Ball 0 siblings, 0 replies; 14+ messages in thread From: Chris Ball @ 2010-09-26 15:25 UTC (permalink / raw) To: linux-arm-kernel Hi Kyungmin, On Sun, Sep 26, 2010 at 07:53:48PM +0900, Kyungmin Park wrote: > On Sun, Sep 26, 2010 at 7:53 AM, Chris Ball <cjb@laptop.org> wrote: > > On Thu, Sep 23, 2010 at 12:08:03PM -0700, Andrew Morton wrote: > >> The patch applies OK to 2.6.35. ?Is the bug present there as well? ?If > >> so, should we fix it in earlier kernels? ?If so then the way in which > >> we indicate this is by adding > >> > >> ? ? ? Cc: <stable@kernel.org> > >> > >> to the changelog. > > > > Marek, Kyungmin, what do you think? > > Of course my opinion is should be merged at this time. > In normal case it's built as static module. so there's no complains. > but it should be fixed. > My SOB is already included at patch. so no need to ACK from me. Andrew's question isn't whether it should be merged, but whether it should also be applied to the stable kernel, since the bug appears to be present in the 2.6.35 release as well. Thanks, -- Chris Ball <cjb@laptop.org> <http://printf.net/> One Laptop Per Child ^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove 2010-09-25 22:53 ` Chris Ball @ 2010-09-27 6:09 ` Marek Szyprowski -1 siblings, 0 replies; 14+ messages in thread From: Marek Szyprowski @ 2010-09-27 6:09 UTC (permalink / raw) To: 'Chris Ball', 'Andrew Morton' Cc: linux-mmc, linux-samsung-soc, linux-arm-kernel, kyungmin.park, kgene.kim, ben-linux, w.sang Hello, On Sunday, September 26, 2010 12:53 AM Chris Ball wrote: > On Thu, Sep 23, 2010 at 12:08:03PM -0700, Andrew Morton wrote: > > The patch applies OK to 2.6.35. Is the bug present there as well? If > > so, should we fix it in earlier kernels? If so then the way in which > > we indicate this is by adding > > > > Cc: <stable@kernel.org> > > > > to the changelog. > > Marek, Kyungmin, what do you think? > > Andrew, I've been waiting for an ACK from Ben Dooks, since he's listed > in MAINTAINERS for this driver, but he hasn't replied yet (I've tried > pinging privately). I'll plan on sending Marek's two s3c fixes to > Linus tomorrow regardless (this one with Cc: <stable@kernel.org>) > along with my MAINTAINERS update for MMC unless anyone objects. I'm sorry, I was on holidays. You are right, both fixes should go to 2.6.36 as well Best regards -- Marek Szyprowski Samsung Poland R&D Center ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove @ 2010-09-27 6:09 ` Marek Szyprowski 0 siblings, 0 replies; 14+ messages in thread From: Marek Szyprowski @ 2010-09-27 6:09 UTC (permalink / raw) To: linux-arm-kernel Hello, On Sunday, September 26, 2010 12:53 AM Chris Ball wrote: > On Thu, Sep 23, 2010 at 12:08:03PM -0700, Andrew Morton wrote: > > The patch applies OK to 2.6.35. Is the bug present there as well? If > > so, should we fix it in earlier kernels? If so then the way in which > > we indicate this is by adding > > > > Cc: <stable@kernel.org> > > > > to the changelog. > > Marek, Kyungmin, what do you think? > > Andrew, I've been waiting for an ACK from Ben Dooks, since he's listed > in MAINTAINERS for this driver, but he hasn't replied yet (I've tried > pinging privately). I'll plan on sending Marek's two s3c fixes to > Linus tomorrow regardless (this one with Cc: <stable@kernel.org>) > along with my MAINTAINERS update for MMC unless anyone objects. I'm sorry, I was on holidays. You are right, both fixes should go to 2.6.36 as well Best regards -- Marek Szyprowski Samsung Poland R&D Center ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove 2010-09-23 14:22 ` Marek Szyprowski @ 2010-09-23 19:12 ` Chris Ball -1 siblings, 0 replies; 14+ messages in thread From: Chris Ball @ 2010-09-23 19:12 UTC (permalink / raw) To: ben-linux Cc: Marek Szyprowski, linux-mmc, linux-samsung-soc, linux-arm-kernel, kyungmin.park, kgene.kim, akpm, w.sang Hi Ben, On Thu, Sep 23, 2010 at 04:22:05PM +0200, Marek Szyprowski wrote: > If not all clocks has been defined in platform data, driver will cause > a null pointer dereference when it is being removed. This patch fixes > this issue. > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> > --- > drivers/mmc/host/sdhci-s3c.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c > index 71ad416..757d92c 100644 > --- a/drivers/mmc/host/sdhci-s3c.c > +++ b/drivers/mmc/host/sdhci-s3c.c > @@ -481,8 +481,10 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) > sdhci_remove_host(host, 1); > > for (ptr = 0; ptr < 3; ptr++) { > - clk_disable(sc->clk_bus[ptr]); > - clk_put(sc->clk_bus[ptr]); > + if (sc->clk_bus[ptr]) { > + clk_disable(sc->clk_bus[ptr]); > + clk_put(sc->clk_bus[ptr]); > + } > } > clk_disable(sc->clk_io); > clk_put(sc->clk_io); I'll send this to Linus for .36 after you reply with an ACK. Thanks, -- Chris Ball <cjb@laptop.org> <http://printf.net/> One Laptop Per Child ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove @ 2010-09-23 19:12 ` Chris Ball 0 siblings, 0 replies; 14+ messages in thread From: Chris Ball @ 2010-09-23 19:12 UTC (permalink / raw) To: linux-arm-kernel Hi Ben, On Thu, Sep 23, 2010 at 04:22:05PM +0200, Marek Szyprowski wrote: > If not all clocks has been defined in platform data, driver will cause > a null pointer dereference when it is being removed. This patch fixes > this issue. > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> > --- > drivers/mmc/host/sdhci-s3c.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c > index 71ad416..757d92c 100644 > --- a/drivers/mmc/host/sdhci-s3c.c > +++ b/drivers/mmc/host/sdhci-s3c.c > @@ -481,8 +481,10 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) > sdhci_remove_host(host, 1); > > for (ptr = 0; ptr < 3; ptr++) { > - clk_disable(sc->clk_bus[ptr]); > - clk_put(sc->clk_bus[ptr]); > + if (sc->clk_bus[ptr]) { > + clk_disable(sc->clk_bus[ptr]); > + clk_put(sc->clk_bus[ptr]); > + } > } > clk_disable(sc->clk_io); > clk_put(sc->clk_io); I'll send this to Linus for .36 after you reply with an ACK. Thanks, -- Chris Ball <cjb@laptop.org> <http://printf.net/> One Laptop Per Child ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2010-09-27 6:09 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-09-23 14:22 [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove Marek Szyprowski 2010-09-23 14:22 ` Marek Szyprowski 2010-09-23 19:08 ` Andrew Morton 2010-09-23 19:08 ` Andrew Morton 2010-09-25 22:53 ` Chris Ball 2010-09-25 22:53 ` Chris Ball 2010-09-26 10:53 ` Kyungmin Park 2010-09-26 10:53 ` Kyungmin Park 2010-09-26 15:25 ` Chris Ball 2010-09-26 15:25 ` Chris Ball 2010-09-27 6:09 ` Marek Szyprowski 2010-09-27 6:09 ` Marek Szyprowski 2010-09-23 19:12 ` Chris Ball 2010-09-23 19:12 ` Chris Ball
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.