mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 2.6.28-rc6-mmotm1126 - BUG in disk quota code
@ 2008-11-26 16:20 Valdis.Kletnieks
  2008-11-26 16:49 ` Jan Kara
  0 siblings, 1 reply; 6+ messages in thread
From: Valdis.Kletnieks @ 2008-11-26 16:20 UTC (permalink / raw)
  To: Andrew Morton, Jan Kara; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3254 bytes --]

System blew out when /etc/rc.sysinit did a 'quotaon -a'.  Not sure which
of the many quota-related commits in linux-next.patch or in -mm did this...

[   39.588815] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
[   39.589715] IP: [<0000000000000000>] 0x0
[   39.589715] PGD 0
[   39.589715] Oops: 0010 [#1] PREEMPT SMP
[   39.589715] last sysfs file: /sys/devices/virtual/block/dm-13/dev
[   39.589715] Dumping ftrace buffer:
[   39.589715]    (ftrace buffer empty)
[   39.589715] CPU 0
[   39.589715] Modules linked in: rtc acpi_cpufreq tpm_tis tpm tpm_bios arc4 ecb pcmcia iwl3945 rfkill mac80211 led_class lib80211 video yenta_socket output intel_agp cfg80211 button rsrc_nonstatic uhci_hcd ohci1394 thermal battery pcmcia_core iTCO_wdt dcdbas ac ieee1394 processor iTCO_vendor_support snd_hda_intel
[   39.589715] Pid: 1526, comm: quotaon Not tainted 2.6.28-rc6-mmotm1126 #1
[   39.589715] RIP: 0010:[<0000000000000000>]  [<0000000000000000>] 0x0
[   39.589715] RSP: 0018:ffff88007e12fd00  EFLAGS: 00010246
[   39.589715] RAX: ffffffff80740bb0 RBX: 0000000000000000 RCX: 0000000000000fe8
[   39.589715] RDX: 0000000000001514 RSI: 0000000000000001 RDI: ffff88007dc69c00
[   39.589715] RBP: ffff88007e12fd38 R08: ffff88007e12fcf8 R09: 00000000ffffffff
[   39.589715] R10: ffffffff8020ab8e R11: ffff88007e12faa8 R12: ffff88007bc47cb8
[   39.589715] R13: 0000000000000001 R14: ffff88007dc69c00 R15: 0000000000000000
[   39.589715] FS:  00007f1b84c616f0(0000) GS:ffffffff807b5500(0000) knlGS:0000000000000000
[   39.589715] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   39.589715] CR2: 0000000000000000 CR3: 000000007ec7b000 CR4: 00000000000006e0
[   39.589715] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   39.589715] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   39.589715] Process quotaon (pid: 1526, threadinfo ffff88007e12e000, task ffff88007f308040)
[   39.589715] Stack:
[   39.589715]  ffffffff802e974d 0000000000000fe8 0000000000000001 ffff88007bc47cb8
[   39.589715]  ffff88007bc47cc0 0000000000000000 0000000000000001 ffff88007e12fd78
[   39.589715]  ffffffff802e99ce ffff88007e12fd68 000000007bc6b3e0 ffff88007bc6b3e0
[   39.589715] Call Trace:
[   39.589715]  [<ffffffff802e974d>] ? dqget+0x104/0x2fd
[   39.589715]  [<ffffffff802e99ce>] dquot_initialize+0x88/0xbd
[   39.589715]  [<ffffffff8030d853>] ext3_dquot_initialize+0x56/0x77
[   39.589715]  [<ffffffff802e7854>] vfs_load_quota_inode+0x361/0x45e
[   39.589715]  [<ffffffff802e7c1b>] vfs_quota_on_path+0x4c/0x59
[   39.589715]  [<ffffffff80309dcc>] ext3_quota_on+0x153/0x170
[   39.589715]  [<ffffffff802ebff6>] sys_quotactl+0x408/0x6b6
[   39.589715]  [<ffffffff802a7431>] ? __fput+0x1c4/0x1d1
[   39.589715]  [<ffffffff8056a573>] ? trace_hardirqs_off_thunk+0x3a/0x6c
[   39.589715]  [<ffffffff8056a537>] ? trace_hardirqs_on_thunk+0x3a/0x3c
[   39.589715]  [<ffffffff8020bb3b>] system_call_fastpath+0x16/0x1b
[   39.589715] Code:  Bad RIP value.
[   39.589715] RIP  [<0000000000000000>] 0x0
[   39.589715]  RSP <ffff88007e12fd00>
[   39.589715] CR2: 0000000000000000
[   49.575587] ---[ end trace f5b21e7d583dfbbd ]---

I wonder where the system went for the 10 seconds between CR2 and 'end trace'?


[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.6.28-rc6-mmotm1126 - BUG in disk quota code
  2008-11-26 16:20 2.6.28-rc6-mmotm1126 - BUG in disk quota code Valdis.Kletnieks
@ 2008-11-26 16:49 ` Jan Kara
  2008-11-26 17:50   ` Valdis.Kletnieks
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kara @ 2008-11-26 16:49 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: Andrew Morton, linux-kernel

On Wed 26-11-08 11:20:33, Valdis.Kletnieks@vt.edu wrote:
> System blew out when /etc/rc.sysinit did a 'quotaon -a'.  Not sure which
> of the many quota-related commits in linux-next.patch or in -mm did this...
  Thanks for report. Already hit it myself and Mark should have the fix in
his tree (I sent it to him yesterday) so it should propagate into -mm
quickly.

									Honza

> [   39.588815] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
> [   39.589715] IP: [<0000000000000000>] 0x0
> [   39.589715] PGD 0
> [   39.589715] Oops: 0010 [#1] PREEMPT SMP
> [   39.589715] last sysfs file: /sys/devices/virtual/block/dm-13/dev
> [   39.589715] Dumping ftrace buffer:
> [   39.589715]    (ftrace buffer empty)
> [   39.589715] CPU 0
> [   39.589715] Modules linked in: rtc acpi_cpufreq tpm_tis tpm tpm_bios arc4 ecb pcmcia iwl3945 rfkill mac80211 led_class lib80211 video yenta_socket output intel_agp cfg80211 button rsrc_nonstatic uhci_hcd ohci1394 thermal battery pcmcia_core iTCO_wdt dcdbas ac ieee1394 processor iTCO_vendor_support snd_hda_intel
> [   39.589715] Pid: 1526, comm: quotaon Not tainted 2.6.28-rc6-mmotm1126 #1
> [   39.589715] RIP: 0010:[<0000000000000000>]  [<0000000000000000>] 0x0
> [   39.589715] RSP: 0018:ffff88007e12fd00  EFLAGS: 00010246
> [   39.589715] RAX: ffffffff80740bb0 RBX: 0000000000000000 RCX: 0000000000000fe8
> [   39.589715] RDX: 0000000000001514 RSI: 0000000000000001 RDI: ffff88007dc69c00
> [   39.589715] RBP: ffff88007e12fd38 R08: ffff88007e12fcf8 R09: 00000000ffffffff
> [   39.589715] R10: ffffffff8020ab8e R11: ffff88007e12faa8 R12: ffff88007bc47cb8
> [   39.589715] R13: 0000000000000001 R14: ffff88007dc69c00 R15: 0000000000000000
> [   39.589715] FS:  00007f1b84c616f0(0000) GS:ffffffff807b5500(0000) knlGS:0000000000000000
> [   39.589715] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> [   39.589715] CR2: 0000000000000000 CR3: 000000007ec7b000 CR4: 00000000000006e0
> [   39.589715] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [   39.589715] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> [   39.589715] Process quotaon (pid: 1526, threadinfo ffff88007e12e000, task ffff88007f308040)
> [   39.589715] Stack:
> [   39.589715]  ffffffff802e974d 0000000000000fe8 0000000000000001 ffff88007bc47cb8
> [   39.589715]  ffff88007bc47cc0 0000000000000000 0000000000000001 ffff88007e12fd78
> [   39.589715]  ffffffff802e99ce ffff88007e12fd68 000000007bc6b3e0 ffff88007bc6b3e0
> [   39.589715] Call Trace:
> [   39.589715]  [<ffffffff802e974d>] ? dqget+0x104/0x2fd
> [   39.589715]  [<ffffffff802e99ce>] dquot_initialize+0x88/0xbd
> [   39.589715]  [<ffffffff8030d853>] ext3_dquot_initialize+0x56/0x77
> [   39.589715]  [<ffffffff802e7854>] vfs_load_quota_inode+0x361/0x45e
> [   39.589715]  [<ffffffff802e7c1b>] vfs_quota_on_path+0x4c/0x59
> [   39.589715]  [<ffffffff80309dcc>] ext3_quota_on+0x153/0x170
> [   39.589715]  [<ffffffff802ebff6>] sys_quotactl+0x408/0x6b6
> [   39.589715]  [<ffffffff802a7431>] ? __fput+0x1c4/0x1d1
> [   39.589715]  [<ffffffff8056a573>] ? trace_hardirqs_off_thunk+0x3a/0x6c
> [   39.589715]  [<ffffffff8056a537>] ? trace_hardirqs_on_thunk+0x3a/0x3c
> [   39.589715]  [<ffffffff8020bb3b>] system_call_fastpath+0x16/0x1b
> [   39.589715] Code:  Bad RIP value.
> [   39.589715] RIP  [<0000000000000000>] 0x0
> [   39.589715]  RSP <ffff88007e12fd00>
> [   39.589715] CR2: 0000000000000000
> [   49.575587] ---[ end trace f5b21e7d583dfbbd ]---
> 
> I wonder where the system went for the 10 seconds between CR2 and 'end trace'?
> 


-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.6.28-rc6-mmotm1126 - BUG in disk quota code
  2008-11-26 16:49 ` Jan Kara
@ 2008-11-26 17:50   ` Valdis.Kletnieks
  2008-11-26 17:58     ` Jan Kara
  0 siblings, 1 reply; 6+ messages in thread
From: Valdis.Kletnieks @ 2008-11-26 17:50 UTC (permalink / raw)
  To: Jan Kara; +Cc: Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

On Wed, 26 Nov 2008 17:49:06 +0100, Jan Kara said:
> On Wed 26-11-08 11:20:33, Valdis.Kletnieks@vt.edu wrote:
> > System blew out when /etc/rc.sysinit did a 'quotaon -a'.  Not sure which
> > of the many quota-related commits in linux-next.patch or in -mm did this...
>   Thanks for report. Already hit it myself and Mark should have the fix in
> his tree (I sent it to him yesterday) so it should propagate into -mm
> quickly.

Good enough - I'll wait for Andrew to drop the next -mmotm, and I'll
yell if it's still broken then...


[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.6.28-rc6-mmotm1126 - BUG in disk quota code
  2008-11-26 17:50   ` Valdis.Kletnieks
@ 2008-11-26 17:58     ` Jan Kara
  2008-11-26 19:35       ` Valdis.Kletnieks
  2008-11-26 19:53       ` Mark Fasheh
  0 siblings, 2 replies; 6+ messages in thread
From: Jan Kara @ 2008-11-26 17:58 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: mfasheh, Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 870 bytes --]

On Wed 26-11-08 12:50:13, Valdis.Kletnieks@vt.edu wrote:
> On Wed, 26 Nov 2008 17:49:06 +0100, Jan Kara said:
> > On Wed 26-11-08 11:20:33, Valdis.Kletnieks@vt.edu wrote:
> > > System blew out when /etc/rc.sysinit did a 'quotaon -a'.  Not sure which
> > > of the many quota-related commits in linux-next.patch or in -mm did this...
> >   Thanks for report. Already hit it myself and Mark should have the fix in
> > his tree (I sent it to him yesterday) so it should propagate into -mm
> > quickly.
> 
> Good enough - I'll wait for Andrew to drop the next -mmotm, and I'll
> yell if it's still broken then...
  Hmm, I've just checked and it does not seem Mark has merged the patches
yet. I've attached the patches which fix the problem just in case you need
to boot the machine with -mm for some other purposes.

									Honza

-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

[-- Attachment #2: 0007-quota-Export-dquot_alloc-and-dquot_destroy-func.patch --]
[-- Type: text/x-patch, Size: 1897 bytes --]

>From 47878ec675816082601ec6c6a34b174347299734 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Tue, 25 Nov 2008 15:15:22 +0100
Subject: [PATCH 07/10] quota: Export dquot_alloc() and dquot_destroy() functions

These are default functions for creating and destroying quota structures
and they should be used from filesystems.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/dquot.c               |    6 ++++--
 include/linux/quotaops.h |    2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/dquot.c b/fs/dquot.c
index 6f7df91..c724586 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -413,10 +413,11 @@ out_dqlock:
 	return ret;
 }
 
