public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Fleming <matt@console-pimps.org>
To: Daniel Drake <dsd@laptop.org>
Cc: linux-mmc@vger.kernel.org
Subject: Re: crash in mmc subsystem during suspend
Date: Tue, 1 Dec 2009 13:40:10 +0000	[thread overview]
Message-ID: <20091201134010.GA21413@console-pimps.org> (raw)
In-Reply-To: <1259671766.2124.34.camel@localhost.localdomain>

On Tue, Dec 01, 2009 at 12:49:26PM +0000, Daniel Drake wrote:
> On Sat, 2009-11-21 at 12:31 +0000, Matt Fleming wrote:
> > Fancy giving this patch a try? I think it's just a case of removing too
> > many funcs in the error path.
> 
> Thanks!
> Yes, I agree that looks like the culprit.
> I applied something very similar to your patch and the crash went away.
> 
> The one additional change I made is in sdio_bus.c :
> 
>  void sdio_remove_func(struct sdio_func *func)
>  {
> -       if (sdio_func_present(func))
> -               device_del(&func->dev);
> +       if (!sdio_func_present(func))
> +               return;
>  
> +       device_del(&func->dev);
>         put_device(&func->dev);
>  }
> 
> I think this is necessary because the error path will go mmc_sdio_remove
> --> sdio_remove_func
> Hence sdio_remove_func() will be called when sdio_add_func() was never
> called beforehand, so there is no func->dev reference to drop.
> 
> Do you agree? I'm not certain about this one.
> 
> Thanks!
> Daniel
> 

Yep, your patch looks correct. Good catch.

Would you mind making a proper patch (S-O-B line and all) and submitting
it to the linux-mmc mailing list and CC'ing Andrew Morton?

Cheers


      reply	other threads:[~2009-12-01 13:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20  8:51 crash in mmc subsystem during suspend Daniel Drake
2009-11-20 15:10 ` Daniel Drake
2009-11-21 12:31   ` Matt Fleming
2009-12-01 12:49     ` Daniel Drake
2009-12-01 13:40       ` Matt Fleming [this message]

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=20091201134010.GA21413@console-pimps.org \
    --to=matt@console-pimps.org \
    --cc=dsd@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox