All of lore.kernel.org
 help / color / mirror / Atom feed
* BUG: unable to handle kernel NULL pointer dereference at   (null)
@ 2011-04-05 17:38 Johannes Hirte
  2011-04-05 17:42 ` Josef Bacik
  0 siblings, 1 reply; 22+ messages in thread
From: Johannes Hirte @ 2011-04-05 17:38 UTC (permalink / raw)
  To: Josef Bacik; +Cc: linux-btrfs

With the latest btrfs changes, I got this Oops when doing rm on a large 
directory:

BUG: unable to handle kernel NULL pointer dereference at   (null)
IP: [<c101c838>] kunmap+0x46/0x46
*pdpt = 0000000034a85001 *pde = 0000000000000000 
Oops: 0000 [#1] PREEMPT SMP 
last sysfs file: /sys/devices/virtual/vtconsole/vtcon1/uevent
Modules linked in: snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device 
snd_pcm_oss snd_mixer_oss fuse dm_crypt dm_mod usbhid snd_intel8x0 
snd_ac97_codec ac97_bus snd_pcm snd_timer sr_mod cdrom sg snd fschmd e1000 
uhci_hcd snd_page_alloc i2c_i801 [last unloaded: microcode]

Pid: 1156, comm: btrfs-transacti Tainted: G        W   2.6.39-rc1-00262-
gc53813f #20 FUJITSU SIEMENS SCENIC P / SCENICO P/D1561
EIP: 0060:[<c101c838>] EFLAGS: 00010296 CPU: 1
EIP is at kmap+0x0/0x38
EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000010
ESI: f5bc6400 EDI: f3c75520 EBP: f3c755f0 ESP: f58f9e10
 DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Process btrfs-transacti (pid: 1156, ti=f58f8000 task=f6516f40 
task.ti=f58f8000)
Stack:
 c1186d15 ffc22000 f58f9ec0 00000010 f3c75610 00000000 f5885780 f52339e8
 00000009 f5bc6400 00010000 00000000 f6415800 f3c75638 000008bb f5bc63c0
 f58857b4 f60b68a0 00000040 f52338e8 ffc22000 00000000 00000008 00000010
Call Trace:
 [<c1186d15>] ? btrfs_write_out_cache+0x60c/0xa3c
 [<c114a815>] ? btrfs_write_dirty_block_groups+0x400/0x494
 [<c11566a7>] ? commit_cowonly_roots+0xa9/0x180
 [<c1157799>] ? btrfs_commit_transaction+0x2ee/0x59c
 [<c1037c85>] ? wake_up_bit+0x16/0x16
 [<c1152a83>] ? transaction_kthread+0x149/0x1d6
 [<c101d1b9>] ? complete+0x28/0x36
 [<c115293a>] ? btrfs_congested_fn+0x5d/0x5d
 [<c10379c4>] ? kthread+0x63/0x68
 [<c1037961>] ? kthread_worker_fn+0xeb/0xeb
 [<c13cba36>] ? kernel_thread_helper+0x6/0xd
Code: 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81 f9 00 08 00 00 74 11 81 f9 00 0c 
00 00 75 0e 83 3d 10 2f 60 c1 02 75 05 e9 5e a3 04 00 c3 <8b> 10 c1 ea 1e c1 
e2 0a 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81 
EIP: [<c101c838>] kmap+0x0/0x38 SS:ESP 0068:f58f9e10
CR2: 0000000000000000
---[ end trace c8511126ee91dfdf ]---

This is the second Oops. On the first one I wasn't able to catch the backtrace, 
but IIRC the bug happend on kmap not kunmap the first time.

regards,
  Johannes

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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-05 17:38 BUG: unable to handle kernel NULL pointer dereference at (null) Johannes Hirte
@ 2011-04-05 17:42 ` Josef Bacik
  2011-04-05 18:52   ` Johannes Hirte
  0 siblings, 1 reply; 22+ messages in thread
From: Josef Bacik @ 2011-04-05 17:42 UTC (permalink / raw)
  To: Johannes Hirte; +Cc: Josef Bacik, linux-btrfs

On Tue, Apr 05, 2011 at 07:38:13PM +0200, Johannes Hirte wrote:
> With the latest btrfs changes, I got this Oops when doing rm on a large 
> directory:
> 
> BUG: unable to handle kernel NULL pointer dereference at   (null)
> IP: [<c101c838>] kunmap+0x46/0x46
> *pdpt = 0000000034a85001 *pde = 0000000000000000 
> Oops: 0000 [#1] PREEMPT SMP 
> last sysfs file: /sys/devices/virtual/vtconsole/vtcon1/uevent
> Modules linked in: snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device 
> snd_pcm_oss snd_mixer_oss fuse dm_crypt dm_mod usbhid snd_intel8x0 
> snd_ac97_codec ac97_bus snd_pcm snd_timer sr_mod cdrom sg snd fschmd e1000 
> uhci_hcd snd_page_alloc i2c_i801 [last unloaded: microcode]
> 
> Pid: 1156, comm: btrfs-transacti Tainted: G        W   2.6.39-rc1-00262-
> gc53813f #20 FUJITSU SIEMENS SCENIC P / SCENICO P/D1561
> EIP: 0060:[<c101c838>] EFLAGS: 00010296 CPU: 1
> EIP is at kmap+0x0/0x38
> EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000010
> ESI: f5bc6400 EDI: f3c75520 EBP: f3c755f0 ESP: f58f9e10
>  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> Process btrfs-transacti (pid: 1156, ti=f58f8000 task=f6516f40 
> task.ti=f58f8000)
> Stack:
>  c1186d15 ffc22000 f58f9ec0 00000010 f3c75610 00000000 f5885780 f52339e8
>  00000009 f5bc6400 00010000 00000000 f6415800 f3c75638 000008bb f5bc63c0
>  f58857b4 f60b68a0 00000040 f52338e8 ffc22000 00000000 00000008 00000010
> Call Trace:
>  [<c1186d15>] ? btrfs_write_out_cache+0x60c/0xa3c
>  [<c114a815>] ? btrfs_write_dirty_block_groups+0x400/0x494
>  [<c11566a7>] ? commit_cowonly_roots+0xa9/0x180
>  [<c1157799>] ? btrfs_commit_transaction+0x2ee/0x59c
>  [<c1037c85>] ? wake_up_bit+0x16/0x16
>  [<c1152a83>] ? transaction_kthread+0x149/0x1d6
>  [<c101d1b9>] ? complete+0x28/0x36
>  [<c115293a>] ? btrfs_congested_fn+0x5d/0x5d
>  [<c10379c4>] ? kthread+0x63/0x68
>  [<c1037961>] ? kthread_worker_fn+0xeb/0xeb
>  [<c13cba36>] ? kernel_thread_helper+0x6/0xd
> Code: 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81 f9 00 08 00 00 74 11 81 f9 00 0c 
> 00 00 75 0e 83 3d 10 2f 60 c1 02 75 05 e9 5e a3 04 00 c3 <8b> 10 c1 ea 1e c1 
> e2 0a 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81 
> EIP: [<c101c838>] kmap+0x0/0x38 SS:ESP 0068:f58f9e10
> CR2: 0000000000000000
> ---[ end trace c8511126ee91dfdf ]---
> 
> This is the second Oops. On the first one I wasn't able to catch the backtrace, 
> but IIRC the bug happend on kmap not kunmap the first time.
>

Yeah I think I know what this is but I need somebody to verify it for me.  Can
you run with this patch and let me know what happens?  Thanks,

Josef

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 74bc432..5e6f4b3 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -624,6 +624,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 
 		next_page = false;
 
+		BUG_ON(index > last_index);
 		if (index == 0) {
 			start_offset = first_page_offset;
 			offset = start_offset;
@@ -732,6 +733,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 		struct btrfs_free_space *entry =
 			list_entry(pos, struct btrfs_free_space, list);
 
+		BUG_ON(index > last_index);
 		page = find_get_page(inode->i_mapping, index);
 
 		addr = kmap(page);

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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-05 17:42 ` Josef Bacik
@ 2011-04-05 18:52   ` Johannes Hirte
  2011-04-05 18:53     ` Josef Bacik
  0 siblings, 1 reply; 22+ messages in thread
From: Johannes Hirte @ 2011-04-05 18:52 UTC (permalink / raw)
  To: Josef Bacik; +Cc: linux-btrfs