-static void dquot_destroy(struct dquot *dquot)
+void dquot_destroy(struct dquot *dquot)
 {
 	kmem_cache_free(dquot_cachep, dquot);
 }
+EXPORT_SYMBOL(dquot_destroy);
 
 static inline void do_destroy_dquot(struct dquot *dquot)
 {
@@ -668,10 +669,11 @@ we_slept:
 	spin_unlock(&dq_list_lock);
 }
 
-static struct dquot *dquot_alloc(struct super_block *sb, int type)
+struct dquot *dquot_alloc(struct super_block *sb, int type)
 {
 	return kmem_cache_zalloc(dquot_cachep, GFP_NOFS);
 }
+EXPORT_SYMBOL(dquot_alloc);
 
 static struct dquot *get_empty_dquot(struct super_block *sb, int type)
 {
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index f491394..21b781a 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -31,6 +31,8 @@ int dquot_is_cached(struct super_block *sb, unsigned int id, int type);
 int dquot_scan_active(struct super_block *sb,
 		      int (*fn)(struct dquot *dquot, unsigned long priv),
 		      unsigned long priv);
+struct dquot *dquot_alloc(struct super_block *sb, int type);
+void dquot_destroy(struct dquot *dquot);
 
 int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc);
 int dquot_alloc_inode(const struct inode *inode, qsize_t number);
-- 
1.6.0.4


