Skip to contentSkip to conversation

2.6.28-rc6-mmotm1126 - BUG in disk quota code

DISCUSSION [email protected] 3 participants 6 messages Nov 26, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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'?

reviewer
#1 lore raw
Quoted 2 lines · On Wed 26-11-08 11:20:33, [email protected] 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

Quoted 47 lines
[   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'?

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#2 lore raw
Quoted 6 lines · Jan Kara
Quoted 2 lines · On Wed 26-11-08 11:20:33, [email protected] 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...

reviewer
#3 lore raw
Quoted 10 lines · On Wed 26-11-08 12:50:13, [email protected] wrote:
Quoted 6 lines · Jan Kara
Quoted 2 lines · On Wed 26-11-08 11:20:33, [email protected] 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

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
Quoted 1 line

From 47878ec675816082601ec6c6a34b174347299734 Mon Sep 17 00:00:00 2001

From: Jan Kara <[email protected]>
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.

---
 fs/dquot.c               |    6 ++++--
 include/linux/quotaops.h |    2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)
fs/dquot.c +4 -2
index 6f7df91..c724586 100644
@@ -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)
 {
include/linux/quotaops.h +2 -0
index f491394..21b781a 100644
@@ -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);
Signature · 1 line
1.6.0.4
Quoted 1 line

From 0d3e1815b72c86457cb77c180ae4af703cfd0324 Mon Sep 17 00:00:00 2001

From: Jan Kara <[email protected]>
Date: Tue, 25 Nov 2008 15:06:10 +0100
Subject: [PATCH 08/10] reiserfs: Add default allocation routines for quota structures

---
 fs/reiserfs/super.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/reiserfs/super.c +2 -0
index a9b393a..c55651f 100644
@@ -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 = {
Signature · 1 line
1.6.0.4
Quoted 1 line

From 6fd37ba50a6d3e349e843fe88cd866278674bc4f Mon Sep 17 00:00:00 2001

From: Jan Kara <[email protected]>
Date: Tue, 25 Nov 2008 15:08:30 +0100
Subject: [PATCH 09/10] ext3: Add default allocation routines for quota structures

---
 fs/ext3/super.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
fs/ext3/super.c +3 -1
index fee8705..abed9f9 100644
@@ -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 = {
Signature · 1 line
1.6.0.4
Quoted 1 line

From 9885ce56c2119e08e5dec2504cf05a88dd821b9d Mon Sep 17 00:00:00 2001

From: Jan Kara <[email protected]>
Date: Tue, 25 Nov 2008 15:09:11 +0100
Subject: [PATCH 10/10] ext4: Add default allocation routines for quota structures

---
 fs/ext4/super.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
fs/ext4/super.c +3 -1
index 9e5a717..e6a5d74 100644
@@ -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 = {
Signature · 1 line
1.6.0.4
#4 lore raw
Quoted 5 lines · Jan Kara
Quoted 2 lines

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...

#5 lore raw
In reply to Jan Kara
Quoted 3 lines · Jan Kara

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