From: Jan Kara <jack@suse.cz>
To: Jorge Bastos <mysql.jorge@decimal.pt>
Cc: "'Jan Kara'" <jack@suse.cz>,
linux-kernel@vger.kernel.org, reiserfs-devel@vger.kernel.org,
haiyangz@microsoft.com, hjanssen@microsoft.com
Subject: Re: Reiserfs.c bug in 3.2-rc5
Date: Mon, 2 Jan 2012 12:52:22 +0100 [thread overview]
Message-ID: <20120102115222.GA3626@quack.suse.cz> (raw)
In-Reply-To: <!&!AAAAAAAAAAAYAAAAAAAAAKCACr8ZwetPrGXZsycJodKihAAAEAAAAGPJDX4w3wxIo8Onu2+q/xMBAAAAAA==@decimal.pt>
[-- Attachment #1: Type: text/plain, Size: 913 bytes --]
On Sat 24-12-11 11:55:43, Jorge Bastos wrote:
> > >
> > > What can be done here?
> > The assertion failing is:
> > BUG_ON(nblocks > journal->j_trans_max);
> > in do_journal_begin_r(). That means that reiserfs_create() tried to
> > start a
> > transaction with more credits than allowed by the journal.
> >
> > When did you started to see this problem? Also do you use SELinux (or
> > generally security labels)?
> >
>
> No SELinux, the only change is from 3.1.1 to 3.2-rc5.
> Tried the new 3.2-rc7 and the problem persists.
OK, so do I understand right that 3.1.1 is OK but 3.2-rc5/rc7 have
the problem?
> Is there a way that the ReiserFS people can commit the fix?
Sure, we just have to find where the problem is. Can you please run with
the attached debugging patch applied and send me kernel output when the
system crashes? Thanks.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
[-- Attachment #2: 0001-reiserfs-Debugging-patch.patch --]
[-- Type: text/x-patch, Size: 1937 bytes --]
>From 4dd005ac485a6e86e2f81995894e9f8f6a352557 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Mon, 2 Jan 2012 12:49:06 +0100
Subject: [PATCH] reiserfs: Debugging patch
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/reiserfs/journal.c | 8 +++++++-
fs/reiserfs/namei.c | 7 +++++++
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index eb71106..c7ff04a 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -3003,7 +3003,13 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
int retval;
reiserfs_check_lock_depth(sb, "journal_begin");
- BUG_ON(nblocks > journal->j_trans_max);
+ if (nblocks > journal->j_trans_max) {
+ printk(KERN_ERR "Too many blocks for reiserfs a transaction"
+ " (%lu > %lu)\n", nblocks,
+ (unsigned long)journal->j_trans_max);
+ dump_stack();
+ return -EINVAL;
+ }
PROC_INFO_INC(sb, journal.journal_being);
/* set here for journal_join */
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index 80058e8..1a05abe 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -584,6 +584,7 @@ static int reiserfs_create(struct inode *dir, struct dentry *dentry, int mode,
REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb));
struct reiserfs_transaction_handle th;
struct reiserfs_security_handle security;
+ int security_ret;
dquot_initialize(dir);
@@ -598,11 +599,17 @@ static int reiserfs_create(struct inode *dir, struct dentry *dentry, int mode,
drop_new_inode(inode);
return retval;
}
+ security_ret = retval;
jbegin_count += retval;
reiserfs_write_lock(dir->i_sb);
retval = journal_begin(&th, dir->i_sb, jbegin_count);
if (retval) {
+ if (retval == -EINVAL) {
+ printk(KERN_ERR "reiserfs_security_init() returned %d"
+ " (dir=%lu)\n", security_ret, dir->i_ino);
+ BUG_ON(1);
+ }
drop_new_inode(inode);
goto out_failed;
}
--
1.7.1
next prev parent reply other threads:[~2012-01-02 11:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-10 23:48 Reiserfs.c bug in 3.2-rc5 Jorge Bastos
2011-12-13 18:07 ` Jan Kara
2011-12-24 11:55 ` Jorge Bastos
2012-01-02 11:52 ` Jan Kara [this message]
[not found] ` <005301ccc998$201c9da0$6055d8e0$@jorge@decimal.pt>
2012-01-03 1:08 ` Jan Kara
[not found] ` <000701ccc9fa$74df73f0$5e9e5bd0$@jorge@decimal.pt>
2012-01-03 12:38 ` Jan Kara
2012-01-03 15:25 ` Mimi Zohar
2012-01-03 16:48 ` Linus Torvalds
2012-01-03 18:45 ` Mimi Zohar
2012-01-03 19:17 ` Linus Torvalds
2012-01-03 22:28 ` Mimi Zohar
2012-01-03 23:47 ` James Morris
2012-01-04 0:18 ` Linus Torvalds
2012-01-04 1:02 ` James Morris
2012-01-04 17:15 ` Jan Kara
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=20120102115222.GA3626@quack.suse.cz \
--to=jack@suse.cz \
--cc=haiyangz@microsoft.com \
--cc=hjanssen@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mysql.jorge@decimal.pt \
--cc=reiserfs-devel@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