[-- Attachment #3: 0008-reiserfs-Add-default-allocation-routines-for-quota.patch --]
[-- Type: text/x-patch, Size: 833 bytes --]

>From 0d3e1815b72c86457cb77c180ae4af703cfd0324 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Tue, 25 Nov 2008 15:06:10 +0100
Subject: [PATCH 08/10] reiserfs: Add default allocation routines for quota structures

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/reiserfs/super.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index a9b393a..c55651f 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -649,6 +649,8 @@ static struct dquot_operations reiserfs_quota_operations = {
 	.release_dquot = reiserfs_release_dquot,
 	.mark_dirty = reiserfs_mark_dquot_dirty,
 	.write_info = reiserfs_write_info,
+	.alloc_dquot	= dquot_alloc,
+	.destroy_dquot	= dquot_destroy,
 };
 
 static struct quotactl_ops reiserfs_qctl_operations = {
-- 
1.6.0.4


[-- Attachment #4: 0009-ext3-Add-default-allocation-routines-for-quota-stru.patch --]
[-- Type: text/x-patch, Size: 862 bytes --]

>From 6fd37ba50a6d3e349e843fe88cd866278674bc4f Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Tue, 25 Nov 2008 15:08:30 +0100
Subject: [PATCH 09/10] ext3: Add default allocation routines for quota structures

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ext3/super.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index fee8705..abed9f9 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -713,7 +713,9 @@ static struct dquot_operations ext3_quota_operations = {
 	.acquire_dquot	= ext3_acquire_dquot,
 	.release_dquot	= ext3_release_dquot,
 	.mark_dirty	= ext3_mark_dquot_dirty,
-	.write_info	= ext3_write_info
+	.write_info	= ext3_write_info,
+	.alloc_dquot	= dquot_alloc,
+	.destroy_dquot	= dquot_destroy,
 };
 
 static struct quotactl_ops ext3_qctl_operations = {
-- 
1.6.0.4


[-- Attachment #5: 0010-ext4-Add-default-allocation-routines-for-quota-stru.patch --]
[-- Type: text/x-patch, Size: 862 bytes --]

>From 9885ce56c2119e08e5dec2504cf05a88dd821b9d Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Tue, 25 Nov 2008 15:09:11 +0100
Subject: [PATCH 10/10] ext4: Add default allocation routines for quota structures

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ext4/super.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 9e5a717..e6a5d74 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -803,7 +803,9 @@ static struct dquot_operations ext4_quota_operations = {
 	.acquire_dquot	= ext4_acquire_dquot,
 	.release_dquot	= ext4_release_dquot,
 	.mark_dirty	= ext4_mark_dquot_dirty,
-	.write_info	= ext4_write_info
+	.write_info	= ext4_write_info,
+	.alloc_dquot	= dquot_alloc,
+	.destroy_dquot	= dquot_destroy,
 };
 
 static struct quotactl_ops ext4_qctl_operations = {
-- 
1.6.0.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.6.28-rc6-mmotm1126 - BUG in disk quota code
  2008-11-26 17:58     ` Jan Kara
@ 2008-11-26 19:35       ` Valdis.Kletnieks
  2008-11-26 19:53       ` Mark Fasheh
  1 sibling, 0 replies; 6+ messages in thread
From: Valdis.Kletnieks @ 2008-11-26 19:35 UTC (permalink / raw)
  To: Jan Kara; +Cc: mfasheh, Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

On Wed, 26 Nov 2008 18:58:11 +0100, Jan Kara said:

> > Good enough - I'll wait for Andrew to drop the next -mmotm, and I'll
> > yell if it's still broken then...
>   Hmm, I've just checked and it does not seem Mark has merged the patches
> yet. I've attached the patches which fix the problem just in case you need
> to boot the machine with -mm for some other purposes.

Confirming the 4 patches fixed the BUG in quotaon.  Still need to track down
the ACPI bug I'm hitting...

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.6.28-rc6-mmotm1126 - BUG in disk quota code
  2008-11-26 17:58     ` Jan Kara
  2008-11-26 19:35       ` Valdis.Kletnieks
@ 2008-11-26 19:53       ` Mark Fasheh
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Fasheh @ 2008-11-26 19:53 UTC (permalink / raw)
  To: Jan Kara; +Cc: Valdis.Kletnieks, Andrew Morton, linux-kernel

On Wed, Nov 26, 2008 at 06:58:11PM +0100, Jan Kara wrote:
>   Hmm, I've just checked and it does not seem Mark has merged the patches
> yet. I've attached the patches which fix the problem just in case you need
> to boot the machine with -mm for some other purposes.

FYI, these are merged now along with the ocfs2 fixes you sent.
	--Mark


--
Mark Fasheh

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-11-26 19:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-26 16:20 2.6.28-rc6-mmotm1126 - BUG in disk quota code Valdis.Kletnieks
2008-11-26 16:49 ` Jan Kara
2008-11-26 17:50   ` Valdis.Kletnieks
2008-11-26 17:58     ` Jan Kara
2008-11-26 19:35       ` Valdis.Kletnieks
2008-11-26 19:53       ` Mark Fasheh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®