On Tuesday 05 April 2011 19:42:03 Josef Bacik wrote:
> On Tue, Apr 05, 2011 at 07:38:13PM +0200, Johannes Hirte wrote:
> > With the latest btrfs changes, I got this Oops when doing rm on a large
> > directory:
> > 
> > BUG: unable to handle kernel NULL pointer dereference at   (null)
> > IP: [<c101c838>] kunmap+0x46/0x46
> > *pdpt = 0000000034a85001 *pde = 0000000000000000
> > Oops: 0000 [#1] PREEMPT SMP
> > last sysfs file: /sys/devices/virtual/vtconsole/vtcon1/uevent
> > Modules linked in: snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device
> > snd_pcm_oss snd_mixer_oss fuse dm_crypt dm_mod usbhid snd_intel8x0
> > snd_ac97_codec ac97_bus snd_pcm snd_timer sr_mod cdrom sg snd fschmd
> > e1000 uhci_hcd snd_page_alloc i2c_i801 [last unloaded: microcode]
> > 
> > Pid: 1156, comm: btrfs-transacti Tainted: G        W   2.6.39-rc1-00262-
> > gc53813f #20 FUJITSU SIEMENS SCENIC P / SCENICO P/D1561
> > EIP: 0060:[<c101c838>] EFLAGS: 00010296 CPU: 1
> > EIP is at kmap+0x0/0x38
> > EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000010
> > ESI: f5bc6400 EDI: f3c75520 EBP: f3c755f0 ESP: f58f9e10
> > 
> >  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> > 
> > Process btrfs-transacti (pid: 1156, ti=f58f8000 task=f6516f40
> > task.ti=f58f8000)
> > 
> > Stack:
> >  c1186d15 ffc22000 f58f9ec0 00000010 f3c75610 00000000 f5885780 f52339e8
> >  00000009 f5bc6400 00010000 00000000 f6415800 f3c75638 000008bb f5bc63c0
> >  f58857b4 f60b68a0 00000040 f52338e8 ffc22000 00000000 00000008 00000010
> > 
> > Call Trace:
> >  [<c1186d15>] ? btrfs_write_out_cache+0x60c/0xa3c
> >  [<c114a815>] ? btrfs_write_dirty_block_groups+0x400/0x494
> >  [<c11566a7>] ? commit_cowonly_roots+0xa9/0x180
> >  [<c1157799>] ? btrfs_commit_transaction+0x2ee/0x59c
> >  [<c1037c85>] ? wake_up_bit+0x16/0x16
> >  [<c1152a83>] ? transaction_kthread+0x149/0x1d6
> >  [<c101d1b9>] ? complete+0x28/0x36
> >  [<c115293a>] ? btrfs_congested_fn+0x5d/0x5d
> >  [<c10379c4>] ? kthread+0x63/0x68
> >  [<c1037961>] ? kthread_worker_fn+0xeb/0xeb
> >  [<c13cba36>] ? kernel_thread_helper+0x6/0xd
> > 
> > Code: 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81 f9 00 08 00 00 74 11 81 f9
> > 00 0c 00 00 75 0e 83 3d 10 2f 60 c1 02 75 05 e9 5e a3 04 00 c3 <8b> 10
> > c1 ea 1e c1 e2 0a 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81
> > EIP: [<c101c838>] kmap+0x0/0x38 SS:ESP 0068:f58f9e10
> > CR2: 0000000000000000
> > ---[ end trace c8511126ee91dfdf ]---
> > 
> > This is the second Oops. On the first one I wasn't able to catch the
> > backtrace, but IIRC the bug happend on kmap not kunmap the first time.
> 
> Yeah I think I know what this is but I need somebody to verify it for me. 
> Can you run with this patch and let me know what happens?  Thanks,
> 
> Josef
> 
> diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> index 74bc432..5e6f4b3 100644
> --- a/fs/btrfs/free-space-cache.c
> +++ b/fs/btrfs/free-space-cache.c
> @@ -624,6 +624,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> 
>  		next_page = false;
> 
> +		BUG_ON(index > last_index);
>  		if (index == 0) {
>  			start_offset = first_page_offset;
>  			offset = start_offset;
> @@ -732,6 +733,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  		struct btrfs_free_space *entry =
>  			list_entry(pos, struct btrfs_free_space, list);
> 
> +		BUG_ON(index > last_index);
>  		page = find_get_page(inode->i_mapping, index);
> 
>  		addr = kmap(page);

Hm, I tried but now I hit the 
BUG_ON(block_group->total_bitmaps >= max_bitmaps); in add_new_bitmap in
fs/btrfs/free-space-cache.c:1255 when booting the system.

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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-05 18:52   ` Johannes Hirte
@ 2011-04-05 18:53     ` Josef Bacik
  2011-04-05 19:21       ` Johannes Hirte
  0 siblings, 1 reply; 22+ messages in thread
From: Josef Bacik @ 2011-04-05 18:53 UTC (permalink / raw)
  To: Johannes Hirte; +Cc: Josef Bacik, linux-btrfs

On Tue, Apr 05, 2011 at 08:52:21PM +0200, Johannes Hirte wrote:
> On Tuesday 05 April 2011 19:42:03 Josef Bacik wrote:
> > On Tue, Apr 05, 2011 at 07:38:13PM +0200, Johannes Hirte wrote:
> > > With the latest btrfs changes, I got this Oops when doing rm on a large
> > > directory:
> > > 
> > > BUG: unable to handle kernel NULL pointer dereference at   (null)
> > > IP: [<c101c838>] kunmap+0x46/0x46
> > > *pdpt = 0000000034a85001 *pde = 0000000000000000
> > > Oops: 0000 [#1] PREEMPT SMP
> > > last sysfs file: /sys/devices/virtual/vtconsole/vtcon1/uevent
> > > Modules linked in: snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device
> > > snd_pcm_oss snd_mixer_oss fuse dm_crypt dm_mod usbhid snd_intel8x0
> > > snd_ac97_codec ac97_bus snd_pcm snd_timer sr_mod cdrom sg snd fschmd
> > > e1000 uhci_hcd snd_page_alloc i2c_i801 [last unloaded: microcode]
> > > 
> > > Pid: 1156, comm: btrfs-transacti Tainted: G        W   2.6.39-rc1-00262-
> > > gc53813f #20 FUJITSU SIEMENS SCENIC P / SCENICO P/D1561
> > > EIP: 0060:[<c101c838>] EFLAGS: 00010296 CPU: 1
> > > EIP is at kmap+0x0/0x38
> > > EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000010
> > > ESI: f5bc6400 EDI: f3c75520 EBP: f3c755f0 ESP: f58f9e10
> > > 
> > >  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> > > 
> > > Process btrfs-transacti (pid: 1156, ti=f58f8000 task=f6516f40
> > > task.ti=f58f8000)
> > > 
> > > Stack:
> > >  c1186d15 ffc22000 f58f9ec0 00000010 f3c75610 00000000 f5885780 f52339e8
> > >  00000009 f5bc6400 00010000 00000000 f6415800 f3c75638 000008bb f5bc63c0
> > >  f58857b4 f60b68a0 00000040 f52338e8 ffc22000 00000000 00000008 00000010
> > > 
> > > Call Trace:
> > >  [<c1186d15>] ? btrfs_write_out_cache+0x60c/0xa3c
> > >  [<c114a815>] ? btrfs_write_dirty_block_groups+0x400/0x494
> > >  [<c11566a7>] ? commit_cowonly_roots+0xa9/0x180
> > >  [<c1157799>] ? btrfs_commit_transaction+0x2ee/0x59c
> > >  [<c1037c85>] ? wake_up_bit+0x16/0x16
> > >  [<c1152a83>] ? transaction_kthread+0x149/0x1d6
> > >  [<c101d1b9>] ? complete+0x28/0x36
> > >  [<c115293a>] ? btrfs_congested_fn+0x5d/0x5d
> > >  [<c10379c4>] ? kthread+0x63/0x68
> > >  [<c1037961>] ? kthread_worker_fn+0xeb/0xeb
> > >  [<c13cba36>] ? kernel_thread_helper+0x6/0xd
> > > 
> > > Code: 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81 f9 00 08 00 00 74 11 81 f9
> > > 00 0c 00 00 75 0e 83 3d 10 2f 60 c1 02 75 05 e9 5e a3 04 00 c3 <8b> 10
> > > c1 ea 1e c1 e2 0a 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81
> > > EIP: [<c101c838>] kmap+0x0/0x38 SS:ESP 0068:f58f9e10
> > > CR2: 0000000000000000
> > > ---[ end trace c8511126ee91dfdf ]---
> > > 
> > > This is the second Oops. On the first one I wasn't able to catch the
> > > backtrace, but IIRC the bug happend on kmap not kunmap the first time.
> > 
> > Yeah I think I know what this is but I need somebody to verify it for me. 
> > Can you run with this patch and let me know what happens?  Thanks,
> > 
> > Josef
> > 
> > diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> > index 74bc432..5e6f4b3 100644
> > --- a/fs/btrfs/free-space-cache.c
> > +++ b/fs/btrfs/free-space-cache.c
> > @@ -624,6 +624,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> > 
> >  		next_page = false;
> > 
> > +		BUG_ON(index > last_index);
> >  		if (index == 0) {
> >  			start_offset = first_page_offset;
> >  			offset = start_offset;
> > @@ -732,6 +733,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> >  		struct btrfs_free_space *entry =
> >  			list_entry(pos, struct btrfs_free_space, list);
> > 
> > +		BUG_ON(index > last_index);
> >  		page = find_get_page(inode->i_mapping, index);
> > 
> >  		addr = kmap(page);
> 
> Hm, I tried but now I hit the 
> BUG_ON(block_group->total_bitmaps >= max_bitmaps); in add_new_bitmap in
> fs/btrfs/free-space-cache.c:1255 when booting the system.

Can you mount -o clear_cache to make sure it's not the cache thats causing that?
Thanks,

Josef

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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-05 18:53     ` Josef Bacik
@ 2011-04-05 19:21       ` Johannes Hirte
  2011-04-05 19:31         ` Josef Bacik
  0 siblings, 1 reply; 22+ messages in thread
From: Johannes Hirte @ 2011-04-05 19:21 UTC (permalink / raw)
  To: Josef Bacik; +Cc: linux-btrfs

On Tuesday 05 April 2011 20:53:24 Josef Bacik wrote:
> On Tue, Apr 05, 2011 at 08:52:21PM +0200, Johannes Hirte wrote:
> > On Tuesday 05 April 2011 19:42:03 Josef Bacik wrote:
> > > On Tue, Apr 05, 2011 at 07:38:13PM +0200, Johannes Hirte wrote:
> > > > With the latest btrfs changes, I got this Oops when doing rm on a
> > > > large directory:
> > > > 
> > > > BUG: unable to handle kernel NULL pointer dereference at   (null)
> > > > IP: [<c101c838>] kunmap+0x46/0x46
> > > > *pdpt = 0000000034a85001 *pde = 0000000000000000
> > > > Oops: 0000 [#1] PREEMPT SMP
> > > > last sysfs file: /sys/devices/virtual/vtconsole/vtcon1/uevent
> > > > Modules linked in: snd_seq_oss snd_seq_midi_event snd_seq
> > > > snd_seq_device snd_pcm_oss snd_mixer_oss fuse dm_crypt dm_mod usbhid
> > > > snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm snd_timer sr_mod cdrom
> > > > sg snd fschmd e1000 uhci_hcd snd_page_alloc i2c_i801 [last unloaded:
> > > > microcode]
> > > > 
> > > > Pid: 1156, comm: btrfs-transacti Tainted: G        W  
> > > > 2.6.39-rc1-00262- gc53813f #20 FUJITSU SIEMENS SCENIC P / SCENICO
> > > > P/D1561
> > > > EIP: 0060:[<c101c838>] EFLAGS: 00010296 CPU: 1
> > > > EIP is at kmap+0x0/0x38
> > > > EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000010
> > > > ESI: f5bc6400 EDI: f3c75520 EBP: f3c755f0 ESP: f58f9e10
> > > > 
> > > >  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> > > > 
> > > > Process btrfs-transacti (pid: 1156, ti=f58f8000 task=f6516f40
> > > > task.ti=f58f8000)
> > > > 
> > > > Stack:
> > > >  c1186d15 ffc22000 f58f9ec0 00000010 f3c75610 00000000 f5885780
> > > >  f52339e8 00000009 f5bc6400 00010000 00000000 f6415800 f3c75638
> > > >  000008bb f5bc63c0 f58857b4 f60b68a0 00000040 f52338e8 ffc22000
> > > >  00000000 00000008 00000010
> > > > 
> > > > Call Trace:
> > > >  [<c1186d15>] ? btrfs_write_out_cache+0x60c/0xa3c
> > > >  [<c114a815>] ? btrfs_write_dirty_block_groups+0x400/0x494
> > > >  [<c11566a7>] ? commit_cowonly_roots+0xa9/0x180
> > > >  [<c1157799>] ? btrfs_commit_transaction+0x2ee/0x59c
> > > >  [<c1037c85>] ? wake_up_bit+0x16/0x16
> > > >  [<c1152a83>] ? transaction_kthread+0x149/0x1d6
> > > >  [<c101d1b9>] ? complete+0x28/0x36
> > > >  [<c115293a>] ? btrfs_congested_fn+0x5d/0x5d
> > > >  [<c10379c4>] ? kthread+0x63/0x68
> > > >  [<c1037961>] ? kthread_worker_fn+0xeb/0xeb
> > > >  [<c13cba36>] ? kernel_thread_helper+0x6/0xd
> > > > 
> > > > Code: 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81 f9 00 08 00 00 74 11 81
> > > > f9 00 0c 00 00 75 0e 83 3d 10 2f 60 c1 02 75 05 e9 5e a3 04 00 c3
> > > > <8b> 10 c1 ea 1e c1 e2 0a 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81
> > > > EIP: [<c101c838>] kmap+0x0/0x38 SS:ESP 0068:f58f9e10
> > > > CR2: 0000000000000000
> > > > ---[ end trace c8511126ee91dfdf ]---
> > > > 
> > > > This is the second Oops. On the first one I wasn't able to catch the
> > > > backtrace, but IIRC the bug happend on kmap not kunmap the first
> > > > time.
> > > 
> > > Yeah I think I know what this is but I need somebody to verify it for
> > > me. Can you run with this patch and let me know what happens?  Thanks,
> > > 
> > > Josef
> > > 
> > > diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> > > index 74bc432..5e6f4b3 100644
> > > --- a/fs/btrfs/free-space-cache.c
> > > +++ b/fs/btrfs/free-space-cache.c
> > > @@ -624,6 +624,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> > > 
> > >  		next_page = false;
> > > 
> > > +		BUG_ON(index > last_index);
> > > 
> > >  		if (index == 0) {
> > >  		
> > >  			start_offset = first_page_offset;
> > >  			offset = start_offset;
> > > 
> > > @@ -732,6 +733,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> > > 
> > >  		struct btrfs_free_space *entry =
> > >  		
> > >  			list_entry(pos, struct btrfs_free_space, list);
> > > 
> > > +		BUG_ON(index > last_index);
> > > 
> > >  		page = find_get_page(inode->i_mapping, index);
> > >  		
> > >  		addr = kmap(page);
> > 
> > Hm, I tried but now I hit the
> > BUG_ON(block_group->total_bitmaps >= max_bitmaps); in add_new_bitmap in
> > fs/btrfs/free-space-cache.c:1255 when booting the system.
> 
> Can you mount -o clear_cache to make sure it's not the cache thats causing
> that? Thanks,
> 
> Josef

Mounting  with clear_cache under 2.6.38 helped. I was able to boot and test 
with your patch an hit the second BUG_ON on free-space-cache.c:738.

regards,
  Johannes

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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-05 19:21       ` Johannes Hirte
@ 2011-04-05 19:31         ` Josef Bacik
       [not found]           ` <201104052308.53816.johannes.hirte@fem.tu-ilmenau.de>
  0 siblings, 1 reply; 22+ messages in thread
From: Josef Bacik @ 2011-04-05 19:31 UTC (permalink / raw)
  To: Johannes Hirte; +Cc: Josef Bacik, linux-btrfs

On Tue, Apr 05, 2011 at 09:21:55PM +0200, Johannes Hirte wrote:
> On Tuesday 05 April 2011 20:53:24 Josef Bacik wrote:
> > On Tue, Apr 05, 2011 at 08:52:21PM +0200, Johannes Hirte wrote:
> > > On Tuesday 05 April 2011 19:42:03 Josef Bacik wrote:
> > > > On Tue, Apr 05, 2011 at 07:38:13PM +0200, Johannes Hirte wrote:
> > > > > With the latest btrfs changes, I got this Oops when doing rm on a
> > > > > large directory:
> > > > > 
> > > > > BUG: unable to handle kernel NULL pointer dereference at   (null)
> > > > > IP: [<c101c838>] kunmap+0x46/0x46
> > > > > *pdpt = 0000000034a85001 *pde = 0000000000000000
> > > > > Oops: 0000 [#1] PREEMPT SMP
> > > > > last sysfs file: /sys/devices/virtual/vtconsole/vtcon1/uevent
> > > > > Modules linked in: snd_seq_oss snd_seq_midi_event snd_seq
> > > > > snd_seq_device snd_pcm_oss snd_mixer_oss fuse dm_crypt dm_mod usbhid
> > > > > snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm snd_timer sr_mod cdrom
> > > > > sg snd fschmd e1000 uhci_hcd snd_page_alloc i2c_i801 [last unloaded:
> > > > > microcode]
> > > > > 
> > > > > Pid: 1156, comm: btrfs-transacti Tainted: G        W  
> > > > > 2.6.39-rc1-00262- gc53813f #20 FUJITSU SIEMENS SCENIC P / SCENICO
> > > > > P/D1561
> > > > > EIP: 0060:[<c101c838>] EFLAGS: 00010296 CPU: 1
> > > > > EIP is at kmap+0x0/0x38
> > > > > EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000010
> > > > > ESI: f5bc6400 EDI: f3c75520 EBP: f3c755f0 ESP: f58f9e10
> > > > > 
> > > > >  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> > > > > 
> > > > > Process btrfs-transacti (pid: 1156, ti=f58f8000 task=f6516f40
> > > > > task.ti=f58f8000)
> > > > > 
> > > > > Stack:
> > > > >  c1186d15 ffc22000 f58f9ec0 00000010 f3c75610 00000000 f5885780
> > > > >  f52339e8 00000009 f5bc6400 00010000 00000000 f6415800 f3c75638
> > > > >  000008bb f5bc63c0 f58857b4 f60b68a0 00000040 f52338e8 ffc22000
> > > > >  00000000 00000008 00000010
> > > > > 
> > > > > Call Trace:
> > > > >  [<c1186d15>] ? btrfs_write_out_cache+0x60c/0xa3c
> > > > >  [<c114a815>] ? btrfs_write_dirty_block_groups+0x400/0x494
> > > > >  [<c11566a7>] ? commit_cowonly_roots+0xa9/0x180
> > > > >  [<c1157799>] ? btrfs_commit_transaction+0x2ee/0x59c
> > > > >  [<c1037c85>] ? wake_up_bit+0x16/0x16
> > > > >  [<c1152a83>] ? transaction_kthread+0x149/0x1d6
> > > > >  [<c101d1b9>] ? complete+0x28/0x36
> > > > >  [<c115293a>] ? btrfs_congested_fn+0x5d/0x5d
> > > > >  [<c10379c4>] ? kthread+0x63/0x68
> > > > >  [<c1037961>] ? kthread_worker_fn+0xeb/0xeb
> > > > >  [<c13cba36>] ? kernel_thread_helper+0x6/0xd
> > > > > 
> > > > > Code: 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81 f9 00 08 00 00 74 11 81
> > > > > f9 00 0c 00 00 75 0e 83 3d 10 2f 60 c1 02 75 05 e9 5e a3 04 00 c3
> > > > > <8b> 10 c1 ea 1e c1 e2 0a 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81
> > > > > EIP: [<c101c838>] kmap+0x0/0x38 SS:ESP 0068:f58f9e10
> > > > > CR2: 0000000000000000
> > > > > ---[ end trace c8511126ee91dfdf ]---
> > > > > 
> > > > > This is the second Oops. On the first one I wasn't able to catch the
> > > > > backtrace, but IIRC the bug happend on kmap not kunmap the first
> > > > > time.
> > > > 
> > > > Yeah I think I know what this is but I need somebody to verify it for
> > > > me. Can you run with this patch and let me know what happens?  Thanks,
> > > > 
> > > > Josef
> > > > 
> > > > diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> > > > index 74bc432..5e6f4b3 100644
> > > > --- a/fs/btrfs/free-space-cache.c
> > > > +++ b/fs/btrfs/free-space-cache.c
> > > > @@ -624,6 +624,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> > > > 
> > > >  		next_page = false;
> > > > 
> > > > +		BUG_ON(index > last_index);
> > > > 
> > > >  		if (index == 0) {
> > > >  		
> > > >  			start_offset = first_page_offset;
> > > >  			offset = start_offset;
> > > > 
> > > > @@ -732,6 +733,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> > > > 
> > > >  		struct btrfs_free_space *entry =
> > > >  		
> > > >  			list_entry(pos, struct btrfs_free_space, list);
> > > > 
> > > > +		BUG_ON(index > last_index);
> > > > 
> > > >  		page = find_get_page(inode->i_mapping, index);
> > > >  		
> > > >  		addr = kmap(page);
> > > 
> > > Hm, I tried but now I hit the
> > > BUG_ON(block_group->total_bitmaps >= max_bitmaps); in add_new_bitmap in
> > > fs/btrfs/free-space-cache.c:1255 when booting the system.
> > 
> > Can you mount -o clear_cache to make sure it's not the cache thats causing
> > that? Thanks,
> > 
> > Josef
> 
> Mounting  with clear_cache under 2.6.38 helped. I was able to boot and test 
> with your patch an hit the second BUG_ON on free-space-cache.c:738.
> 

Perfect can you try this and verify you don't panic anymore please?  Thanks,

Josef

---
 fs/btrfs/free-space-cache.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 74bc432..33287e8 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -522,6 +522,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 	int bitmaps = 0;
 	int ret = 0;
 	bool next_page = false;
+	bool out_of_space = false;
 
 	root = root->fs_info->tree_root;
 
@@ -629,6 +630,11 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 			offset = start_offset;
 		}
 
+		if (index > last_index) {
+			out_of_space = true;
+			break;
+		}
+
 		page = find_get_page(inode->i_mapping, index);
 
 		addr = kmap(page);
@@ -732,6 +738,10 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 		struct btrfs_free_space *entry =
 			list_entry(pos, struct btrfs_free_space, list);
 
+		if (index > last_index) {
+			out_of_space = true;
+			break;
+		}
 		page = find_get_page(inode->i_mapping, index);
 
 		addr = kmap(page);
@@ -754,6 +764,14 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 		index++;
 	}
 
+	if (out_of_space) {
+		ret = 0;
+		unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
+				     i_size_read(inode) - 1, &cached_state,
+				     GFP_NOFS);
+		goto out_free;
+	}
+
 	/* Zero out the rest of the pages just to make sure */
 	while (index <= last_index) {
 		void *addr;
-- 
1.7.2.3


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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
       [not found]           ` <201104052308.53816.johannes.hirte@fem.tu-ilmenau.de>
@ 2011-04-05 21:12             ` Josef Bacik
  2011-04-05 22:00               ` Johannes Hirte
  0 siblings, 1 reply; 22+ messages in thread
From: Josef Bacik @ 2011-04-05 21:12 UTC (permalink / raw)
  To: Johannes Hirte; +Cc: Josef Bacik, linux-btrfs

On Tue, Apr 05, 2011 at 11:08:52PM +0200, Johannes Hirte wrote:
> On Tuesday 05 April 2011 21:31:43 Josef Bacik wrote:
> > On Tue, Apr 05, 2011 at 09:21:55PM +0200, Johannes Hirte wrote:
> > > On Tuesday 05 April 2011 20:53:24 Josef Bacik wrote:
> > > > On Tue, Apr 05, 2011 at 08:52:21PM +0200, Johannes Hirte wrote:
> > > > > On Tuesday 05 April 2011 19:42:03 Josef Bacik wrote:
> > > > > > On Tue, Apr 05, 2011 at 07:38:13PM +0200, Johannes Hirte wrote:
> > > > > > > With the latest btrfs changes, I got this Oops when doing rm on a
> > > > > > > large directory:
> > > > > > > 
> > > > > > > BUG: unable to handle kernel NULL pointer dereference at   (null)
> > > > > > > IP: [<c101c838>] kunmap+0x46/0x46
> > > > > > > *pdpt = 0000000034a85001 *pde = 0000000000000000
> > > > > > > Oops: 0000 [#1] PREEMPT SMP
> > > > > > > last sysfs file: /sys/devices/virtual/vtconsole/vtcon1/uevent
> > > > > > > Modules linked in: snd_seq_oss snd_seq_midi_event snd_seq
> > > > > > > snd_seq_device snd_pcm_oss snd_mixer_oss fuse dm_crypt dm_mod
> > > > > > > usbhid snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm snd_timer
> > > > > > > sr_mod cdrom sg snd fschmd e1000 uhci_hcd snd_page_alloc
> > > > > > > i2c_i801 [last unloaded: microcode]
> > > > > > > 
> > > > > > > Pid: 1156, comm: btrfs-transacti Tainted: G        W
> > > > > > > 2.6.39-rc1-00262- gc53813f #20 FUJITSU SIEMENS SCENIC P / SCENICO
> > > > > > > P/D1561
> > > > > > > EIP: 0060:[<c101c838>] EFLAGS: 00010296 CPU: 1
> > > > > > > EIP is at kmap+0x0/0x38
> > > > > > > EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000010
> > > > > > > ESI: f5bc6400 EDI: f3c75520 EBP: f3c755f0 ESP: f58f9e10
> > > > > > > 
> > > > > > >  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> > > > > > > 
> > > > > > > Process btrfs-transacti (pid: 1156, ti=f58f8000 task=f6516f40
> > > > > > > task.ti=f58f8000)
> > > > > > > 
> > > > > > > Stack:
> > > > > > >  c1186d15 ffc22000 f58f9ec0 00000010 f3c75610 00000000 f5885780
> > > > > > >  f52339e8 00000009 f5bc6400 00010000 00000000 f6415800 f3c75638
> > > > > > >  000008bb f5bc63c0 f58857b4 f60b68a0 00000040 f52338e8 ffc22000
> > > > > > >  00000000 00000008 00000010
> > > > > > > 
> > > > > > > Call Trace:
> > > > > > >  [<c1186d15>] ? btrfs_write_out_cache+0x60c/0xa3c
> > > > > > >  [<c114a815>] ? btrfs_write_dirty_block_groups+0x400/0x494
> > > > > > >  [<c11566a7>] ? commit_cowonly_roots+0xa9/0x180
> > > > > > >  [<c1157799>] ? btrfs_commit_transaction+0x2ee/0x59c
> > > > > > >  [<c1037c85>] ? wake_up_bit+0x16/0x16
> > > > > > >  [<c1152a83>] ? transaction_kthread+0x149/0x1d6
> > > > > > >  [<c101d1b9>] ? complete+0x28/0x36
> > > > > > >  [<c115293a>] ? btrfs_congested_fn+0x5d/0x5d
> > > > > > >  [<c10379c4>] ? kthread+0x63/0x68
> > > > > > >  [<c1037961>] ? kthread_worker_fn+0xeb/0xeb
> > > > > > >  [<c13cba36>] ? kernel_thread_helper+0x6/0xd
> > > > > > > 
> > > > > > > Code: 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81 f9 00 08 00 00 74 11
> > > > > > > 81 f9 00 0c 00 00 75 0e 83 3d 10 2f 60 c1 02 75 05 e9 5e a3 04
> > > > > > > 00 c3 <8b> 10 c1 ea 1e c1 e2 0a 8d 8a 00 e4 54 c1 2b 8a 8c e7 54
> > > > > > > c1 81 EIP: [<c101c838>] kmap+0x0/0x38 SS:ESP 0068:f58f9e10
> > > > > > > CR2: 0000000000000000
> > > > > > > ---[ end trace c8511126ee91dfdf ]---
> > > > > > > 
> > > > > > > This is the second Oops. On the first one I wasn't able to catch
> > > > > > > the backtrace, but IIRC the bug happend on kmap not kunmap the
> > > > > > > first time.
> > > > > > 
> > > > > > Yeah I think I know what this is but I need somebody to verify it
> > > > > > for me. Can you run with this patch and let me know what happens? 
> > > > > > Thanks,
> > > > > > 
> > > > > > Josef
> > > > > > 
> > > > > > diff --git a/fs/btrfs/free-space-cache.c
> > > > > > b/fs/btrfs/free-space-cache.c index 74bc432..5e6f4b3 100644
> > > > > > --- a/fs/btrfs/free-space-cache.c
> > > > > > +++ b/fs/btrfs/free-space-cache.c
> > > > > > @@ -624,6 +624,7 @@ int btrfs_write_out_cache(struct btrfs_root
> > > > > > *root,
> > > > > > 
> > > > > >  		next_page = false;
> > > > > > 
> > > > > > +		BUG_ON(index > last_index);
> > > > > > 
> > > > > >  		if (index == 0) {
> > > > > >  		
> > > > > >  			start_offset = first_page_offset;
> > > > > >  			offset = start_offset;
> > > > > > 
> > > > > > @@ -732,6 +733,7 @@ int btrfs_write_out_cache(struct btrfs_root
> > > > > > *root,
> > > > > > 
> > > > > >  		struct btrfs_free_space *entry =
> > > > > >  		
> > > > > >  			list_entry(pos, struct btrfs_free_space, list);
> > > > > > 
> > > > > > +		BUG_ON(index > last_index);
> > > > > > 
> > > > > >  		page = find_get_page(inode->i_mapping, index);
> > > > > >  		
> > > > > >  		addr = kmap(page);
> > > > > 
> > > > > Hm, I tried but now I hit the
> > > > > BUG_ON(block_group->total_bitmaps >= max_bitmaps); in add_new_bitmap
> > > > > in fs/btrfs/free-space-cache.c:1255 when booting the system.
> > > > 
> > > > Can you mount -o clear_cache to make sure it's not the cache thats
> > > > causing that? Thanks,
> > > > 
> > > > Josef
> > > 
> > > Mounting  with clear_cache under 2.6.38 helped. I was able to boot and
> > > test with your patch an hit the second BUG_ON on free-space-cache.c:738.
> > 
> > Perfect can you try this and verify you don't panic anymore please? 
> > Thanks,
> > 
> > Josef
> > 
> > ---
> >  fs/btrfs/free-space-cache.c |   18 ++++++++++++++++++
> >  1 files changed, 18 insertions(+), 0 deletions(-)
> > 
> > diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> > index 74bc432..33287e8 100644
> > --- a/fs/btrfs/free-space-cache.c
> > +++ b/fs/btrfs/free-space-cache.c
> > @@ -522,6 +522,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> >  	int bitmaps = 0;
> >  	int ret = 0;
> >  	bool next_page = false;
> > +	bool out_of_space = false;
> > 
> >  	root = root->fs_info->tree_root;
> > 
> > @@ -629,6 +630,11 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> >  			offset = start_offset;
> >  		}
> > 
> > +		if (index > last_index) {
> > +			out_of_space = true;
> > +			break;
> > +		}
> > +
> >  		page = find_get_page(inode->i_mapping, index);
> > 
> >  		addr = kmap(page);
> > @@ -732,6 +738,10 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> >  		struct btrfs_free_space *entry =
> >  			list_entry(pos, struct btrfs_free_space, list);
> > 
> > +		if (index > last_index) {
> > +			out_of_space = true;
> > +			break;
> > +		}
> >  		page = find_get_page(inode->i_mapping, index);
> > 
> >  		addr = kmap(page);
> > @@ -754,6 +764,14 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> >  		index++;
> >  	}
> > 
> > +	if (out_of_space) {
> > +		ret = 0;
> > +		unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
> > +				     i_size_read(inode) - 1, &cached_state,
> > +				     GFP_NOFS);
> > +		goto out_free;
> > +	}
> > +
> >  	/* Zero out the rest of the pages just to make sure */
> >  	while (index <= last_index) {
> >  		void *addr;
> 
> With this patch the system doesn't panic anymore, it just hangs. The output 
> from sysrq-t after the hang is attached. I've got also several Oopses from 
> BUG_ON(block_group->total_bitmaps >= max_bitmaps) again when switching from 
> 2.6.38 to 2.6.39-rc.
> 

Balls, sorry about that, this should do the trick, thanks,

Josef

---
 fs/btrfs/free-space-cache.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 74bc432..fc2bbbe 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -522,6 +522,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 	int bitmaps = 0;
 	int ret = 0;
 	bool next_page = false;
+	bool out_of_space = false;
 
 	root = root->fs_info->tree_root;
 
@@ -629,6 +630,11 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 			offset = start_offset;
 		}
 
+		if (index > last_index) {
+			out_of_space = true;
+			break;
+		}
+
 		page = find_get_page(inode->i_mapping, index);
 
 		addr = kmap(page);
@@ -732,6 +738,10 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 		struct btrfs_free_space *entry =
 			list_entry(pos, struct btrfs_free_space, list);
 
+		if (index > last_index) {
+			out_of_space = true;
+			break;
+		}
 		page = find_get_page(inode->i_mapping, index);
 
 		addr = kmap(page);
@@ -754,6 +764,19 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 		index++;
 	}
 
+	if (out_of_space) {
+		page = find_get_page(inode->i_mapping, 0);
+		unlock_page(page);
+		page_cache_release(page);
+		page_cache_release(page);
+
+		ret = 0;
+		unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
+				     i_size_read(inode) - 1, &cached_state,
+				     GFP_NOFS);
+		goto out_free;
+	}
+
 	/* Zero out the rest of the pages just to make sure */
 	while (index <= last_index) {
 		void *addr;
-- 
1.7.2.3


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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-05 22:00               ` Johannes Hirte
@ 2011-04-05 21:57                 ` Josef Bacik
  2011-04-06 11:10                   ` Johannes Hirte
  0 siblings, 1 reply; 22+ messages in thread
From: Josef Bacik @ 2011-04-05 21:57 UTC (permalink / raw)
  To: Johannes Hirte; +Cc: Josef Bacik, linux-btrfs

> 
> Now it hit 

Man I cannot catch a break.  I hope this is the last one.  Thanks,

Josef

---
 fs/btrfs/free-space-cache.c |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 74bc432..b8052be 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -522,6 +522,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 	int bitmaps = 0;
 	int ret = 0;
 	bool next_page = false;
+	bool out_of_space = false;
 
 	root = root->fs_info->tree_root;
 
@@ -629,6 +630,11 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 			offset = start_offset;
 		}
 
+		if (index > last_index) {
+			out_of_space = true;
+			break;
+		}
+
 		page = find_get_page(inode->i_mapping, index);
 
 		addr = kmap(page);
@@ -732,6 +738,10 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 		struct btrfs_free_space *entry =
 			list_entry(pos, struct btrfs_free_space, list);
 
+		if (index > last_index) {
+			out_of_space = true;
+			break;
+		}
 		page = find_get_page(inode->i_mapping, index);
 
 		addr = kmap(page);
@@ -754,6 +764,28 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 		index++;
 	}
 
+	if (out_of_space) {
+		page = find_get_page(inode->i_mapping, 0);
+
+		/*
+		 * Have to do the normal stuff in case writeback gets started on
+		 * this page before we invalidate it.
+		 */
+		ClearPageChecked(page);
+		set_page_extent_mapped(page);
+		SetPageUptodate(page);
+		set_page_dirty(page);
+		unlock_page(page);
+		page_cache_release(page);
+		page_cache_release(page);
+
+		ret = 0;
+		unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
+				     i_size_read(inode) - 1, &cached_state,
+				     GFP_NOFS);
+		goto out_free;
+	}
+
 	/* Zero out the rest of the pages just to make sure */
 	while (index <= last_index) {
 		void *addr;
-- 
1.7.2.3


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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-05 21:12             ` Josef Bacik
@ 2011-04-05 22:00               ` Johannes Hirte
  2011-04-05 21:57                 ` Josef Bacik
  0 siblings, 1 reply; 22+ messages in thread
From: Johannes Hirte @ 2011-04-05 22:00 UTC (permalink / raw)
  To: Josef Bacik; +Cc: linux-btrfs

On Tuesday 05 April 2011 23:12:27 Josef Bacik wrote:
> On Tue, Apr 05, 2011 at 11:08:52PM +0200, Johannes Hirte wrote:
> > On Tuesday 05 April 2011 21:31:43 Josef Bacik wrote:
> > > On Tue, Apr 05, 2011 at 09:21:55PM +0200, Johannes Hirte wrote:
> > > > On Tuesday 05 April 2011 20:53:24 Josef Bacik wrote:
> > > > > On Tue, Apr 05, 2011 at 08:52:21PM +0200, Johannes Hirte wrote:
> > > > > > On Tuesday 05 April 2011 19:42:03 Josef Bacik wrote:
> > > > > > > On Tue, Apr 05, 2011 at 07:38:13PM +0200, Johannes Hirte wrote:
> > > > > > > > With the latest btrfs changes, I got this Oops when doing rm
> > > > > > > > on a large directory:
> > > > > > > > 
> > > > > > > > BUG: unable to handle kernel NULL pointer dereference at  
> > > > > > > > (null) IP: [<c101c838>] kunmap+0x46/0x46
> > > > > > > > *pdpt = 0000000034a85001 *pde = 0000000000000000
> > > > > > > > Oops: 0000 [#1] PREEMPT SMP
> > > > > > > > last sysfs file: /sys/devices/virtual/vtconsole/vtcon1/uevent
> > > > > > > > Modules linked in: snd_seq_oss snd_seq_midi_event snd_seq
> > > > > > > > snd_seq_device snd_pcm_oss snd_mixer_oss fuse dm_crypt dm_mod
> > > > > > > > usbhid snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm snd_timer
> > > > > > > > sr_mod cdrom sg snd fschmd e1000 uhci_hcd snd_page_alloc
> > > > > > > > i2c_i801 [last unloaded: microcode]
> > > > > > > > 
> > > > > > > > Pid: 1156, comm: btrfs-transacti Tainted: G        W
> > > > > > > > 2.6.39-rc1-00262- gc53813f #20 FUJITSU SIEMENS SCENIC P /
> > > > > > > > SCENICO P/D1561
> > > > > > > > EIP: 0060:[<c101c838>] EFLAGS: 00010296 CPU: 1
> > > > > > > > EIP is at kmap+0x0/0x38
> > > > > > > > EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000010
> > > > > > > > ESI: f5bc6400 EDI: f3c75520 EBP: f3c755f0 ESP: f58f9e10
> > > > > > > > 
> > > > > > > >  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> > > > > > > > 
> > > > > > > > Process btrfs-transacti (pid: 1156, ti=f58f8000 task=f6516f40
> > > > > > > > task.ti=f58f8000)
> > > > > > > > 
> > > > > > > > Stack:
> > > > > > > >  c1186d15 ffc22000 f58f9ec0 00000010 f3c75610 00000000
> > > > > > > >  f5885780 f52339e8 00000009 f5bc6400 00010000 00000000
> > > > > > > >  f6415800 f3c75638 000008bb f5bc63c0 f58857b4 f60b68a0
> > > > > > > >  00000040 f52338e8 ffc22000 00000000 00000008 00000010
> > > > > > > > 
> > > > > > > > Call Trace:
> > > > > > > >  [<c1186d15>] ? btrfs_write_out_cache+0x60c/0xa3c
> > > > > > > >  [<c114a815>] ? btrfs_write_dirty_block_groups+0x400/0x494
> > > > > > > >  [<c11566a7>] ? commit_cowonly_roots+0xa9/0x180
> > > > > > > >  [<c1157799>] ? btrfs_commit_transaction+0x2ee/0x59c
> > > > > > > >  [<c1037c85>] ? wake_up_bit+0x16/0x16
> > > > > > > >  [<c1152a83>] ? transaction_kthread+0x149/0x1d6
> > > > > > > >  [<c101d1b9>] ? complete+0x28/0x36
> > > > > > > >  [<c115293a>] ? btrfs_congested_fn+0x5d/0x5d
> > > > > > > >  [<c10379c4>] ? kthread+0x63/0x68
> > > > > > > >  [<c1037961>] ? kthread_worker_fn+0xeb/0xeb
> > > > > > > >  [<c13cba36>] ? kernel_thread_helper+0x6/0xd
> > > > > > > > 
> > > > > > > > Code: 8d 8a 00 e4 54 c1 2b 8a 8c e7 54 c1 81 f9 00 08 00 00
> > > > > > > > 74 11 81 f9 00 0c 00 00 75 0e 83 3d 10 2f 60 c1 02 75 05 e9
> > > > > > > > 5e a3 04 00 c3 <8b> 10 c1 ea 1e c1 e2 0a 8d 8a 00 e4 54 c1
> > > > > > > > 2b 8a 8c e7 54 c1 81 EIP: [<c101c838>] kmap+0x0/0x38 SS:ESP
> > > > > > > > 0068:f58f9e10 CR2: 0000000000000000
> > > > > > > > ---[ end trace c8511126ee91dfdf ]---
> > > > > > > > 
> > > > > > > > This is the second Oops. On the first one I wasn't able to
> > > > > > > > catch the backtrace, but IIRC the bug happend on kmap not
> > > > > > > > kunmap the first time.
> > > > > > > 
> > > > > > > Yeah I think I know what this is but I need somebody to verify
> > > > > > > it for me. Can you run with this patch and let me know what
> > > > > > > happens? Thanks,
> > > > > > > 
> > > > > > > Josef
> > > > > > > 
> > > > > > > diff --git a/fs/btrfs/free-space-cache.c
> > > > > > > b/fs/btrfs/free-space-cache.c index 74bc432..5e6f4b3 100644
> > > > > > > --- a/fs/btrfs/free-space-cache.c
> > > > > > > +++ b/fs/btrfs/free-space-cache.c
> > > > > > > @@ -624,6 +624,7 @@ int btrfs_write_out_cache(struct btrfs_root
> > > > > > > *root,
> > > > > > > 
> > > > > > >  		next_page = false;
> > > > > > > 
> > > > > > > +		BUG_ON(index > last_index);
> > > > > > > 
> > > > > > >  		if (index == 0) {
> > > > > > >  		
> > > > > > >  			start_offset = first_page_offset;
> > > > > > >  			offset = start_offset;
> > > > > > > 
> > > > > > > @@ -732,6 +733,7 @@ int btrfs_write_out_cache(struct btrfs_root
> > > > > > > *root,
> > > > > > > 
> > > > > > >  		struct btrfs_free_space *entry =
> > > > > > >  		
> > > > > > >  			list_entry(pos, struct btrfs_free_space, list);
> > > > > > > 
> > > > > > > +		BUG_ON(index > last_index);
> > > > > > > 
> > > > > > >  		page = find_get_page(inode->i_mapping, index);
> > > > > > >  		
> > > > > > >  		addr = kmap(page);
> > > > > > 
> > > > > > Hm, I tried but now I hit the
> > > > > > BUG_ON(block_group->total_bitmaps >= max_bitmaps); in
> > > > > > add_new_bitmap in fs/btrfs/free-space-cache.c:1255 when booting
> > > > > > the system.
> > > > > 
> > > > > Can you mount -o clear_cache to make sure it's not the cache thats
> > > > > causing that? Thanks,
> > > > > 
> > > > > Josef
> > > > 
> > > > Mounting  with clear_cache under 2.6.38 helped. I was able to boot
> > > > and test with your patch an hit the second BUG_ON on
> > > > free-space-cache.c:738.
> > > 
> > > Perfect can you try this and verify you don't panic anymore please?
> > > Thanks,
> > > 
> > > Josef
> > > 
> > > ---
> > > 
> > >  fs/btrfs/free-space-cache.c |   18 ++++++++++++++++++
> > >  1 files changed, 18 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> > > index 74bc432..33287e8 100644
> > > --- a/fs/btrfs/free-space-cache.c
> > > +++ b/fs/btrfs/free-space-cache.c
> > > @@ -522,6 +522,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> > > 
> > >  	int bitmaps = 0;
> > >  	int ret = 0;
> > >  	bool next_page = false;
> > > 
> > > +	bool out_of_space = false;
> > > 
> > >  	root = root->fs_info->tree_root;
> > > 
> > > @@ -629,6 +630,11 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> > > 
> > >  			offset = start_offset;
> > >  		
> > >  		}
> > > 
> > > +		if (index > last_index) {
> > > +			out_of_space = true;
> > > +			break;
> > > +		}
> > > +
> > > 
> > >  		page = find_get_page(inode->i_mapping, index);
> > >  		
> > >  		addr = kmap(page);
> > > 
> > > @@ -732,6 +738,10 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> > > 
> > >  		struct btrfs_free_space *entry =
> > >  		
> > >  			list_entry(pos, struct btrfs_free_space, list);
> > > 
> > > +		if (index > last_index) {
> > > +			out_of_space = true;
> > > +			break;
> > > +		}
> > > 
> > >  		page = find_get_page(inode->i_mapping, index);
> > >  		
> > >  		addr = kmap(page);
> > > 
> > > @@ -754,6 +764,14 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> > > 
> > >  		index++;
> > >  	
> > >  	}
> > > 
> > > +	if (out_of_space) {
> > > +		ret = 0;
> > > +		unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
> > > +				     i_size_read(inode) - 1, &cached_state,
> > > +				     GFP_NOFS);
> > > +		goto out_free;
> > > +	}
> > > +
> > > 
> > >  	/* Zero out the rest of the pages just to make sure */
> > >  	while (index <= last_index) {
> > >  	
> > >  		void *addr;
> > 
> > With this patch the system doesn't panic anymore, it just hangs. The
> > output from sysrq-t after the hang is attached. I've got also several
> > Oopses from BUG_ON(block_group->total_bitmaps >= max_bitmaps) again when
> > switching from 2.6.38 to 2.6.39-rc.
> 
> Balls, sorry about that, this should do the trick, thanks,
> 
> Josef
> 
> ---
>  fs/btrfs/free-space-cache.c |   23 +++++++++++++++++++++++
>  1 files changed, 23 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> index 74bc432..fc2bbbe 100644
> --- a/fs/btrfs/free-space-cache.c
> +++ b/fs/btrfs/free-space-cache.c
> @@ -522,6 +522,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  	int bitmaps = 0;
>  	int ret = 0;
>  	bool next_page = false;
> +	bool out_of_space = false;
> 
>  	root = root->fs_info->tree_root;
> 
> @@ -629,6 +630,11 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  			offset = start_offset;
>  		}
> 
> +		if (index > last_index) {
> +			out_of_space = true;
> +			break;
> +		}
> +
>  		page = find_get_page(inode->i_mapping, index);
> 
>  		addr = kmap(page);
> @@ -732,6 +738,10 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  		struct btrfs_free_space *entry =
>  			list_entry(pos, struct btrfs_free_space, list);
> 
> +		if (index > last_index) {
> +			out_of_space = true;
> +			break;
> +		}
>  		page = find_get_page(inode->i_mapping, index);
> 
>  		addr = kmap(page);
> @@ -754,6 +764,19 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  		index++;
>  	}
> 
> +	if (out_of_space) {
> +		page = find_get_page(inode->i_mapping, 0);
> +		unlock_page(page);
> +		page_cache_release(page);
> +		page_cache_release(page);
> +
> +		ret = 0;
> +		unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
> +				     i_size_read(inode) - 1, &cached_state,
> +				     GFP_NOFS);
> +		goto out_free;
> +	}
> +
>  	/* Zero out the rest of the pages just to make sure */
>  	while (index <= last_index) {
>  		void *addr;

Now it hit 
------------[ cut here ]------------
kernel BUG at fs/btrfs/inode.c:1565!
invalid opcode: 0000 [#1] PREEMPT SMP 
last sysfs file: /sys/devices/virtual/vtconsole/vtcon1/uevent
Modules linked in: snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device 
snd_pcm_oss snd_mixer_oss fuse dm_crypt dm_mod usbhid snd_intel8x0 
snd_ac97_codec ac97_bus snd_pcm sr_mod snd_timer sg cdrom snd fschmd uhci_hcd 
e1000 snd_page_alloc i2c_i801 [last unloaded: microcode]

Pid: 1147, comm: btrfs-fixup-0 Tainted: G        W   2.6.39-rc1-00262-gc53813f-
dirty #24 FUJITSU SIEMENS SCENIC P / SCENICO P/D1561
EIP: 0060:[<c1158999>] EFLAGS: 00010246 CPU: 1
EIP is at btrfs_writepage_fixup_worker+0xf1/0x12d
EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: f58b1f3c
ESI: 00000000 EDI: f7aef080 EBP: f58b1f6c ESP: f58b1f54
 DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Process btrfs-fixup-0 (pid: 1147, ti=f58b0000 task=f65206c0 task.ti=f58b0000)
Stack:
 f4e354e0 00000fff 00000000 f4e353e0 00000000 f49d97c0 00000000 f6645c40
 f49d97d8 f49d97c4 f6645c4c c117c57f f58b1f9c f6645c6c f65206c0 f65206c0
 f65206c0 f6645c4c f58b1f9c f58b1f9c f49d9858 f49d9e98 00000000 f645fd6c
Call Trace:
 [<c117c57f>] ? worker_loop+0x117/0x3ac
 [<c117c468>] ? btrfs_queue_worker+0x1ee/0x1ee
 [<c10379c4>] ? kthread+0x63/0x68
 [<c1037961>] ? kthread_worker_fn+0xeb/0xeb
 [<c13cbab6>] ? kernel_thread_helper+0x6/0xd
Code: f1 8b 44 24 1c e8 83 92 01 00 89 f8 e8 38 e0 ef ff b9 01 00 00 00 8b 54 
24 20 8b 44 24 10 e8 61 6a 01 00 83 c4 10 e9 2c ff ff ff <0f> 0b 6a 50 55 ff 74 24 
10 ff 74 24 10 89 da 89 f1 8b 44 24 1c 
EIP: [<c1158999>] btrfs_writepage_fixup_worker+0xf1/0x12d SS:ESP 0068:f58b1f54
---[ end trace 60f7cf60a0edd44b ]---

And the code looks confusing to me here. btrfs_set_extent_delalloc and 
ClearPageChecked could never be reached. Why are they still there?

regards,
  Johannes

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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-05 21:57                 ` Josef Bacik
@ 2011-04-06 11:10                   ` Johannes Hirte
  2011-04-06 17:15                     ` Josef Bacik
  0 siblings, 1 reply; 22+ messages in thread
From: Johannes Hirte @ 2011-04-06 11:10 UTC (permalink / raw)
  To: Josef Bacik; +Cc: linux-btrfs

On Tuesday 05 April 2011 23:57:53 Josef Bacik wrote:
> > Now it hit
> 
> Man I cannot catch a break.  I hope this is the last one.  Thanks,
> 
> Josef
> 
> ---
>  fs/btrfs/free-space-cache.c |   32 ++++++++++++++++++++++++++++++++
>  1 files changed, 32 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> index 74bc432..b8052be 100644
> --- a/fs/btrfs/free-space-cache.c
> +++ b/fs/btrfs/free-space-cache.c
> @@ -522,6 +522,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  	int bitmaps = 0;
>  	int ret = 0;
>  	bool next_page = false;
> +	bool out_of_space = false;
> 
>  	root = root->fs_info->tree_root;
> 
> @@ -629,6 +630,11 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  			offset = start_offset;
>  		}
> 
> +		if (index > last_index) {
> +			out_of_space = true;
> +			break;
> +		}
> +
>  		page = find_get_page(inode->i_mapping, index);
> 
>  		addr = kmap(page);
> @@ -732,6 +738,10 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  		struct btrfs_free_space *entry =
>  			list_entry(pos, struct btrfs_free_space, list);
> 
> +		if (index > last_index) {
> +			out_of_space = true;
> +			break;
> +		}
>  		page = find_get_page(inode->i_mapping, index);
> 
>  		addr = kmap(page);
> @@ -754,6 +764,28 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  		index++;
>  	}
> 
> +	if (out_of_space) {
> +		page = find_get_page(inode->i_mapping, 0);
> +
> +		/*
> +		 * Have to do the normal stuff in case writeback gets started on
> +		 * this page before we invalidate it.
> +		 */
> +		ClearPageChecked(page);
> +		set_page_extent_mapped(page);
> +		SetPageUptodate(page);
> +		set_page_dirty(page);
> +		unlock_page(page);
> +		page_cache_release(page);
> +		page_cache_release(page);
> +
> +		ret = 0;
> +		unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
> +				     i_size_read(inode) - 1, &cached_state,
> +				     GFP_NOFS);
> +		goto out_free;
> +	}
> +
>  	/* Zero out the rest of the pages just to make sure */
>  	while (index <= last_index) {
>  		void *addr;

Sorry no, it still hits the BUG() in inode.c (line 1565). It takes longer to 
hit than before but is still reproducible.

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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-06 11:10                   ` Johannes Hirte
@ 2011-04-06 17:15                     ` Josef Bacik
  2011-04-06 20:47                       ` Jordan Patterson
  2011-04-07  8:28                       ` Johannes Hirte
  0 siblings, 2 replies; 22+ messages in thread
From: Josef Bacik @ 2011-04-06 17:15 UTC (permalink / raw)
  To: Johannes Hirte; +Cc: Josef Bacik, linux-btrfs

On Wed, Apr 06, 2011 at 01:10:38PM +0200, Johannes Hirte wrote:
> On Tuesday 05 April 2011 23:57:53 Josef Bacik wrote:
> > > Now it hit
> > 
> > Man I cannot catch a break.  I hope this is the last one.  Thanks,
> > 

Ok I give up, I just cleaned it all up and don't mark the pages as dirty unless
we're actually going to succeed at writing them.  This should fix everything

---
 fs/btrfs/ctree.h            |    5 ++
 fs/btrfs/file.c             |   21 +++----
 fs/btrfs/free-space-cache.c |  117 ++++++++++++++++++++-----------------------
 3 files changed, 69 insertions(+), 74 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 3458b57..0d00a07 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2576,6 +2576,11 @@ int btrfs_drop_extents(struct btrfs_trans_handle *trans, struct inode *inode,
 int btrfs_mark_extent_written(struct btrfs_trans_handle *trans,
 			      struct inode *inode, u64 start, u64 end);
 int btrfs_release_file(struct inode *inode, struct file *file);
+void btrfs_drop_pages(struct page **pages, size_t num_pages);
+int btrfs_dirty_pages(struct btrfs_root *root, struct inode *inode,
+		      struct page **pages, size_t num_pages,
+		      loff_t pos, size_t write_bytes,
+		      struct extent_state **cached);
 
 /* tree-defrag.c */
 int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index e621ea5..75899a0 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -104,7 +104,7 @@ static noinline int btrfs_copy_from_user(loff_t pos, int num_pages,
 /*
  * unlocks pages after btrfs_file_write is done with them
  */
-static noinline void btrfs_drop_pages(struct page **pages, size_t num_pages)
+void btrfs_drop_pages(struct page **pages, size_t num_pages)
 {
 	size_t i;
 	for (i = 0; i < num_pages; i++) {
@@ -127,16 +127,13 @@ static noinline void btrfs_drop_pages(struct page **pages, size_t num_pages)
  * this also makes the decision about creating an inline extent vs
  * doing real data extents, marking pages dirty and delalloc as required.
  */
-static noinline int dirty_and_release_pages(struct btrfs_root *root,
-					    struct file *file,
-					    struct page **pages,
-					    size_t num_pages,
-					    loff_t pos,
-					    size_t write_bytes)
+int btrfs_dirty_pages(struct btrfs_root *root, struct inode *inode,
+		      struct page **pages, size_t num_pages,
+		      loff_t pos, size_t write_bytes,
+		      struct extent_state **cached)
 {
 	int err = 0;
 	int i;
-	struct inode *inode = fdentry(file)->d_inode;
 	u64 num_bytes;
 	u64 start_pos;
 	u64 end_of_last_block;
@@ -149,7 +146,7 @@ static noinline int dirty_and_release_pages(struct btrfs_root *root,
 
 	end_of_last_block = start_pos + num_bytes - 1;
 	err = btrfs_set_extent_delalloc(inode, start_pos, end_of_last_block,
-					NULL);
+					cached);
 	if (err)
 		return err;
 
@@ -992,9 +989,9 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
 		}
 
 		if (copied > 0) {
-			ret = dirty_and_release_pages(root, file, pages,
-						      dirty_pages, pos,
-						      copied);
+			ret = btrfs_dirty_pages(root, inode, pages,
+						dirty_pages, pos, copied,
+						NULL);
 			if (ret) {
 				btrfs_delalloc_release_space(inode,
 					dirty_pages << PAGE_CACHE_SHIFT);
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index f561c95..a3f420d 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -508,6 +508,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 	struct inode *inode;
 	struct rb_node *node;
 	struct list_head *pos, *n;
+	struct page **pages;
 	struct page *page;
 	struct extent_state *cached_state = NULL;
 	struct btrfs_free_cluster *cluster = NULL;
@@ -517,13 +518,13 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 	u64 start, end, len;
 	u64 bytes = 0;
 	u32 *crc, *checksums;
-	pgoff_t index = 0, last_index = 0;
 	unsigned long first_page_offset;
-	int num_checksums;
+	int index = 0, num_pages = 0;
 	int entries = 0;
 	int bitmaps = 0;
 	int ret = 0;
 	bool next_page = false;
+	bool out_of_space = false;
 
 	root = root->fs_info->tree_root;
 
@@ -551,24 +552,31 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 		return 0;
 	}
 
-	last_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT;
+	num_pages = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>
+		PAGE_CACHE_SHIFT;
 	filemap_write_and_wait(inode->i_mapping);
 	btrfs_wait_ordered_range(inode, inode->i_size &
 				 ~(root->sectorsize - 1), (u64)-1);
 
 	/* We need a checksum per page. */
-	num_checksums = i_size_read(inode) / PAGE_CACHE_SIZE;
-	crc = checksums  = kzalloc(sizeof(u32) * num_checksums, GFP_NOFS);
+	crc = checksums = kzalloc(sizeof(u32) * num_pages, GFP_NOFS);
 	if (!crc) {
 		iput(inode);
 		return 0;
 	}
 
+	pages = kzalloc(sizeof(struct page *) * num_pages, GFP_NOFS);
+	if (!pages) {
+		kfree(crc);
+		iput(inode);
+		return 0;
+	}
+
 	/* Since the first page has all of our checksums and our generation we
 	 * need to calculate the offset into the page that we can start writing
 	 * our entries.
 	 */
-	first_page_offset = (sizeof(u32) * num_checksums) + sizeof(u64);
+	first_page_offset = (sizeof(u32) * num_pages) + sizeof(u64);
 
 	/* Get the cluster for this block_group if it exists */
 	if (!list_empty(&block_group->cluster_list))
@@ -590,20 +598,18 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 	 * after find_get_page at this point.  Just putting this here so people
 	 * know and don't freak out.
 	 */
-	while (index <= last_index) {
+	while (index < num_pages) {
 		page = grab_cache_page(inode->i_mapping, index);
 		if (!page) {
-			pgoff_t i = 0;
+			int i;
 
-			while (i < index) {
-				page = find_get_page(inode->i_mapping, i);
-				unlock_page(page);
-				page_cache_release(page);
-				page_cache_release(page);
-				i++;
+			for (i = 0; i < num_pages; i++) {
+				unlock_page(pages[i]);
+				page_cache_release(pages[i]);
 			}
 			goto out_free;
 		}
+		pages[index] = page;
 		index++;
 	}
 
@@ -631,7 +637,12 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 			offset = start_offset;
 		}
 
-		page = find_get_page(inode->i_mapping, index);
+		if (index >= num_pages) {
+			out_of_space = true;
+			break;
+		}
+
+		page = pages[index];
 
 		addr = kmap(page);
 		entry = addr + start_offset;
@@ -708,23 +719,6 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 
 		bytes += PAGE_CACHE_SIZE;
 
-		ClearPageChecked(page);
-		set_page_extent_mapped(page);
-		SetPageUptodate(page);
-		set_page_dirty(page);
-
-		/*
-		 * We need to release our reference we got for grab_cache_page,
-		 * except for the first page which will hold our checksums, we
-		 * do that below.
-		 */
-		if (index != 0) {
-			unlock_page(page);
-			page_cache_release(page);
-		}
-
-		page_cache_release(page);
-
 		index++;
 	} while (node || next_page);
 
@@ -734,6 +728,10 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 		struct btrfs_free_space *entry =
 			list_entry(pos, struct btrfs_free_space, list);
 
+		if (index >= num_pages) {
+			out_of_space = true;
+			break;
+		}
 		page = find_get_page(inode->i_mapping, index);
 
 		addr = kmap(page);
@@ -745,64 +743,58 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 		crc++;
 		bytes += PAGE_CACHE_SIZE;
 
-		ClearPageChecked(page);
-		set_page_extent_mapped(page);
-		SetPageUptodate(page);
-		set_page_dirty(page);
-		unlock_page(page);
-		page_cache_release(page);
-		page_cache_release(page);
 		list_del_init(&entry->list);
 		index++;
 	}
 
+	if (out_of_space) {
+		btrfs_drop_pages(pages, num_pages);
+		unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
+				     i_size_read(inode) - 1, &cached_state,
+				     GFP_NOFS);
+		ret = 0;
+		goto out_free;
+	}
+
 	/* Zero out the rest of the pages just to make sure */
-	while (index <= last_index) {
+	while (index < num_pages) {
 		void *addr;
 
-		page = find_get_page(inode->i_mapping, index);
-
+		page = pages[index];
 		addr = kmap(page);
 		memset(addr, 0, PAGE_CACHE_SIZE);
 		kunmap(page);
-		ClearPageChecked(page);
-		set_page_extent_mapped(page);
-		SetPageUptodate(page);
-		set_page_dirty(page);
-		unlock_page(page);
-		page_cache_release(page);
-		page_cache_release(page);
 		bytes += PAGE_CACHE_SIZE;
 		index++;
 	}
 
-	btrfs_set_extent_delalloc(inode, 0, bytes - 1, &cached_state);
-
 	/* Write the checksums and trans id to the first page */
 	{
 		void *addr;
 		u64 *gen;
 
-		page = find_get_page(inode->i_mapping, 0);
+		page = pages[0];
 
 		addr = kmap(page);
-		memcpy(addr, checksums, sizeof(u32) * num_checksums);
-		gen = addr + (sizeof(u32) * num_checksums);
+		memcpy(addr, checksums, sizeof(u32) * num_pages);
+		gen = addr + (sizeof(u32) * num_pages);
 		*gen = trans->transid;
 		kunmap(page);
-		ClearPageChecked(page);
-		set_page_extent_mapped(page);
-		SetPageUptodate(page);
-		set_page_dirty(page);
-		unlock_page(page);
-		page_cache_release(page);
-		page_cache_release(page);
 	}
-	BTRFS_I(inode)->generation = trans->transid;
 
+	ret = btrfs_dirty_pages(root, inode, pages, num_pages, 0,
+					    bytes, &cached_state);
+	btrfs_drop_pages(pages, num_pages);
 	unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
 			     i_size_read(inode) - 1, &cached_state, GFP_NOFS);
 
+	if (ret) {
+		ret = 0;
+		goto out_free;
+	}
+
+	BTRFS_I(inode)->generation = trans->transid;
+
 	filemap_write_and_wait(inode->i_mapping);
 
 	key.objectid = BTRFS_FREE_SPACE_OBJECTID;
@@ -853,6 +845,7 @@ out_free:
 		BTRFS_I(inode)->generation = 0;
 	}
 	kfree(checksums);
+	kfree(pages);
 	btrfs_update_inode(trans, root, inode);
 	iput(inode);
 	return ret;
-- 
1.7.2.3


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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-06 17:15                     ` Josef Bacik
@ 2011-04-06 20:47                       ` Jordan Patterson
  2011-04-06 23:42                         ` Johannes Hirte
  2011-04-07 13:17                         ` Josef Bacik
  2011-04-07  8:28                       ` Johannes Hirte
  1 sibling, 2 replies; 22+ messages in thread
From: Jordan Patterson @ 2011-04-06 20:47 UTC (permalink / raw)
  To: Josef Bacik; +Cc: linux-btrfs

Hi Josef:

I tried your latest patch, since I had the same issue from the first
email.  With the patch applied, I am now hitting the
BUG_ON(block_group->total_bitmaps >=3D max_bitmaps); in add_new_bitmap
in
fs/btrfs/free-space-cache.c:1246 as soon as I mount the filesystem,
with or without -o clear_cache.

It works fine in 2.6.38.  I get the same error after mounting with
clear_cache under 2.6.38 and rebooting into the current kernel with
your patch.

Jordan

On Wed, Apr 6, 2011 at 11:15 AM, Josef Bacik <josef@redhat.com> wrote:
> On Wed, Apr 06, 2011 at 01:10:38PM +0200, Johannes Hirte wrote:
>> On Tuesday 05 April 2011 23:57:53 Josef Bacik wrote:
>> > > Now it hit
>> >
>> > Man I cannot catch a break. =A0I hope this is the last one. =A0Tha=
nks,
>> >
>
> Ok I give up, I just cleaned it all up and don't mark the pages as di=
rty unless
> we're actually going to succeed at writing them. =A0This should fix e=
verything
>
> ---
> =A0fs/btrfs/ctree.h =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A05 ++
> =A0fs/btrfs/file.c =A0 =A0 =A0 =A0 =A0 =A0 | =A0 21 +++----
> =A0fs/btrfs/free-space-cache.c | =A0117 ++++++++++++++++++++---------=
--------------
> =A03 files changed, 69 insertions(+), 74 deletions(-)
>
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 3458b57..0d00a07 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -2576,6 +2576,11 @@ int btrfs_drop_extents(struct btrfs_trans_hand=
le *trans, struct inode *inode,
> =A0int btrfs_mark_extent_written(struct btrfs_trans_handle *trans,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct ino=
de *inode, u64 start, u64 end);
> =A0int btrfs_release_file(struct inode *inode, struct file *file);
> +void btrfs_drop_pages(struct page **pages, size_t num_pages);
> +int btrfs_dirty_pages(struct btrfs_root *root, struct inode *inode,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct page **pages, size_t=
 num_pages,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 loff_t pos, size_t write_by=
tes,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct extent_state **cache=
d);
>
> =A0/* tree-defrag.c */
> =A0int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
> diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
> index e621ea5..75899a0 100644
> --- a/fs/btrfs/file.c
> +++ b/fs/btrfs/file.c
> @@ -104,7 +104,7 @@ static noinline int btrfs_copy_from_user(loff_t p=
os, int num_pages,
> =A0/*
> =A0* unlocks pages after btrfs_file_write is done with them
> =A0*/
> -static noinline void btrfs_drop_pages(struct page **pages, size_t nu=
m_pages)
> +void btrfs_drop_pages(struct page **pages, size_t num_pages)
> =A0{
> =A0 =A0 =A0 =A0size_t i;
> =A0 =A0 =A0 =A0for (i =3D 0; i < num_pages; i++) {
> @@ -127,16 +127,13 @@ static noinline void btrfs_drop_pages(struct pa=
ge **pages, size_t num_pages)
> =A0* this also makes the decision about creating an inline extent vs
> =A0* doing real data extents, marking pages dirty and delalloc as req=
uired.
> =A0*/
> -static noinline int dirty_and_release_pages(struct btrfs_root *root,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 struct file *file,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 struct page **pages,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 size_t num_pages,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 loff_t pos,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 size_t write_bytes)
> +int btrfs_dirty_pages(struct btrfs_root *root, struct inode *inode,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct page **pages, size_t=
 num_pages,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 loff_t pos, size_t write_by=
tes,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct extent_state **cache=
d)
> =A0{
> =A0 =A0 =A0 =A0int err =3D 0;
> =A0 =A0 =A0 =A0int i;
> - =A0 =A0 =A0 struct inode *inode =3D fdentry(file)->d_inode;
> =A0 =A0 =A0 =A0u64 num_bytes;
> =A0 =A0 =A0 =A0u64 start_pos;
> =A0 =A0 =A0 =A0u64 end_of_last_block;
> @@ -149,7 +146,7 @@ static noinline int dirty_and_release_pages(struc=
t btrfs_root *root,
>
> =A0 =A0 =A0 =A0end_of_last_block =3D start_pos + num_bytes - 1;
> =A0 =A0 =A0 =A0err =3D btrfs_set_extent_delalloc(inode, start_pos, en=
d_of_last_block,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 NULL);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 cached);
> =A0 =A0 =A0 =A0if (err)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return err;
>
> @@ -992,9 +989,9 @@ static noinline ssize_t __btrfs_buffered_write(st=
ruct file *file,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (copied > 0) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ret =3D dirty_and_relea=
se_pages(root, file, pages,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 dirty_pages, pos,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 copied);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ret =3D btrfs_dirty_pag=
es(root, inode, pages,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 dirty_pages, pos, copied,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 NULL);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (ret) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0btrfs_=
delalloc_release_space(inode,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0dirty_pages << PAGE_CACHE_SHIFT);
> diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.=
c
> index f561c95..a3f420d 100644
> --- a/fs/btrfs/free-space-cache.c
> +++ b/fs/btrfs/free-space-cache.c
> @@ -508,6 +508,7 @@ int btrfs_write_out_cache(struct btrfs_root *root=
,
> =A0 =A0 =A0 =A0struct inode *inode;
> =A0 =A0 =A0 =A0struct rb_node *node;
> =A0 =A0 =A0 =A0struct list_head *pos, *n;
> + =A0 =A0 =A0 struct page **pages;
> =A0 =A0 =A0 =A0struct page *page;
> =A0 =A0 =A0 =A0struct extent_state *cached_state =3D NULL;
> =A0 =A0 =A0 =A0struct btrfs_free_cluster *cluster =3D NULL;
> @@ -517,13 +518,13 @@ int btrfs_write_out_cache(struct btrfs_root *ro=
ot,
> =A0 =A0 =A0 =A0u64 start, end, len;
> =A0 =A0 =A0 =A0u64 bytes =3D 0;
> =A0 =A0 =A0 =A0u32 *crc, *checksums;
> - =A0 =A0 =A0 pgoff_t index =3D 0, last_index =3D 0;
> =A0 =A0 =A0 =A0unsigned long first_page_offset;
> - =A0 =A0 =A0 int num_checksums;
> + =A0 =A0 =A0 int index =3D 0, num_pages =3D 0;
> =A0 =A0 =A0 =A0int entries =3D 0;
> =A0 =A0 =A0 =A0int bitmaps =3D 0;
> =A0 =A0 =A0 =A0int ret =3D 0;
> =A0 =A0 =A0 =A0bool next_page =3D false;
> + =A0 =A0 =A0 bool out_of_space =3D false;
>
> =A0 =A0 =A0 =A0root =3D root->fs_info->tree_root;
>
> @@ -551,24 +552,31 @@ int btrfs_write_out_cache(struct btrfs_root *ro=
ot,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return 0;
> =A0 =A0 =A0 =A0}
>
> - =A0 =A0 =A0 last_index =3D (i_size_read(inode) - 1) >> PAGE_CACHE_S=
HIFT;
> + =A0 =A0 =A0 num_pages =3D (i_size_read(inode) + PAGE_CACHE_SIZE - 1=
) >>
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 PAGE_CACHE_SHIFT;
> =A0 =A0 =A0 =A0filemap_write_and_wait(inode->i_mapping);
> =A0 =A0 =A0 =A0btrfs_wait_ordered_range(inode, inode->i_size &
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ~(roo=
t->sectorsize - 1), (u64)-1);
>
> =A0 =A0 =A0 =A0/* We need a checksum per page. */
> - =A0 =A0 =A0 num_checksums =3D i_size_read(inode) / PAGE_CACHE_SIZE;
> - =A0 =A0 =A0 crc =3D checksums =A0=3D kzalloc(sizeof(u32) * num_chec=
ksums, GFP_NOFS);
> + =A0 =A0 =A0 crc =3D checksums =3D kzalloc(sizeof(u32) * num_pages, =
GFP_NOFS);
> =A0 =A0 =A0 =A0if (!crc) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0iput(inode);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return 0;
> =A0 =A0 =A0 =A0}
>
> + =A0 =A0 =A0 pages =3D kzalloc(sizeof(struct page *) * num_pages, GF=
P_NOFS);
> + =A0 =A0 =A0 if (!pages) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 kfree(crc);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 iput(inode);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 0;
> + =A0 =A0 =A0 }
> +
> =A0 =A0 =A0 =A0/* Since the first page has all of our checksums and o=
ur generation we
> =A0 =A0 =A0 =A0 * need to calculate the offset into the page that we =
can start writing
> =A0 =A0 =A0 =A0 * our entries.
> =A0 =A0 =A0 =A0 */
> - =A0 =A0 =A0 first_page_offset =3D (sizeof(u32) * num_checksums) + s=
izeof(u64);
> + =A0 =A0 =A0 first_page_offset =3D (sizeof(u32) * num_pages) + sizeo=
f(u64);
>
> =A0 =A0 =A0 =A0/* Get the cluster for this block_group if it exists *=
/
> =A0 =A0 =A0 =A0if (!list_empty(&block_group->cluster_list))
> @@ -590,20 +598,18 @@ int btrfs_write_out_cache(struct btrfs_root *ro=
ot,
> =A0 =A0 =A0 =A0 * after find_get_page at this point. =A0Just putting =
this here so people
> =A0 =A0 =A0 =A0 * know and don't freak out.
> =A0 =A0 =A0 =A0 */
> - =A0 =A0 =A0 while (index <=3D last_index) {
> + =A0 =A0 =A0 while (index < num_pages) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0page =3D grab_cache_page(inode->i_mapp=
ing, index);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!page) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pgoff_t i =3D 0;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 int i;
>
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 while (i < index) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 page =3D=
 find_get_page(inode->i_mapping, i);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 unlock_=
page(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 page_ca=
che_release(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 page_ca=
che_release(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i++;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 for (i =3D 0; i < num_p=
ages; i++) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 unlock_=
page(pages[i]);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 page_ca=
che_release(pages[i]);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out_free;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 pages[index] =3D page;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0index++;
> =A0 =A0 =A0 =A0}
>
> @@ -631,7 +637,12 @@ int btrfs_write_out_cache(struct btrfs_root *roo=
t,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0offset =3D start_offse=
t;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
>
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 page =3D find_get_page(inode->i_mapping=
, index);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (index >=3D num_pages) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 out_of_space =3D true;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 page =3D pages[index];
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0addr =3D kmap(page);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0entry =3D addr + start_offset;
> @@ -708,23 +719,6 @@ int btrfs_write_out_cache(struct btrfs_root *roo=
t,
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bytes +=3D PAGE_CACHE_SIZE;
>
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ClearPageChecked(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 set_page_extent_mapped(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 SetPageUptodate(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 set_page_dirty(page);
> -
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 /*
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* We need to release our reference w=
e got for grab_cache_page,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* except for the first page which wi=
ll hold our checksums, we
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* do that below.
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*/
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (index !=3D 0) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 unlock_page(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 page_cache_release(page=
);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
> -
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 page_cache_release(page);
> -
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0index++;
> =A0 =A0 =A0 =A0} while (node || next_page);
>
> @@ -734,6 +728,10 @@ int btrfs_write_out_cache(struct btrfs_root *roo=
t,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct btrfs_free_space *entry =3D
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0list_entry(pos, struct=
 btrfs_free_space, list);
>
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (index >=3D num_pages) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 out_of_space =3D true;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0page =3D find_get_page(inode->i_mappin=
g, index);
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0addr =3D kmap(page);
> @@ -745,64 +743,58 @@ int btrfs_write_out_cache(struct btrfs_root *ro=
ot,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0crc++;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bytes +=3D PAGE_CACHE_SIZE;
>
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ClearPageChecked(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 set_page_extent_mapped(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 SetPageUptodate(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 set_page_dirty(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 unlock_page(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 page_cache_release(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 page_cache_release(page);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0list_del_init(&entry->list);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0index++;
> =A0 =A0 =A0 =A0}
>
> + =A0 =A0 =A0 if (out_of_space) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 btrfs_drop_pages(pages, num_pages);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 unlock_extent_cached(&BTRFS_I(inode)->i=
o_tree, 0,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0i_size_read(inode) - 1, &cached_state,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0GFP_NOFS);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ret =3D 0;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto out_free;
> + =A0 =A0 =A0 }
> +
> =A0 =A0 =A0 =A0/* Zero out the rest of the pages just to make sure */
> - =A0 =A0 =A0 while (index <=3D last_index) {
> + =A0 =A0 =A0 while (index < num_pages) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0void *addr;
>
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 page =3D find_get_page(inode->i_mapping=
, index);
> -
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 page =3D pages[index];
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0addr =3D kmap(page);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0memset(addr, 0, PAGE_CACHE_SIZE);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0kunmap(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ClearPageChecked(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 set_page_extent_mapped(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 SetPageUptodate(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 set_page_dirty(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 unlock_page(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 page_cache_release(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 page_cache_release(page);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bytes +=3D PAGE_CACHE_SIZE;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0index++;
> =A0 =A0 =A0 =A0}
>
> - =A0 =A0 =A0 btrfs_set_extent_delalloc(inode, 0, bytes - 1, &cached_=
state);
> -
> =A0 =A0 =A0 =A0/* Write the checksums and trans id to the first page =
*/
> =A0 =A0 =A0 =A0{
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0void *addr;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0u64 *gen;
>
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 page =3D find_get_page(inode->i_mapping=
, 0);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 page =3D pages[0];
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0addr =3D kmap(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(addr, checksums, sizeof(u32) * n=
um_checksums);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 gen =3D addr + (sizeof(u32) * num_check=
sums);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(addr, checksums, sizeof(u32) * n=
um_pages);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 gen =3D addr + (sizeof(u32) * num_pages=
);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*gen =3D trans->transid;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0kunmap(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ClearPageChecked(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 set_page_extent_mapped(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 SetPageUptodate(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 set_page_dirty(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 unlock_page(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 page_cache_release(page);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 page_cache_release(page);
> =A0 =A0 =A0 =A0}
> - =A0 =A0 =A0 BTRFS_I(inode)->generation =3D trans->transid;
>
> + =A0 =A0 =A0 ret =3D btrfs_dirty_pages(root, inode, pages, num_pages=
, 0,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 bytes, &cached_state);
> + =A0 =A0 =A0 btrfs_drop_pages(pages, num_pages);
> =A0 =A0 =A0 =A0unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i_size_read(i=
node) - 1, &cached_state, GFP_NOFS);
>
> + =A0 =A0 =A0 if (ret) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ret =3D 0;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto out_free;
> + =A0 =A0 =A0 }
> +
> + =A0 =A0 =A0 BTRFS_I(inode)->generation =3D trans->transid;
> +
> =A0 =A0 =A0 =A0filemap_write_and_wait(inode->i_mapping);
>
> =A0 =A0 =A0 =A0key.objectid =3D BTRFS_FREE_SPACE_OBJECTID;
> @@ -853,6 +845,7 @@ out_free:
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0BTRFS_I(inode)->generation =3D 0;
> =A0 =A0 =A0 =A0}
> =A0 =A0 =A0 =A0kfree(checksums);
> + =A0 =A0 =A0 kfree(pages);
> =A0 =A0 =A0 =A0btrfs_update_inode(trans, root, inode);
> =A0 =A0 =A0 =A0iput(inode);
> =A0 =A0 =A0 =A0return ret;
> --
> 1.7.2.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs=
" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-06 20:47                       ` Jordan Patterson
@ 2011-04-06 23:42                         ` Johannes Hirte
  2011-04-07 13:17                         ` Josef Bacik
  1 sibling, 0 replies; 22+ messages in thread
From: Johannes Hirte @ 2011-04-06 23:42 UTC (permalink / raw)
  To: Jordan Patterson; +Cc: Josef Bacik, linux-btrfs

On Wednesday 06 April 2011 22:47:28 Jordan Patterson wrote:
> Hi Josef:
> 
> I tried your latest patch, since I had the same issue from the first
> email.  With the patch applied, I am now hitting the
> BUG_ON(block_group->total_bitmaps >= max_bitmaps); in add_new_bitmap
> in
> fs/btrfs/free-space-cache.c:1246 as soon as I mount the filesystem,
> with or without -o clear_cache.
> 
> It works fine in 2.6.38.  I get the same error after mounting with
> clear_cache under 2.6.38 and rebooting into the current kernel with
> your patch.
> 
> Jordan

What filesystem is it and how did you mount it with -o clear_cache? If it is 
your rootfs did you applied clear_cache to /etc/fstab or your bootloader? If 
it was the latter it won't work. For the rootfs you need to add it to the boot 
options. For me this worked every time.
Josef, is there any way to detect a wrong cache, saved by an pre-2.6.39 kernel 
and discard it?


regards,
  Johannes

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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-06 17:15                     ` Josef Bacik
  2011-04-06 20:47                       ` Jordan Patterson
@ 2011-04-07  8:28                       ` Johannes Hirte
  1 sibling, 0 replies; 22+ messages in thread
From: Johannes Hirte @ 2011-04-07  8:28 UTC (permalink / raw)
  To: Josef Bacik; +Cc: linux-btrfs

On Wednesday 06 April 2011 19:15:41 Josef Bacik wrote:
> On Wed, Apr 06, 2011 at 01:10:38PM +0200, Johannes Hirte wrote:
> > On Tuesday 05 April 2011 23:57:53 Josef Bacik wrote:
> > > > Now it hit
> > > 
> > > Man I cannot catch a break.  I hope this is the last one.  Thanks,
> 
> Ok I give up, I just cleaned it all up and don't mark the pages as dirty
> unless we're actually going to succeed at writing them.  This should fix
> everything
> 
> ---
>  fs/btrfs/ctree.h            |    5 ++
>  fs/btrfs/file.c             |   21 +++----
>  fs/btrfs/free-space-cache.c |  117
> ++++++++++++++++++++----------------------- 3 files changed, 69
> insertions(+), 74 deletions(-)
> 
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 3458b57..0d00a07 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -2576,6 +2576,11 @@ int btrfs_drop_extents(struct btrfs_trans_handle
> *trans, struct inode *inode, int btrfs_mark_extent_written(struct
> btrfs_trans_handle *trans,
>  			      struct inode *inode, u64 start, u64 end);
>  int btrfs_release_file(struct inode *inode, struct file *file);
> +void btrfs_drop_pages(struct page **pages, size_t num_pages);
> +int btrfs_dirty_pages(struct btrfs_root *root, struct inode *inode,
> +		      struct page **pages, size_t num_pages,
> +		      loff_t pos, size_t write_bytes,
> +		      struct extent_state **cached);
> 
>  /* tree-defrag.c */
>  int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
> diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
> index e621ea5..75899a0 100644
> --- a/fs/btrfs/file.c
> +++ b/fs/btrfs/file.c
> @@ -104,7 +104,7 @@ static noinline int btrfs_copy_from_user(loff_t pos,
> int num_pages, /*
>   * unlocks pages after btrfs_file_write is done with them
>   */
> -static noinline void btrfs_drop_pages(struct page **pages, size_t
> num_pages) +void btrfs_drop_pages(struct page **pages, size_t num_pages)
>  {
>  	size_t i;
>  	for (i = 0; i < num_pages; i++) {
> @@ -127,16 +127,13 @@ static noinline void btrfs_drop_pages(struct page
> **pages, size_t num_pages) * this also makes the decision about creating
> an inline extent vs * doing real data extents, marking pages dirty and
> delalloc as required. */
> -static noinline int dirty_and_release_pages(struct btrfs_root *root,
> -					    struct file *file,
> -					    struct page **pages,
> -					    size_t num_pages,
> -					    loff_t pos,
> -					    size_t write_bytes)
> +int btrfs_dirty_pages(struct btrfs_root *root, struct inode *inode,
> +		      struct page **pages, size_t num_pages,
> +		      loff_t pos, size_t write_bytes,
> +		      struct extent_state **cached)
>  {
>  	int err = 0;
>  	int i;
> -	struct inode *inode = fdentry(file)->d_inode;
>  	u64 num_bytes;
>  	u64 start_pos;
>  	u64 end_of_last_block;
> @@ -149,7 +146,7 @@ static noinline int dirty_and_release_pages(struct
> btrfs_root *root,
> 
>  	end_of_last_block = start_pos + num_bytes - 1;
>  	err = btrfs_set_extent_delalloc(inode, start_pos, end_of_last_block,
> -					NULL);
> +					cached);
>  	if (err)
>  		return err;
> 
> @@ -992,9 +989,9 @@ static noinline ssize_t __btrfs_buffered_write(struct
> file *file, }
> 
>  		if (copied > 0) {
> -			ret = dirty_and_release_pages(root, file, pages,
> -						      dirty_pages, pos,
> -						      copied);
> +			ret = btrfs_dirty_pages(root, inode, pages,
> +						dirty_pages, pos, copied,
> +						NULL);
>  			if (ret) {
>  				btrfs_delalloc_release_space(inode,
>  					dirty_pages << PAGE_CACHE_SHIFT);
> diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> index f561c95..a3f420d 100644
> --- a/fs/btrfs/free-space-cache.c
> +++ b/fs/btrfs/free-space-cache.c
> @@ -508,6 +508,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  	struct inode *inode;
>  	struct rb_node *node;
>  	struct list_head *pos, *n;
> +	struct page **pages;
>  	struct page *page;
>  	struct extent_state *cached_state = NULL;
>  	struct btrfs_free_cluster *cluster = NULL;
> @@ -517,13 +518,13 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  	u64 start, end, len;
>  	u64 bytes = 0;
>  	u32 *crc, *checksums;
> -	pgoff_t index = 0, last_index = 0;
>  	unsigned long first_page_offset;
> -	int num_checksums;
> +	int index = 0, num_pages = 0;
>  	int entries = 0;
>  	int bitmaps = 0;
>  	int ret = 0;
>  	bool next_page = false;
> +	bool out_of_space = false;
> 
>  	root = root->fs_info->tree_root;
> 
> @@ -551,24 +552,31 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  		return 0;
>  	}
> 
> -	last_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT;
> +	num_pages = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>
> +		PAGE_CACHE_SHIFT;
>  	filemap_write_and_wait(inode->i_mapping);
>  	btrfs_wait_ordered_range(inode, inode->i_size &
>  				 ~(root->sectorsize - 1), (u64)-1);
> 
>  	/* We need a checksum per page. */
> -	num_checksums = i_size_read(inode) / PAGE_CACHE_SIZE;
> -	crc = checksums  = kzalloc(sizeof(u32) * num_checksums, GFP_NOFS);
> +	crc = checksums = kzalloc(sizeof(u32) * num_pages, GFP_NOFS);
>  	if (!crc) {
>  		iput(inode);
>  		return 0;
>  	}
> 
> +	pages = kzalloc(sizeof(struct page *) * num_pages, GFP_NOFS);
> +	if (!pages) {
> +		kfree(crc);
> +		iput(inode);
> +		return 0;
> +	}
> +
>  	/* Since the first page has all of our checksums and our generation we
>  	 * need to calculate the offset into the page that we can start writing
>  	 * our entries.
>  	 */
> -	first_page_offset = (sizeof(u32) * num_checksums) + sizeof(u64);
> +	first_page_offset = (sizeof(u32) * num_pages) + sizeof(u64);
> 
>  	/* Get the cluster for this block_group if it exists */
>  	if (!list_empty(&block_group->cluster_list))
> @@ -590,20 +598,18 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  	 * after find_get_page at this point.  Just putting this here so people
>  	 * know and don't freak out.
>  	 */
> -	while (index <= last_index) {
> +	while (index < num_pages) {
>  		page = grab_cache_page(inode->i_mapping, index);
>  		if (!page) {
> -			pgoff_t i = 0;
> +			int i;
> 
> -			while (i < index) {
> -				page = find_get_page(inode->i_mapping, i);
> -				unlock_page(page);
> -				page_cache_release(page);
> -				page_cache_release(page);
> -				i++;
> +			for (i = 0; i < num_pages; i++) {
> +				unlock_page(pages[i]);
> +				page_cache_release(pages[i]);
>  			}
>  			goto out_free;
>  		}
> +		pages[index] = page;
>  		index++;
>  	}
> 
> @@ -631,7 +637,12 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  			offset = start_offset;
>  		}
> 
> -		page = find_get_page(inode->i_mapping, index);
> +		if (index >= num_pages) {
> +			out_of_space = true;
> +			break;
> +		}
> +
> +		page = pages[index];
> 
>  		addr = kmap(page);
>  		entry = addr + start_offset;
> @@ -708,23 +719,6 @@ int btrfs_write_out_cache(struct btrfs_root *root,
> 
>  		bytes += PAGE_CACHE_SIZE;
> 
> -		ClearPageChecked(page);
> -		set_page_extent_mapped(page);
> -		SetPageUptodate(page);
> -		set_page_dirty(page);
> -
> -		/*
> -		 * We need to release our reference we got for grab_cache_page,
> -		 * except for the first page which will hold our checksums, we
> -		 * do that below.
> -		 */
> -		if (index != 0) {
> -			unlock_page(page);
> -			page_cache_release(page);
> -		}
> -
> -		page_cache_release(page);
> -
>  		index++;
>  	} while (node || next_page);
> 
> @@ -734,6 +728,10 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  		struct btrfs_free_space *entry =
>  			list_entry(pos, struct btrfs_free_space, list);
> 
> +		if (index >= num_pages) {
> +			out_of_space = true;
> +			break;
> +		}
>  		page = find_get_page(inode->i_mapping, index);
> 
>  		addr = kmap(page);
> @@ -745,64 +743,58 @@ int btrfs_write_out_cache(struct btrfs_root *root,
>  		crc++;
>  		bytes += PAGE_CACHE_SIZE;
> 
> -		ClearPageChecked(page);
> -		set_page_extent_mapped(page);
> -		SetPageUptodate(page);
> -		set_page_dirty(page);
> -		unlock_page(page);
> -		page_cache_release(page);
> -		page_cache_release(page);
>  		list_del_init(&entry->list);
>  		index++;
>  	}
> 
> +	if (out_of_space) {
> +		btrfs_drop_pages(pages, num_pages);
> +		unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
> +				     i_size_read(inode) - 1, &cached_state,
> +				     GFP_NOFS);
> +		ret = 0;
> +		goto out_free;
> +	}
> +
>  	/* Zero out the rest of the pages just to make sure */
> -	while (index <= last_index) {
> +	while (index < num_pages) {
>  		void *addr;
> 
> -		page = find_get_page(inode->i_mapping, index);
> -
> +		page = pages[index];
>  		addr = kmap(page);
>  		memset(addr, 0, PAGE_CACHE_SIZE);
>  		kunmap(page);
> -		ClearPageChecked(page);
> -		set_page_extent_mapped(page);
> -		SetPageUptodate(page);
> -		set_page_dirty(page);
> -		unlock_page(page);
> -		page_cache_release(page);
> -		page_cache_release(page);
>  		bytes += PAGE_CACHE_SIZE;
>  		index++;
>  	}
> 
> -	btrfs_set_extent_delalloc(inode, 0, bytes - 1, &cached_state);
> -
>  	/* Write the checksums and trans id to the first page */
>  	{
>  		void *addr;
>  		u64 *gen;
> 
> -		page = find_get_page(inode->i_mapping, 0);
> +		page = pages[0];
> 
>  		addr = kmap(page);
> -		memcpy(addr, checksums, sizeof(u32) * num_checksums);
> -		gen = addr + (sizeof(u32) * num_checksums);
> +		memcpy(addr, checksums, sizeof(u32) * num_pages);
> +		gen = addr + (sizeof(u32) * num_pages);
>  		*gen = trans->transid;
>  		kunmap(page);
> -		ClearPageChecked(page);
> -		set_page_extent_mapped(page);
> -		SetPageUptodate(page);
> -		set_page_dirty(page);
> -		unlock_page(page);
> -		page_cache_release(page);
> -		page_cache_release(page);
>  	}
> -	BTRFS_I(inode)->generation = trans->transid;
> 
> +	ret = btrfs_dirty_pages(root, inode, pages, num_pages, 0,
> +					    bytes, &cached_state);
> +	btrfs_drop_pages(pages, num_pages);
>  	unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
>  			     i_size_read(inode) - 1, &cached_state, GFP_NOFS);
> 
> +	if (ret) {
> +		ret = 0;
> +		goto out_free;
> +	}
> +
> +	BTRFS_I(inode)->generation = trans->transid;
> +
>  	filemap_write_and_wait(inode->i_mapping);
> 
>  	key.objectid = BTRFS_FREE_SPACE_OBJECTID;
> @@ -853,6 +845,7 @@ out_free:
>  		BTRFS_I(inode)->generation = 0;
>  	}
>  	kfree(checksums);
> +	kfree(pages);
>  	btrfs_update_inode(trans, root, inode);
>  	iput(inode);
>  	return ret;

After testing the last hours without any oops; i think it's really fixed now. 
It also seems to fix the ENOSPC-bug I've reported some time ago:
http://marc.info/?l=linux-btrfs&m=129120932813085&w=2
Feel free to add my:
Tested-by Johannes Hirte <johannes.hirte@fem.tu-ilmenau.de>

regards,
  Johannes

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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2011-04-06 20:47                       ` Jordan Patterson
  2011-04-06 23:42                         ` Johannes Hirte
@ 2011-04-07 13:17                         ` Josef Bacik
       [not found]                           ` <BANLkTin1MN-QZWGvVE4o0T1_U9B1qtunig@mail.gmail.com>
  1 sibling, 1 reply; 22+ messages in thread
From: Josef Bacik @ 2011-04-07 13:17 UTC (permalink / raw)
  To: Jordan Patterson; +Cc: Josef Bacik, linux-btrfs

On Wed, Apr 06, 2011 at 02:47:28PM -0600, Jordan Patterson wrote:
> Hi Josef:
> 
> I tried your latest patch, since I had the same issue from the first
> email.  With the patch applied, I am now hitting the
> BUG_ON(block_group->total_bitmaps >= max_bitmaps); in add_new_bitmap
> in
> fs/btrfs/free-space-cache.c:1246 as soon as I mount the filesystem,
> with or without -o clear_cache.
> 
> It works fine in 2.6.38.  I get the same error after mounting with
> clear_cache under 2.6.38 and rebooting into the current kernel with
> your patch.
> 

Do you have a backtrace so I can see how we're getting here?  This is a seperate
issue from the one this patch tries to solve, but now that it seems that's fixed
I will work on this now :).  Thanks,

Josef

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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
       [not found]                           ` <BANLkTin1MN-QZWGvVE4o0T1_U9B1qtunig@mail.gmail.com>
@ 2011-04-07 15:44                             ` Jordan Patterson
  0 siblings, 0 replies; 22+ messages in thread
From: Jordan Patterson @ 2011-04-07 15:44 UTC (permalink / raw)
  To: linux-btrfs

On Thu, Apr 7, 2011 at 9:44 AM, Jordan Patterson <jordanp@gmail.com> wr=
ote:
> On Thu, Apr 7, 2011 at 7:17 AM, Josef Bacik <josef@redhat.com> wrote:
>> On Wed, Apr 06, 2011 at 02:47:28PM -0600, Jordan Patterson wrote:
>>> Hi Josef:
>>>
>>> I tried your latest patch, since I had the same issue from the firs=
t
>>> email. =A0With the patch applied, I am now hitting the
>>> BUG_ON(block_group->total_bitmaps >=3D max_bitmaps); in add_new_bit=
map
>>> in
>>> fs/btrfs/free-space-cache.c:1246 as soon as I mount the filesystem,
>>> with or without -o clear_cache.
>>>
>>> It works fine in 2.6.38. =A0I get the same error after mounting wit=
h
>>> clear_cache under 2.6.38 and rebooting into the current kernel with
>>> your patch.
>>>
>>
>> Do you have a backtrace so I can see how we're getting here? =A0This=
 is a seperate
>> issue from the one this patch tries to solve, but now that it seems =
that's fixed
>> I will work on this now :). =A0Thanks,
>>
>> Josef
>>
>
> I wasn't able to test until now, but Johannes' suggestion may have
> fixed the issue for me. =A0I added clear_cache to my rootflags in gru=
b,
> and it is now mounted fine with the current btrfs code with your last
> patch. =A0I don't have the backtrace, but I'll send it to you it if I
> see it happen again.
>
> Thanks.
>
> Jordan
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* BUG: unable to handle kernel NULL pointer dereference at (null)
  2014-10-23  6:58 Kevin Wilson
@ 2014-10-23  9:05 ` Paul Bolle
  0 siblings, 0 replies; 22+ messages in thread
From: Paul Bolle @ 2014-10-23  9:05 UTC (permalink / raw)
  To: kernelnewbies

On Thu, 2014-10-23 at 09:58 +0300, Kevin Wilson wrote:
> I am getting this message when running a patched kernel:
> BUG: unable to handle kernel NULL pointer dereference at (null)

That is just what you get when the kernel dereferences NULL, isn't it?
(If the kernel dereferences, say, something halfway some struct, you'll
see a hex address instead of "(null)".) Assuming x86, see:
arch/x86/mm/fault.c:show_fault_oops() and lib/vsprintf.c:pointer().

> Is there some kernel configuration item which enables getting
> , instead "(null)", the proper value (I assume it should be a method name)

Doesn't your BUG also print a backtrace that points at a (possible)
culprit?


Paul Bolle

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

* BUG: unable to handle kernel NULL pointer dereference at (null)
@ 2014-10-23  6:58 Kevin Wilson
  2014-10-23  9:05 ` Paul Bolle
  0 siblings, 1 reply; 22+ messages in thread
From: Kevin Wilson @ 2014-10-23  6:58 UTC (permalink / raw)
  To: kernelnewbies

Hello,
I am getting this message when running a patched kernel:
BUG: unable to handle kernel NULL pointer dereference at (null)

Is there some kernel configuration item which enables getting
, instead "(null)", the proper value (I assume it should be a method name)


Regards,
Kevin

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

* Re: BUG: unable to handle kernel NULL pointer dereference at (null)
  2013-08-11  5:53 [cpufreq] " Fengguang Wu
@ 2013-08-12  4:59 ` Viresh Kumar
  0 siblings, 0 replies; 22+ messages in thread
From: Viresh Kumar @ 2013-08-12  4:59 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Lukasz Majewski, Rafael J. Wysocki, cpufreq, linux-pm, linux-kernel

On Sun, Aug 11, 2013 at 11:23 AM, Fengguang Wu <fengguang.wu@intel.com> wrote:
> Greetings,
>
> I got the below dmesg and the first bad commit is
>
> commit 01e3e82efc6742d5cf7ba14fb7a9bea318b386d8
> Author: Lukasz Majewski <l.majewski@samsung.com>
> Date:   Tue Aug 6 22:53:08 2013 +0530
>
>     cpufreq: Store cpufreq policies in a list
>
>     Policies available in the cpufreq framework are now linked together.
>     They are accessible via cpufreq_policy_list defined in the cpufreq
>     core.
>
>     Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
>     Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
>     Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Its already fixed by: c88a1f8b96e7384627b918dfabbfc0c615a4a914 in Rafael's
bleeding-edge branch.. Thanks for reporting.

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

* BUG: unable to handle kernel NULL pointer dereference at (null)
@ 2011-11-13 15:18 Andreas Hartmann
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Hartmann @ 2011-11-13 15:18 UTC (permalink / raw)
  To: linux-kernel

Hello!

The following bug came up during playing webradio (mp3):


Nov 13 15:21:16 notebook2 kernel: [45532.745674] IP: [<ffffffff81249a88>] jbd2_journal_grab_journal_head+0x18/0xc0
Nov 13 15:21:16 notebook2 kernel: [45532.745685] PGD 5cb2f067 PUD 6f1c6067 PMD 0 
Nov 13 15:21:16 notebook2 kernel: [45532.745690] Oops: 0002 [#1] PREEMPT SMP 
Nov 13 15:21:16 notebook2 kernel: [45532.745696] CPU 1 
Nov 13 15:21:16 notebook2 kernel: [45532.745698] Modules linked in: ath9k mac80211 ath9k_common ath9k_hw ath cfg80211 autofs4 fuse nfs lockd fscache auth_rpcgss nfs_acl sunrpc snd_usb_audio snd_usbmidi_lib snd_rawmidi af_packet arc4 edd snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device cpufreq_conservative cpufreq_userspace cpufreq_powersave acpi_cpufreq mperf loop snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_timer snd iTCO_wdt r8169 soundcore pcspkr msi_laptop iTCO_vendor_support intel_ips wmi i2c_i801 joydev sparse_keymap sr_mod cdrom sg mei(C) rfkill snd_page_alloc battery ac sha256_generic cbc dm_crypt linear i915 drm_kms_helper drm i2c_algo_bit video button dm_snapshot dm_mod fan processor ata_generic thermal thermal_sys [last unloaded: cfg80211]
Nov 13 15:21:16 notebook2 kernel: [45532.745767] 
Nov 13 15:21:16 notebook2 kernel: [45532.745771] Pid: 2178, comm: plugin-containe Tainted: G        WC  3.1.0-1-desktop #1 Micro-Star International CR620/CR620
Nov 13 15:21:16 notebook2 kernel: [45532.745778] RIP: 0010:[<ffffffff81249a88>]  [<ffffffff81249a88>] jbd2_journal_grab_journal_head+0x18/0xc0
Nov 13 15:21:16 notebook2 kernel: [45532.745785] RSP: 0000:ffff880002b4d898  EFLAGS: 00010202
Nov 13 15:21:16 notebook2 kernel: [45532.745789] RAX: ffff880002b4c000 RBX: 0000000000000000 RCX: 0000000000000000
Nov 13 15:21:16 notebook2 kernel: [45532.745793] RDX: ffff880002b4dfd8 RSI: ffffea0000576518 RDI: 0000000000000000
Nov 13 15:21:16 notebook2 kernel: [45532.745798] RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000000f
Nov 13 15:21:16 notebook2 kernel: [45532.745802] R10: 0000000000000001 R11: dead000000200200 R12: ffff880002b4c000
Nov 13 15:21:16 notebook2 kernel: [45532.745806] R13: ffff880002b4dfd8 R14: ffff8800707f6f00 R15: ffffea0000576518
Nov 13 15:21:16 notebook2 kernel: [45532.745811] FS:  00007f417d4b4800(0000) GS:ffff880076c40000(0000) knlGS:0000000000000000
Nov 13 15:21:16 notebook2 kernel: [45532.745816] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 13 15:21:16 notebook2 kernel: [45532.745820] CR2: 0000000000000000 CR3: 000000001c8b3000 CR4: 00000000000006e0
Nov 13 15:21:16 notebook2 kernel: [45532.745824] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Nov 13 15:21:16 notebook2 kernel: [45532.745829] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Nov 13 15:21:16 notebook2 kernel: [45532.745833] Process plugin-containe (pid: 2178, threadinfo ffff880002b4c000, task ffff88004617e380)
Nov 13 15:21:16 notebook2 kernel: [45532.745838] Stack:
Nov 13 15:21:16 notebook2 kernel: [45532.745841]  ffffea0000d43930 0000000000000000 0000000000000001 ffffffff81153050
Nov 13 15:21:16 notebook2 kernel: [45532.745847]  ffffc90000304000 ffffffff8123fda8 ffff880070023ce0 ffff880002b4c000
Nov 13 15:21:16 notebook2 kernel: [45532.745853]  ffff88003744eb9c ffff880002b4dfd8 0000000000000000 ffffea0000576538
Nov 13 15:21:16 notebook2 kernel: [45532.745859] Call Trace:
Nov 13 15:21:16 notebook2 kernel: [45532.745869]  [<ffffffff8123fda8>] jbd2_journal_try_to_free_buffers+0x68/0x1a0
Nov 13 15:21:16 notebook2 kernel: [45532.745879]  [<ffffffff811109e7>] shrink_page_list+0x517/0x5a0
Nov 13 15:21:16 notebook2 kernel: [45532.745887]  [<ffffffff81110e27>] shrink_inactive_list+0x117/0x470
Nov 13 15:21:16 notebook2 kernel: [45532.745893]  [<ffffffff811116e2>] shrink_zone+0x1d2/0x270
Nov 13 15:21:16 notebook2 kernel: [45532.745899]  [<ffffffff81111a67>] shrink_zones+0x77/0x120
Nov 13 15:21:16 notebook2 kernel: [45532.745905]  [<ffffffff81111bad>] do_try_to_free_pages+0x9d/0x370
Nov 13 15:21:16 notebook2 kernel: [45532.745911]  [<ffffffff81112168>] try_to_free_pages+0x88/0x180
Nov 13 15:21:16 notebook2 kernel: [45532.745918]  [<ffffffff811051c0>] __alloc_pages_nodemask+0x510/0x870
Nov 13 15:21:16 notebook2 kernel: [45532.745926]  [<ffffffff8113f60d>] alloc_pages_vma+0x9d/0x160
Nov 13 15:21:16 notebook2 kernel: [45532.745934]  [<ffffffff8114f060>] do_huge_pmd_anonymous_page+0x160/0x260
Nov 13 15:21:16 notebook2 kernel: [45532.745944]  [<ffffffff815aa64e>] do_page_fault+0x19e/0x550
Nov 13 15:21:16 notebook2 kernel: [45532.745950]  [<ffffffff815a79b5>] page_fault+0x25/0x30
Nov 13 15:21:16 notebook2 kernel: [45532.745958]  [<00007f4170757993>] 0x7f4170757992
Nov 13 15:21:16 notebook2 kernel: [45532.745961] Code: 1c f4 ff eb c8 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 65 48 8b 14 25 08 b6 00 00 48 8d 82 28 e0 ff ff 48 83 ec 28 83 40 1c 01 <f0> 0f ba 2f 15 19 c9 85 c9 75 4a 48 8b 17 31 c0 80 e6 40 74 08 
Nov 13 15:21:16 notebook2 kernel: [45532.745991] RIP  [<ffffffff81249a88>] jbd2_journal_grab_journal_head+0x18/0xc0
Nov 13 15:21:16 notebook2 kernel: [45532.745996]  RSP <ffff880002b4d898>
Nov 13 15:21:16 notebook2 kernel: [45532.745999] CR2: 0000000000000000
Nov 13 15:21:16 notebook2 kernel: [45532.746015] splash_prepare: vc_num: 6
Nov 13 15:21:16 notebook2 kernel: [45532.746018] splash_off: 
Nov 13 15:21:16 notebook2 kernel: [45532.801751] splash_prepare: vc_num: 6
Nov 13 15:21:16 notebook2 kernel: [45532.801762] splash_off: 
Nov 13 15:21:16 notebook2 kernel: [45532.805744] ---[ end trace fc8f983ea29231a0 ]---
Nov 13 15:21:16 notebook2 kernel: [45532.805751] note: plugin-containe[2178] exited with preempt_count 1


The load of the machine got higher and higher (couldn't find any
process, which created the load). I had to reboot.

I can provide more information if you need them!


Kind regards,
Andreas



lspci -vv

00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx-
        Latency: 0
        Capabilities: [e0] Vendor Specific Information: Len=0c <?>
        Kernel driver in use: agpgart-intel

00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 41
        Region 0: Memory at f0000000 (64-bit, non-prefetchable) [size=4M]
        Region 2: Memory at e0000000 (64-bit, prefetchable) [size=256M]
        Region 4: I/O ports at e080 [size=8]
        Expansion ROM at <unassigned> [disabled]
        Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
                Address: fee0a00c  Data: 4161
        Capabilities: [d0] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [a4] PCI Advanced Features
                AFCap: TP+ FLR+
                AFCtrl: FLR-
                AFStatus: TP-
        Kernel driver in use: i915

00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at f680a000 (64-bit, non-prefetchable) [size=16]
        Capabilities: [50] Power Management version 3                                                                                                                  
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)                                                                             
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-                                                                                                 
        Capabilities: [8c] MSI: Enable- Count=1/1 Maskable- 64bit+                                                                                                     
                Address: 0000000000000000  Data: 0000
        Kernel driver in use: mei                                                                                                                                                              

00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05) (prog-if 20 [EHCI])
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at f6808000 (32-bit, non-prefetchable) [size=1K]
        Capabilities: [50] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [58] Debug port: BAR=1 offset=00a0
        Capabilities: [98] PCI Advanced Features
                AFCap: TP+ FLR+
                AFCtrl: FLR-
                AFStatus: TP-
        Kernel driver in use: ehci_hcd

00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 42
        Region 0: Memory at f6800000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [50] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee0a00c  Data: 4179
        Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- RBE- FLReset+
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0 <64ns, L1 <1us
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed unknown, Width x0, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
        Capabilities: [100 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=01
                        Status: NegoPending- InProgress-
                VC1:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=1 ArbSelect=Fixed TC/VC=02
                        Status: NegoPending- InProgress-
        Capabilities: [130 v1] Root Complex Link
                Desc:   PortNumber=0f ComponentID=00 EltType=Config
                Link0:  Desc:   TargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+
                        Addr:   00000000fed1c000
        Kernel driver in use: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05) (prog-if 00 [Normal decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
        I/O behind bridge: 0000d000-0000dfff
        Memory behind bridge: f5400000-f67fffff
        Prefetchable memory behind bridge: 000000007c600000-000000007c7fffff
        Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
        BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
                PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
        Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <4us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x0, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #0, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
                        Changed: MRL- PresDet- LinkState-
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+ ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Micro-Star International Co., Ltd. Device 1033
        Capabilities: [a0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport

00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05) (prog-if 00 [Normal decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Bus: primary=00, secondary=02, subordinate=04, sec-latency=0
        I/O behind bridge: 0000c000-0000cfff
        Memory behind bridge: f0400000-f2bfffff
        Prefetchable memory behind bridge: 000000007c400000-000000007c5fffff
        Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
        BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
                PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
        Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #2, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <4us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x0, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #1, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet+ CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
                        Changed: MRL- PresDet- LinkState-
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+ ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Micro-Star International Co., Ltd. Device 1033
        Capabilities: [a0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport

00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 (rev 05) (prog-if 00 [Normal decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Bus: primary=00, secondary=05, subordinate=05, sec-latency=0
        I/O behind bridge: 0000b000-0000bfff
        Memory behind bridge: f4000000-f53fffff
        Prefetchable memory behind bridge: 000000007c200000-000000007c3fffff
        Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
        BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
                PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
        Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #4, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <256ns, L1 <4us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #3, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet+ LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+ ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Gammagraphx, Inc. (or missing ID) Device 0000
        Capabilities: [a0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport

00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 05) (prog-if 00 [Normal decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Bus: primary=00, secondary=06, subordinate=06, sec-latency=0
        I/O behind bridge: 0000a000-0000afff
        Memory behind bridge: f2c00000-f3ffffff
        Prefetchable memory behind bridge: 000000007c000000-000000007c1fffff
        Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
        BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
                PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
        Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #6, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <256ns, L1 <4us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #5, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet+ LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+ ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Micro-Star International Co., Ltd. Device 1033
        Capabilities: [a0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport

00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05) (prog-if 20 [EHCI])
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 23
        Region 0: Memory at f6807000 (32-bit, non-prefetchable) [size=1K]
        Capabilities: [50] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME+
        Capabilities: [58] Debug port: BAR=1 offset=00a0
        Capabilities: [98] PCI Advanced Features
                AFCap: TP+ FLR+
                AFCtrl: FLR-
                AFStatus: TP-
        Kernel driver in use: ehci_hcd

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5) (prog-if 01 [Subtractive decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Bus: primary=00, secondary=07, subordinate=07, sec-latency=32
        Secondary status: 66MHz- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
        BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
                PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
        Capabilities: [50] Subsystem: Micro-Star International Co., Ltd. Device 1033

00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Capabilities: [e0] Vendor Specific Information: Len=10 <?>

00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 05) (prog-if 01 [AHCI 1.0])
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin B routed to IRQ 40
        Region 0: I/O ports at e070 [size=8]
        Region 1: I/O ports at e060 [size=4]
        Region 2: I/O ports at e050 [size=8]
        Region 3: I/O ports at e040 [size=4]
        Region 4: I/O ports at e020 [size=32]
        Region 5: Memory at f6806000 (32-bit, non-prefetchable) [size=2K]
        Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
                Address: fee0500c  Data: 4151
        Capabilities: [70] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [a8] SATA HBA v1.0 BAR4 Offset=00000004
        Capabilities: [b0] PCI Advanced Features
                AFCap: TP+ FLR+
                AFCtrl: FLR-
                AFStatus: TP-
        Kernel driver in use: ahci

00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin C routed to IRQ 18
        Region 0: Memory at f6805000 (64-bit, non-prefetchable) [size=256]
        Region 4: I/O ports at e000 [size=32]
        Kernel driver in use: i801_smbus

00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 05)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin C routed to IRQ 18
        Region 0: Memory at f6804000 (64-bit, non-prefetchable) [size=4K]
        Capabilities: [50] Power Management version 3
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Kernel driver in use: intel ips

05:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
        Subsystem: AzureWave Device 1089
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 19
        Region 0: Memory at f4000000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA PME(D0+,D1+,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [60] Express (v2) Legacy Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <64us
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Capabilities: [160 v1] Device Serial Number 00-15-17-ff-ff-24-14-12
        Capabilities: [170 v1] Power Budgeting <?>
        Kernel driver in use: ath9k

06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 43
        Region 0: I/O ports at a000 [size=256]
        Region 2: Memory at f2c30000 (64-bit, prefetchable) [size=4K]
        Region 4: Memory at f2c20000 (64-bit, prefetchable) [size=64K]
        Expansion ROM at f2c00000 [disabled] [size=128K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee0f00c  Data: 4181
        Capabilities: [70] Express (v2) Endpoint, MSI 01
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB
        Capabilities: [ac] MSI-X: Enable- Count=2 Masked-
                Vector table: BAR=4 offset=00000000
                PBA: BAR=4 offset=00000800
        Capabilities: [cc] Vital Product Data
                Unknown small resource type 00, will not decode more.
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Capabilities: [160 v1] Device Serial Number 01-00-00-00-ff-ff-00-00
        Kernel driver in use: r8169

3f:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0

3f:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0

3f:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0

3f:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0

3f:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0

3f:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
        Subsystem: Micro-Star International Co., Ltd. Device 1033
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0



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

* Re: BUG: unable to handle kernel NULL pointer dereference at       (null)
  2011-07-20 15:12 TB
@ 2011-07-21  4:13 ` Randy Dunlap
  0 siblings, 0 replies; 22+ messages in thread
From: Randy Dunlap @ 2011-07-21  4:13 UTC (permalink / raw)
  To: TB, scsi; +Cc: linux-kernel

On Wed, 20 Jul 2011 11:12:41 -0400 TB wrote:

[adding linux-scsi mailing list]

> This is with kernel 2.6.39 compiled with
> gcc (Debian 4.3.2-1.1) 4.3.2
> 
> Please CC me as I am not subscribed to the mailing list.
> 
> [567683.945368] aacraid: SCSI bus appears hung
> [567778.804257] scsi_eh_0: page allocation failure. order: 6, mode:0x20
> [567778.804262] Pid: 962, comm: scsi_eh_0 Tainted: G   M   2.6.39 #1
> [567778.804265] Call Trace:
> [567778.804277]  [<ffffffff8108e285>] ? __alloc_pages_nodemask+0x74f/0x7b9
> [567778.804284]  [<ffffffff812f36b1>] ? __domain_mapping+0x181/0x1b7
> [567778.804289]  [<ffffffff8108d249>] ? __get_free_pages+0x9/0x46
> [567778.804293]  [<ffffffff812f3c78>] ? intel_alloc_coherent+0x83/0xdb
> [567778.804300]  [<ffffffff8137557d>] ? aac_fib_setup+0xf8/0x227
> [567778.804304]  [<ffffffff8137531d>] ? aac_init_adapter+0x7a9/0x7d7
> [567778.804309]  [<ffffffff81379bc3>] ? aac_src_init+0x26b/0x3bb
> [567778.804315]  [<ffffffff810bb4f6>] ? add_partial+0x11/0x57
> [567778.804319]  [<ffffffff8137653f>] ? _aac_reset_adapter+0x29e/0x473
> [567778.804326]  [<ffffffff81377592>] ? aac_reset_adapter+0x118/0x252
> [567778.804329]  [<ffffffff813702d1>] ? aac_eh_reset+0x15e/0x185
> [567778.804333]  [<ffffffff81358c85>] ? scsi_try_host_reset+0x51/0xcc
> [567778.804336]  [<ffffffff81359f84>] ? scsi_eh_ready_devs+0x671/0x7e6
> [567778.804339]  [<ffffffff8135a63c>] ? scsi_error_handler+0x39b/0x59d
> [567778.804342]  [<ffffffff8135a2a1>] ? scsi_eh_get_sense+0x1a8/0x1a8
> [567778.804347]  [<ffffffff8104d98a>] ? kthread+0x7e/0x86
> [567778.804351]  [<ffffffff8156d094>] ? kernel_thread_helper+0x4/0x10
> [567778.804354]  [<ffffffff8104d90c>] ? kthread_worker_fn+0x10d/0x10d
> [567778.804357]  [<ffffffff8156d090>] ? gs_change+0xb/0xb
> [567778.804358] Mem-Info:
> [567778.804359] Node 0 DMA per-cpu:
> [567778.804362] CPU    0: hi:    0, btch:   1 usd:   0
> [567778.804364] CPU    1: hi:    0, btch:   1 usd:   0
> [567778.804365] CPU    2: hi:    0, btch:   1 usd:   0
> [567778.804367] CPU    3: hi:    0, btch:   1 usd:   0
> [567778.804369] CPU    4: hi:    0, btch:   1 usd:   0
> [567778.804370] CPU    5: hi:    0, btch:   1 usd:   0
> [567778.804372] CPU    6: hi:    0, btch:   1 usd:   0
> [567778.804374] CPU    7: hi:    0, btch:   1 usd:   0
> [567778.804375] CPU    8: hi:    0, btch:   1 usd:   0
> [567778.804377] CPU    9: hi:    0, btch:   1 usd:   0
> [567778.804379] CPU   10: hi:    0, btch:   1 usd:   0
> [567778.804380] CPU   11: hi:    0, btch:   1 usd:   0
> [567778.804382] CPU   12: hi:    0, btch:   1 usd:   0
> [567778.804384] CPU   13: hi:    0, btch:   1 usd:   0
> [567778.804385] CPU   14: hi:    0, btch:   1 usd:   0
> [567778.804387] CPU   15: hi:    0, btch:   1 usd:   0
> [567778.804389] Node 0 DMA32 per-cpu:
> [567778.804391] CPU    0: hi:  186, btch:  31 usd: 149
> [567778.804392] CPU    1: hi:  186, btch:  31 usd:   0
> [567778.804394] CPU    2: hi:  186, btch:  31 usd:   0
> [567778.804396] CPU    3: hi:  186, btch:  31 usd:   0
> [567778.804398] CPU    4: hi:  186, btch:  31 usd:   0
> [567778.804399] CPU    5: hi:  186, btch:  31 usd:   0
> [567778.804401] CPU    6: hi:  186, btch:  31 usd:   0
> [567778.804403] CPU    7: hi:  186, btch:  31 usd:   0
> [567778.804404] CPU    8: hi:  186, btch:  31 usd:   0
> [567778.804406] CPU    9: hi:  186, btch:  31 usd:   0
> [567778.804408] CPU   10: hi:  186, btch:  31 usd: 167
> [567778.804410] CPU   11: hi:  186, btch:  31 usd:   0
> [567778.804411] CPU   12: hi:  186, btch:  31 usd:   0
> [567778.804413] CPU   13: hi:  186, btch:  31 usd:   0
> [567778.804414] CPU   14: hi:  186, btch:  31 usd:   0
> [567778.804416] CPU   15: hi:  186, btch:  31 usd:   0
> [567778.804417] Node 0 Normal per-cpu:
> [567778.804420] CPU    0: hi:  186, btch:  31 usd: 161
> [567778.804421] CPU    1: hi:  186, btch:  31 usd: 104
> [567778.804423] CPU    2: hi:  186, btch:  31 usd:  50
> [567778.804424] CPU    3: hi:  186, btch:  31 usd:   0
> [567778.804426] CPU    4: hi:  186, btch:  31 usd:   0
> [567778.804428] CPU    5: hi:  186, btch:  31 usd: 183
> [567778.804429] CPU    6: hi:  186, btch:  31 usd:   0
> [567778.804431] CPU    7: hi:  186, btch:  31 usd:   0
> [567778.804433] CPU    8: hi:  186, btch:  31 usd: 165
> [567778.804435] CPU    9: hi:  186, btch:  31 usd:  42
> [567778.804436] CPU   10: hi:  186, btch:  31 usd: 160
> [567778.804438] CPU   11: hi:  186, btch:  31 usd:   0
> [567778.804440] CPU   12: hi:  186, btch:  31 usd:   0
> [567778.804441] CPU   13: hi:  186, btch:  31 usd:   5
> [567778.804443] CPU   14: hi:  186, btch:  31 usd:   0
> [567778.804444] CPU   15: hi:  186, btch:  31 usd:   0
> [567778.804446] Node 1 Normal per-cpu:
> [567778.804448] CPU    0: hi:  186, btch:  31 usd: 185
> [567778.804450] CPU    1: hi:  186, btch:  31 usd: 166
> [567778.804451] CPU    2: hi:  186, btch:  31 usd:  68
> [567778.804453] CPU    3: hi:  186, btch:  31 usd:   1
> [567778.804455] CPU    4: hi:  186, btch:  31 usd: 119
> [567778.804456] CPU    5: hi:  186, btch:  31 usd:  22
> [567778.804458] CPU    6: hi:  186, btch:  31 usd:  27
> [567778.804460] CPU    7: hi:  186, btch:  31 usd:   0
> [567778.804461] CPU    8: hi:  186, btch:  31 usd: 176
> [567778.804463] CPU    9: hi:  186, btch:  31 usd:   5
> [567778.804465] CPU   10: hi:  186, btch:  31 usd: 133
> [567778.804466] CPU   11: hi:  186, btch:  31 usd:   0
> [567778.804468] CPU   12: hi:  186, btch:  31 usd: 151
> [567778.804470] CPU   13: hi:  186, btch:  31 usd: 185
> [567778.804471] CPU   14: hi:  186, btch:  31 usd:  82
> [567778.804473] CPU   15: hi:  186, btch:  31 usd:  34
> [567778.804477] active_anon:1207894 inactive_anon:127905 isolated_anon:0
> [567778.804478]  active_file:2522893 inactive_file:2504636 isolated_file:0
> [567778.804479]  unevictable:41 dirty:38 writeback:0 unstable:0
> [567778.804480]  free:1445271 slab_reclaimable:160878
> slab_unreclaimable:240267
> [567778.804481]  mapped:141123 shmem:1827 pagetables:21711 bounce:0
> [567778.804483] Node 0 DMA free:15880kB min:40kB low:48kB high:60kB
> active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB
> unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15656kB
> mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB
> slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB
> pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0
> all_unreclaimable? yes
> [567778.804493] lowmem_reserve[]: 0 2991 16121 16121
> [567778.804495] Node 0 DMA32 free:319744kB min:8344kB low:10428kB
> high:12516kB active_anon:389620kB inactive_anon:104492kB
> active_file:849196kB inactive_file:849504kB unevictable:12kB
> isolated(anon):0kB isolated(file):0kB present:3063520kB mlocked:12kB
> dirty:8kB writeback:0kB mapped:16272kB shmem:76kB
> slab_reclaimable:223936kB slab_unreclaimable:370680kB
> kernel_stack:1760kB pagetables:516kB unstable:0kB bounce:0kB
> writeback_tmp:0kB pages_scanned:245 all_unreclaimable? no
> [567778.804506] lowmem_reserve[]: 0 0 13130 13130
> [567778.804509] Node 0 Normal free:3333768kB min:36632kB low:45788kB
> high:54948kB active_anon:2179952kB inactive_anon:218320kB
> active_file:3476976kB inactive_file:3453700kB unevictable:128kB
> isolated(anon):0kB isolated(file):0kB present:13445120kB mlocked:0kB
> dirty:92kB writeback:0kB mapped:53932kB shmem:6664kB
> slab_reclaimable:221760kB slab_unreclaimable:392212kB
> kernel_stack:1320kB pagetables:45812kB unstable:0kB bounce:0kB
> writeback_tmp:0kB pages_scanned:33 all_unreclaimable? no
> [567778.804519] lowmem_reserve[]: 0 0 0 0
> [567778.804522] Node 1 Normal free:2111692kB min:45088kB low:56360kB
> high:67632kB active_anon:2262004kB inactive_anon:188808kB
> active_file:5764876kB inactive_file:5715340kB unevictable:24kB
> isolated(anon):0kB isolated(file):0kB present:16547840kB mlocked:192kB
> dirty:52kB writeback:0kB mapped:494288kB shmem:568kB
> slab_reclaimable:197816kB slab_unreclaimable:198176kB kernel_stack:944kB
> pagetables:40516kB unstable:0kB bounce:0kB writeback_tmp:0kB
> pages_scanned:63 all_unreclaimable? no
> [567778.804532] lowmem_reserve[]: 0 0 0 0
> [567778.804535] Node 0 DMA: 0*4kB 1*8kB 0*16kB 0*32kB 2*64kB 1*128kB
> 1*256kB 0*512kB 1*1024kB 1*2048kB 3*4096kB = 15880kB
> [567778.804542] Node 0 DMA32: 9986*4kB 14264*8kB 9219*16kB 576*32kB
> 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 319992kB
> [567778.804548] Node 0 Normal: 458680*4kB 123961*8kB 31413*16kB 157*32kB
> 6*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 3334552kB
> [567778.804555] Node 1 Normal: 253413*4kB 79386*8kB 28562*16kB 226*32kB
> 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 2112964kB
> [567778.804562] 5031610 total pagecache pages
> [567778.804563] 2624 pages in swap cache
> [567778.804565] Swap cache stats: add 34221223, delete 34218599, find
> 16354807/21177156
> [567778.804567] Free swap  = 7401220kB
> [567778.804568] Total swap = 7999416kB
> [567778.932784] 8388592 pages RAM
> [567778.932786] 119955 pages reserved
> [567778.932787] 3233713 pages shared
> [567778.932788] 4446427 pages non-shared
> [567798.905490] aacraid: Host adapter abort request (0,0,1,0)
> [567808.890221] aacraid: Host adapter abort request (0,0,1,0)
> [567818.874952] aacraid: Host adapter abort request (0,0,0,0)
> [567828.859673] aacraid: Host adapter abort request (0,0,0,0)
> [567828.859728] aacraid: Host adapter reset request. SCSI hang ?
> [567889.007644] aacraid: SCSI bus appears hung
> [567889.007693] BUG: unable to handle kernel NULL pointer dereference at
>           (null)
> [567889.007777] IP: [<ffffffff81052adc>] exit_creds+0x12/0x78
> [567889.007830] PGD 0
> [567889.007866] Oops: 0000 [#1] SMP
> [567889.007907] last sysfs file:
> /sys/devices/pci0000:00/0000:00:1f.2/host2/target2:0:0/2:0:0:0/vendor
> [567889.007986] CPU 14
> [567889.007995] Modules linked in: i2c_i801 evdev i2c_core button [last
> unloaded: scsi_wait_scan]
> [567889.008112]
> [567889.008144] Pid: 962, comm: scsi_eh_0 Tainted: G   M        2.6.39
> #1 Supermicro X8DTH-i/6/iF/6F/X8DTH
> [567889.008233] RIP: 0010:[<ffffffff81052adc>]  [<ffffffff81052adc>]
> exit_creds+0x12/0x78
> [567889.008311] RSP: 0018:ffff88042eab5b80  EFLAGS: 00010206
> [567889.008355] RAX: 0000000000000000 RBX: ffff88042f93e540 RCX:
> 00000000001225c9
> [567889.008427] RDX: 00000000000003c3 RSI: 0000000000000002 RDI:
> 0000000000000000
> [567889.008499] RBP: ffff88042f93e540 R08: 00000000001225c9 R09:
> 000000000000000a
> [567889.008572] R10: 0000000000000000 R11: ffff88042eab5b00 R12:
> 0000000000000000
> [567889.008644] R13: ffff88083e1f9450 R14: ffff88083e1f9000 R15:
> ffff88083e1f9000
> [567889.008716] FS:  0000000000000000(0000) GS:ffff88083fcc0000(0000)
> knlGS:0000000000000000
> [567889.008792] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> [567889.008836] CR2: 0000000000000000 CR3: 0000000001781000 CR4:
> 00000000000006e0
> [567889.008909] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
> 0000000000000000
> [567889.008981] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
> 0000000000000400
> [567889.009054] Process scsi_eh_0 (pid: 962, threadinfo
> ffff88042eab4000, task ffff88042f93dfa0)
> [567889.009130] Stack:
> [567889.009162]  ffff88042f93e540 ffffffff81034890 ffff88042f93e550
> ffffffff8104db08
> [567889.009245]  0000000000000282 0000000000000002 ffff88083e1f9450
> ffffffff81376306
> [567889.009327]  ffff880197e6ba00 0000000000000000 000000000000000e
> 0000000000000282
> [567889.009409] Call Trace:
> [567889.009448]  [<ffffffff81034890>] ? __put_task_struct+0x5d/0x83
> [567889.009496]  [<ffffffff8104db08>] ? kthread_stop+0x7a/0xaa
> [567889.009544]  [<ffffffff81376306>] ? _aac_reset_adapter+0x65/0x473
> [567889.009591]  [<ffffffff81377592>] ? aac_reset_adapter+0x118/0x252
> [567889.009638]  [<ffffffff813702d1>] ? aac_eh_reset+0x15e/0x185
> [567889.009685]  [<ffffffff81358c85>] ? scsi_try_host_reset+0x51/0xcc
> [567889.009732]  [<ffffffff813597cd>] ? scsi_send_eh_cmnd+0x225/0x28d
> [567889.009781]  [<ffffffff8104116c>] ? del_timer+0xb0/0xb0
> [567889.009825]  [<ffffffff8135985d>] ? scsi_eh_tur+0x28/0x78
> [567889.009869]  [<ffffffff81359fe3>] ? scsi_eh_ready_devs+0x6d0/0x7e6
> [567889.009916]  [<ffffffff8135a63c>] ? scsi_error_handler+0x39b/0x59d
> [567889.009963]  [<ffffffff8135a2a1>] ? scsi_eh_get_sense+0x1a8/0x1a8
> [567889.010009]  [<ffffffff8104d98a>] ? kthread+0x7e/0x86
> [567889.010055]  [<ffffffff8156d094>] ? kernel_thread_helper+0x4/0x10
> [567889.010102]  [<ffffffff8104d90c>] ? kthread_worker_fn+0x10d/0x10d
> [567889.010148]  [<ffffffff8156d090>] ? gs_change+0xb/0xb
> [567889.010190] Code: ff 4d 00 0f 94 c0 84 c0 74 08 48 89 ef e8 60 fd ff
> ff 31 c0 5b 5d 41 5c c3 53 48 89 fb 48 8b 87 e8 02 00 00 48 8b bf e0 02
> 00 00 <8b> 00 48 c7 83 e0 02 00 00 00 00 00 00 f0 ff 0f 0f 94 c0 84 c0
> [567889.010469] RIP  [<ffffffff81052adc>] exit_creds+0x12/0x78
> [567889.010516]  RSP <ffff88042eab5b80>
> [567889.010553] CR2: 0000000000000000
> [567889.010945] ---[ end trace e8209ec333f4963e ]---
> --


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* BUG: unable to handle kernel NULL pointer dereference at         (null)
@ 2011-07-20 15:12 TB
  2011-07-21  4:13 ` Randy Dunlap
  0 siblings, 1 reply; 22+ messages in thread
From: TB @ 2011-07-20 15:12 UTC (permalink / raw)
  To: linux-kernel

This is with kernel 2.6.39 compiled with
gcc (Debian 4.3.2-1.1) 4.3.2

Please CC me as I am not subscribed to the mailing list.

[567683.945368] aacraid: SCSI bus appears hung
[567778.804257] scsi_eh_0: page allocation failure. order: 6, mode:0x20
[567778.804262] Pid: 962, comm: scsi_eh_0 Tainted: G   M   2.6.39 #1
[567778.804265] Call Trace:
[567778.804277]  [<ffffffff8108e285>] ? __alloc_pages_nodemask+0x74f/0x7b9
[567778.804284]  [<ffffffff812f36b1>] ? __domain_mapping+0x181/0x1b7
[567778.804289]  [<ffffffff8108d249>] ? __get_free_pages+0x9/0x46
[567778.804293]  [<ffffffff812f3c78>] ? intel_alloc_coherent+0x83/0xdb
[567778.804300]  [<ffffffff8137557d>] ? aac_fib_setup+0xf8/0x227
[567778.804304]  [<ffffffff8137531d>] ? aac_init_adapter+0x7a9/0x7d7
[567778.804309]  [<ffffffff81379bc3>] ? aac_src_init+0x26b/0x3bb
[567778.804315]  [<ffffffff810bb4f6>] ? add_partial+0x11/0x57
[567778.804319]  [<ffffffff8137653f>] ? _aac_reset_adapter+0x29e/0x473
[567778.804326]  [<ffffffff81377592>] ? aac_reset_adapter+0x118/0x252
[567778.804329]  [<ffffffff813702d1>] ? aac_eh_reset+0x15e/0x185
[567778.804333]  [<ffffffff81358c85>] ? scsi_try_host_reset+0x51/0xcc
[567778.804336]  [<ffffffff81359f84>] ? scsi_eh_ready_devs+0x671/0x7e6
[567778.804339]  [<ffffffff8135a63c>] ? scsi_error_handler+0x39b/0x59d
[567778.804342]  [<ffffffff8135a2a1>] ? scsi_eh_get_sense+0x1a8/0x1a8
[567778.804347]  [<ffffffff8104d98a>] ? kthread+0x7e/0x86
[567778.804351]  [<ffffffff8156d094>] ? kernel_thread_helper+0x4/0x10
[567778.804354]  [<ffffffff8104d90c>] ? kthread_worker_fn+0x10d/0x10d
[567778.804357]  [<ffffffff8156d090>] ? gs_change+0xb/0xb
[567778.804358] Mem-Info:
[567778.804359] Node 0 DMA per-cpu:
[567778.804362] CPU    0: hi:    0, btch:   1 usd:   0
[567778.804364] CPU    1: hi:    0, btch:   1 usd:   0
[567778.804365] CPU    2: hi:    0, btch:   1 usd:   0
[567778.804367] CPU    3: hi:    0, btch:   1 usd:   0
[567778.804369] CPU    4: hi:    0, btch:   1 usd:   0
[567778.804370] CPU    5: hi:    0, btch:   1 usd:   0
[567778.804372] CPU    6: hi:    0, btch:   1 usd:   0
[567778.804374] CPU    7: hi:    0, btch:   1 usd:   0
[567778.804375] CPU    8: hi:    0, btch:   1 usd:   0
[567778.804377] CPU    9: hi:    0, btch:   1 usd:   0
[567778.804379] CPU   10: hi:    0, btch:   1 usd:   0
[567778.804380] CPU   11: hi:    0, btch:   1 usd:   0
[567778.804382] CPU   12: hi:    0, btch:   1 usd:   0
[567778.804384] CPU   13: hi:    0, btch:   1 usd:   0
[567778.804385] CPU   14: hi:    0, btch:   1 usd:   0
[567778.804387] CPU   15: hi:    0, btch:   1 usd:   0
[567778.804389] Node 0 DMA32 per-cpu:
[567778.804391] CPU    0: hi:  186, btch:  31 usd: 149
[567778.804392] CPU    1: hi:  186, btch:  31 usd:   0
[567778.804394] CPU    2: hi:  186, btch:  31 usd:   0
[567778.804396] CPU    3: hi:  186, btch:  31 usd:   0
[567778.804398] CPU    4: hi:  186, btch:  31 usd:   0
[567778.804399] CPU    5: hi:  186, btch:  31 usd:   0
[567778.804401] CPU    6: hi:  186, btch:  31 usd:   0
[567778.804403] CPU    7: hi:  186, btch:  31 usd:   0
[567778.804404] CPU    8: hi:  186, btch:  31 usd:   0
[567778.804406] CPU    9: hi:  186, btch:  31 usd:   0
[567778.804408] CPU   10: hi:  186, btch:  31 usd: 167
[567778.804410] CPU   11: hi:  186, btch:  31 usd:   0
[567778.804411] CPU   12: hi:  186, btch:  31 usd:   0
[567778.804413] CPU   13: hi:  186, btch:  31 usd:   0
[567778.804414] CPU   14: hi:  186, btch:  31 usd:   0
[567778.804416] CPU   15: hi:  186, btch:  31 usd:   0
[567778.804417] Node 0 Normal per-cpu:
[567778.804420] CPU    0: hi:  186, btch:  31 usd: 161
[567778.804421] CPU    1: hi:  186, btch:  31 usd: 104
[567778.804423] CPU    2: hi:  186, btch:  31 usd:  50
[567778.804424] CPU    3: hi:  186, btch:  31 usd:   0
[567778.804426] CPU    4: hi:  186, btch:  31 usd:   0
[567778.804428] CPU    5: hi:  186, btch:  31 usd: 183
[567778.804429] CPU    6: hi:  186, btch:  31 usd:   0
[567778.804431] CPU    7: hi:  186, btch:  31 usd:   0
[567778.804433] CPU    8: hi:  186, btch:  31 usd: 165
[567778.804435] CPU    9: hi:  186, btch:  31 usd:  42
[567778.804436] CPU   10: hi:  186, btch:  31 usd: 160
[567778.804438] CPU   11: hi:  186, btch:  31 usd:   0
[567778.804440] CPU   12: hi:  186, btch:  31 usd:   0
[567778.804441] CPU   13: hi:  186, btch:  31 usd:   5
[567778.804443] CPU   14: hi:  186, btch:  31 usd:   0
[567778.804444] CPU   15: hi:  186, btch:  31 usd:   0
[567778.804446] Node 1 Normal per-cpu:
[567778.804448] CPU    0: hi:  186, btch:  31 usd: 185
[567778.804450] CPU    1: hi:  186, btch:  31 usd: 166
[567778.804451] CPU    2: hi:  186, btch:  31 usd:  68
[567778.804453] CPU    3: hi:  186, btch:  31 usd:   1
[567778.804455] CPU    4: hi:  186, btch:  31 usd: 119
[567778.804456] CPU    5: hi:  186, btch:  31 usd:  22
[567778.804458] CPU    6: hi:  186, btch:  31 usd:  27
[567778.804460] CPU    7: hi:  186, btch:  31 usd:   0
[567778.804461] CPU    8: hi:  186, btch:  31 usd: 176
[567778.804463] CPU    9: hi:  186, btch:  31 usd:   5
[567778.804465] CPU   10: hi:  186, btch:  31 usd: 133
[567778.804466] CPU   11: hi:  186, btch:  31 usd:   0
[567778.804468] CPU   12: hi:  186, btch:  31 usd: 151
[567778.804470] CPU   13: hi:  186, btch:  31 usd: 185
[567778.804471] CPU   14: hi:  186, btch:  31 usd:  82
[567778.804473] CPU   15: hi:  186, btch:  31 usd:  34
[567778.804477] active_anon:1207894 inactive_anon:127905 isolated_anon:0
[567778.804478]  active_file:2522893 inactive_file:2504636 isolated_file:0
[567778.804479]  unevictable:41 dirty:38 writeback:0 unstable:0
[567778.804480]  free:1445271 slab_reclaimable:160878
slab_unreclaimable:240267
[567778.804481]  mapped:141123 shmem:1827 pagetables:21711 bounce:0
[567778.804483] Node 0 DMA free:15880kB min:40kB low:48kB high:60kB
active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB
unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15656kB
mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB
slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB
pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0
all_unreclaimable? yes
[567778.804493] lowmem_reserve[]: 0 2991 16121 16121
[567778.804495] Node 0 DMA32 free:319744kB min:8344kB low:10428kB
high:12516kB active_anon:389620kB inactive_anon:104492kB
active_file:849196kB inactive_file:849504kB unevictable:12kB
isolated(anon):0kB isolated(file):0kB present:3063520kB mlocked:12kB
dirty:8kB writeback:0kB mapped:16272kB shmem:76kB
slab_reclaimable:223936kB slab_unreclaimable:370680kB
kernel_stack:1760kB pagetables:516kB unstable:0kB bounce:0kB
writeback_tmp:0kB pages_scanned:245 all_unreclaimable? no
[567778.804506] lowmem_reserve[]: 0 0 13130 13130
[567778.804509] Node 0 Normal free:3333768kB min:36632kB low:45788kB
high:54948kB active_anon:2179952kB inactive_anon:218320kB
active_file:3476976kB inactive_file:3453700kB unevictable:128kB
isolated(anon):0kB isolated(file):0kB present:13445120kB mlocked:0kB
dirty:92kB writeback:0kB mapped:53932kB shmem:6664kB
slab_reclaimable:221760kB slab_unreclaimable:392212kB
kernel_stack:1320kB pagetables:45812kB unstable:0kB bounce:0kB
writeback_tmp:0kB pages_scanned:33 all_unreclaimable? no
[567778.804519] lowmem_reserve[]: 0 0 0 0
[567778.804522] Node 1 Normal free:2111692kB min:45088kB low:56360kB
high:67632kB active_anon:2262004kB inactive_anon:188808kB
active_file:5764876kB inactive_file:5715340kB unevictable:24kB
isolated(anon):0kB isolated(file):0kB present:16547840kB mlocked:192kB
dirty:52kB writeback:0kB mapped:494288kB shmem:568kB
slab_reclaimable:197816kB slab_unreclaimable:198176kB kernel_stack:944kB
pagetables:40516kB unstable:0kB bounce:0kB writeback_tmp:0kB
pages_scanned:63 all_unreclaimable? no
[567778.804532] lowmem_reserve[]: 0 0 0 0
[567778.804535] Node 0 DMA: 0*4kB 1*8kB 0*16kB 0*32kB 2*64kB 1*128kB
1*256kB 0*512kB 1*1024kB 1*2048kB 3*4096kB = 15880kB
[567778.804542] Node 0 DMA32: 9986*4kB 14264*8kB 9219*16kB 576*32kB
0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 319992kB
[567778.804548] Node 0 Normal: 458680*4kB 123961*8kB 31413*16kB 157*32kB
6*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 3334552kB
[567778.804555] Node 1 Normal: 253413*4kB 79386*8kB 28562*16kB 226*32kB
0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 2112964kB
[567778.804562] 5031610 total pagecache pages
[567778.804563] 2624 pages in swap cache
[567778.804565] Swap cache stats: add 34221223, delete 34218599, find
16354807/21177156
[567778.804567] Free swap  = 7401220kB
[567778.804568] Total swap = 7999416kB
[567778.932784] 8388592 pages RAM
[567778.932786] 119955 pages reserved
[567778.932787] 3233713 pages shared
[567778.932788] 4446427 pages non-shared
[567798.905490] aacraid: Host adapter abort request (0,0,1,0)
[567808.890221] aacraid: Host adapter abort request (0,0,1,0)
[567818.874952] aacraid: Host adapter abort request (0,0,0,0)
[567828.859673] aacraid: Host adapter abort request (0,0,0,0)
[567828.859728] aacraid: Host adapter reset request. SCSI hang ?
[567889.007644] aacraid: SCSI bus appears hung
[567889.007693] BUG: unable to handle kernel NULL pointer dereference at
          (null)
[567889.007777] IP: [<ffffffff81052adc>] exit_creds+0x12/0x78
[567889.007830] PGD 0
[567889.007866] Oops: 0000 [#1] SMP
[567889.007907] last sysfs file:
/sys/devices/pci0000:00/0000:00:1f.2/host2/target2:0:0/2:0:0:0/vendor
[567889.007986] CPU 14
[567889.007995] Modules linked in: i2c_i801 evdev i2c_core button [last
unloaded: scsi_wait_scan]
[567889.008112]
[567889.008144] Pid: 962, comm: scsi_eh_0 Tainted: G   M        2.6.39
#1 Supermicro X8DTH-i/6/iF/6F/X8DTH
[567889.008233] RIP: 0010:[<ffffffff81052adc>]  [<ffffffff81052adc>]
exit_creds+0x12/0x78
[567889.008311] RSP: 0018:ffff88042eab5b80  EFLAGS: 00010206
[567889.008355] RAX: 0000000000000000 RBX: ffff88042f93e540 RCX:
00000000001225c9
[567889.008427] RDX: 00000000000003c3 RSI: 0000000000000002 RDI:
0000000000000000
[567889.008499] RBP: ffff88042f93e540 R08: 00000000001225c9 R09:
000000000000000a
[567889.008572] R10: 0000000000000000 R11: ffff88042eab5b00 R12:
0000000000000000
[567889.008644] R13: ffff88083e1f9450 R14: ffff88083e1f9000 R15:
ffff88083e1f9000
[567889.008716] FS:  0000000000000000(0000) GS:ffff88083fcc0000(0000)
knlGS:0000000000000000
[567889.008792] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[567889.008836] CR2: 0000000000000000 CR3: 0000000001781000 CR4:
00000000000006e0
[567889.008909] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[567889.008981] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
0000000000000400
[567889.009054] Process scsi_eh_0 (pid: 962, threadinfo
ffff88042eab4000, task ffff88042f93dfa0)
[567889.009130] Stack:
[567889.009162]  ffff88042f93e540 ffffffff81034890 ffff88042f93e550
ffffffff8104db08
[567889.009245]  0000000000000282 0000000000000002 ffff88083e1f9450
ffffffff81376306
[567889.009327]  ffff880197e6ba00 0000000000000000 000000000000000e
0000000000000282
[567889.009409] Call Trace:
[567889.009448]  [<ffffffff81034890>] ? __put_task_struct+0x5d/0x83
[567889.009496]  [<ffffffff8104db08>] ? kthread_stop+0x7a/0xaa
[567889.009544]  [<ffffffff81376306>] ? _aac_reset_adapter+0x65/0x473
[567889.009591]  [<ffffffff81377592>] ? aac_reset_adapter+0x118/0x252
[567889.009638]  [<ffffffff813702d1>] ? aac_eh_reset+0x15e/0x185
[567889.009685]  [<ffffffff81358c85>] ? scsi_try_host_reset+0x51/0xcc
[567889.009732]  [<ffffffff813597cd>] ? scsi_send_eh_cmnd+0x225/0x28d
[567889.009781]  [<ffffffff8104116c>] ? del_timer+0xb0/0xb0
[567889.009825]  [<ffffffff8135985d>] ? scsi_eh_tur+0x28/0x78
[567889.009869]  [<ffffffff81359fe3>] ? scsi_eh_ready_devs+0x6d0/0x7e6
[567889.009916]  [<ffffffff8135a63c>] ? scsi_error_handler+0x39b/0x59d
[567889.009963]  [<ffffffff8135a2a1>] ? scsi_eh_get_sense+0x1a8/0x1a8
[567889.010009]  [<ffffffff8104d98a>] ? kthread+0x7e/0x86
[567889.010055]  [<ffffffff8156d094>] ? kernel_thread_helper+0x4/0x10
[567889.010102]  [<ffffffff8104d90c>] ? kthread_worker_fn+0x10d/0x10d
[567889.010148]  [<ffffffff8156d090>] ? gs_change+0xb/0xb
[567889.010190] Code: ff 4d 00 0f 94 c0 84 c0 74 08 48 89 ef e8 60 fd ff
ff 31 c0 5b 5d 41 5c c3 53 48 89 fb 48 8b 87 e8 02 00 00 48 8b bf e0 02
00 00 <8b> 00 48 c7 83 e0 02 00 00 00 00 00 00 f0 ff 0f 0f 94 c0 84 c0
[567889.010469] RIP  [<ffffffff81052adc>] exit_creds+0x12/0x78
[567889.010516]  RSP <ffff88042eab5b80>
[567889.010553] CR2: 0000000000000000
[567889.010945] ---[ end trace e8209ec333f4963e ]---

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

end of thread, other threads:[~2014-10-23  9:05 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-05 17:38 BUG: unable to handle kernel NULL pointer dereference at (null) Johannes Hirte
2011-04-05 17:42 ` Josef Bacik
2011-04-05 18:52   ` Johannes Hirte
2011-04-05 18:53     ` Josef Bacik
2011-04-05 19:21       ` Johannes Hirte
2011-04-05 19:31         ` Josef Bacik
     [not found]           ` <201104052308.53816.johannes.hirte@fem.tu-ilmenau.de>
2011-04-05 21:12             ` Josef Bacik
2011-04-05 22:00               ` Johannes Hirte
2011-04-05 21:57                 ` Josef Bacik
2011-04-06 11:10                   ` Johannes Hirte
2011-04-06 17:15                     ` Josef Bacik
2011-04-06 20:47                       ` Jordan Patterson
2011-04-06 23:42                         ` Johannes Hirte
2011-04-07 13:17                         ` Josef Bacik
     [not found]                           ` <BANLkTin1MN-QZWGvVE4o0T1_U9B1qtunig@mail.gmail.com>
2011-04-07 15:44                             ` Jordan Patterson
2011-04-07  8:28                       ` Johannes Hirte
2011-07-20 15:12 TB
2011-07-21  4:13 ` Randy Dunlap
2011-11-13 15:18 Andreas Hartmann
2013-08-11  5:53 [cpufreq] " Fengguang Wu
2013-08-12  4:59 ` Viresh Kumar
2014-10-23  6:58 Kevin Wilson
2014-10-23  9:05 ` Paul Bolle

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.