From: Al Viro <viro@ZenIV.linux.org.uk>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: Linux FS Maling List <linux-fsdevel@vger.kernel.org>,
linux-mtd <linux-mtd-bounces@lists.infradead.org>,
MTD Maling List <linux-mtd@lists.infradead.org>,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH 1/2] UBIFS: prepare to fix a horrid bug
Date: Fri, 28 Jun 2013 14:54:08 +0100 [thread overview]
Message-ID: <20130628135408.GG4165@ZenIV.linux.org.uk> (raw)
In-Reply-To: <OF2055C26B.290CB8FD-ONC1257B98.00446680-C1257B98.00447A62@transmode.se>
On Fri, Jun 28, 2013 at 02:27:58PM +0200, Joakim Tjernlund wrote:
> > So here we introduce a local variable 'pos', read 'file->f_pose' once at
> very
> > the beginning, and then stick to 'pos'. The result of this is that when
> > 'ubifs_dir_llseek()' changes 'file->f_pos' while we are in the middle of
> > 'ubifs_readdir()', the latter "wins".
>
> Ouch, I hope JFFS2 doesn't have the same bug?
FWIW, this class of bugs (f_pos races, *not* kfree-under-us) is dealt with
by switch to saner API - see commits in linux-next marked [readdir] <something>
WARNING: multiple messages have this Message-ID (diff)
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: Artem Bityutskiy <dedekind1@gmail.com>,
Linux FS Maling List <linux-fsdevel@vger.kernel.org>,
MTD Maling List <linux-mtd@lists.infradead.org>,
linux-mtd <linux-mtd-bounces@lists.infradead.org>
Subject: Re: [PATCH 1/2] UBIFS: prepare to fix a horrid bug
Date: Fri, 28 Jun 2013 14:54:08 +0100 [thread overview]
Message-ID: <20130628135408.GG4165@ZenIV.linux.org.uk> (raw)
In-Reply-To: <OF2055C26B.290CB8FD-ONC1257B98.00446680-C1257B98.00447A62@transmode.se>
On Fri, Jun 28, 2013 at 02:27:58PM +0200, Joakim Tjernlund wrote:
> > So here we introduce a local variable 'pos', read 'file->f_pose' once at
> very
> > the beginning, and then stick to 'pos'. The result of this is that when
> > 'ubifs_dir_llseek()' changes 'file->f_pos' while we are in the middle of
> > 'ubifs_readdir()', the latter "wins".
>
> Ouch, I hope JFFS2 doesn't have the same bug?
FWIW, this class of bugs (f_pos races, *not* kfree-under-us) is dealt with
by switch to saner API - see commits in linux-next marked [readdir] <something>
next prev parent reply other threads:[~2013-06-28 13:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-28 11:15 [PATCH 1/2] UBIFS: prepare to fix a horrid bug Artem Bityutskiy
2013-06-28 11:15 ` Artem Bityutskiy
2013-06-28 11:15 ` [PATCH 2/2] UBIFS: " Artem Bityutskiy
2013-06-28 11:15 ` Artem Bityutskiy
2013-06-28 12:27 ` [PATCH 1/2] UBIFS: prepare to " Joakim Tjernlund
2013-06-28 12:27 ` Joakim Tjernlund
2013-06-28 13:54 ` Al Viro [this message]
2013-06-28 13:54 ` Al Viro
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=20130628135408.GG4165@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=dedekind1@gmail.com \
--cc=joakim.tjernlund@transmode.se \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mtd-bounces@lists.infradead.org \
--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.