From: Ronald Wahl <ronald.wahl@raritan.com>
To: linux-mtd@lists.infradead.org
Subject: Re: cfi_intelext_is_locked() misses get_chip()/put_chip() calls
Date: Thu, 21 Aug 2014 20:43:21 +0200 [thread overview]
Message-ID: <53F63DC9.9050401@raritan.com> (raw)
In-Reply-To: <53F636E0.8030605@raritan.com>
Hi,
a possible fix is renaming the current do_getlockstatus_oneblock()
function to do_getlockstatus_oneblock_unlocked() and write a new
do_getlockstatus_oneblock() which wraps the *_unlocked function into
get_chip/put_chip. Additional we need to call the *_unlock function from
do_xxlock_oneblock because it already helds the chip lock.
- ron
On 21.08.2014 20:13, Ronald Wahl wrote:
> Hi,
>
> cfi_intelext_is_locked() in cfi_cmdset_0001.c calls
> do_getlockstatus_oneblock() withou calling get_chip() before and
> put_chip() afterwards. So chip state is changed without protection.
> This may lead to hanging processes.
>
> Is this analysis correct?
>
> If someone can fix this quickly - fine - but I can also provide a patch.
>
> greets,
> ron
>
--
Ronald Wahl - ronald.wahl@raritan.com - Phone +49 375271349-0 Fax -99
Raritan Deutschland GmbH, Kornmarkt 7, 08056 Zwickau, Germany
USt-IdNr. DE813094160, Steuer-Nr. 227/117/01749
Amtsgericht Chemnitz HRB 23605
Geschäftsführung: Stuart Hopper, Ralf Ploenes
prev parent reply other threads:[~2014-08-21 18:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 18:13 cfi_intelext_is_locked() misses get_chip()/put_chip() calls Ronald Wahl
2014-08-21 18:43 ` Ronald Wahl [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=53F63DC9.9050401@raritan.com \
--to=ronald.wahl@raritan.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 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.