public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: linux-mtd@lists.infradead.org
Cc: "Grégor Boirie" <gregor.boirie@parrot.com>
Subject: Re: m25p80: missing MTD owner
Date: Fri, 5 Oct 2012 02:51:18 +0200	[thread overview]
Message-ID: <201210050251.18859.marex@denx.de> (raw)
In-Reply-To: <50694DCB.6010303@parrot.com>

Dear Grégor Boirie,

> Hi all,
> 
> It seems possible to unload m25p80 module while a JFFS2 partition is
> still mounted onto flash. This produces oops when MTD layer tries to
> access underlying device later on.
> 
> A quick look at m25p_probe shows that "owner" field of allocated mtd
> device structure is left uninitialized, preventing MTD layer from
> incrementing module usage count. This patch for v3.4.11 solves the issue
> for me :
> 
> @@ -873,6 +873,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
>         else
>                 flash->mtd.name = dev_name(&spi->dev);
> 
> +       flash->mtd.owner = THIS_MODULE;
>         flash->mtd.type = MTD_NORFLASH;
>         flash->mtd.writesize = 1;
>         flash->mtd.flags = MTD_CAP_NORFLASH;
> 
> 
> Regards.

Do you mind submitting a proper patch via git send-email please?

Best regards,
Marek Vasut

      reply	other threads:[~2012-10-05  0:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01  8:01 m25p80: missing MTD owner Grégor Boirie
2012-10-05  0:51 ` Marek Vasut [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=201210050251.18859.marex@denx.de \
    --to=marex@denx.de \
    --cc=gregor.boirie@parrot.com \
    --cc=linux-mtd@lists.infradead.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