mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: xfs-masters@oss.sgi.com,
	Andrew Morton <akpm@linux-foundation.org>,
	David Chinner <dgc@sgi.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [xfs-masters] Re: 2.6.22-rc1-mm1
Date: Thu, 17 May 2007 22:05:11 +0200	[thread overview]
Message-ID: <464CB577.5080106@googlemail.com> (raw)
In-Reply-To: <20070517084135.GA8510@lst.de>

Hi Christoph,

Christoph Hellwig napisał(a):
> On Thu, May 17, 2007 at 12:06:00PM +1000, David Chinner wrote:
>>> static inline int put_page_testzero(struct page *page)
>>> {
>>> 	VM_BUG_ON(atomic_read(&page->_count) == 0);
>>> 	return atomic_dec_and_test(&page->_count);
>>> }
>> I haven't seen that one. I expect that it will be the noaddr buffer allocation
>> changes that have triggered this...
> 
> Yes.   xfs_buf_get_noaddr calls xfs_buf_free to free a buffer when
> something fails.  But this is wrong - we want to call xfs_buf_deallocate
> before we setup the page list, and if a page allocation fails we want to
> do out own freeing of just the pages we allocated and call
> _xfs_buf_free_pages.  Currently we do our own freeing _and_ call
> xfs_buf_free which leads to this double free.
> 
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> 
> Index: linux-2.6/fs/xfs/linux-2.6/xfs_buf.c
> ===================================================================
> --- linux-2.6.orig/fs/xfs/linux-2.6/xfs_buf.c	2007-05-17 09:34:44.000000000 +0200
> +++ linux-2.6/fs/xfs/linux-2.6/xfs_buf.c	2007-05-17 09:36:53.000000000 +0200
> @@ -792,8 +792,9 @@ xfs_buf_get_noaddr(
>   fail_free_mem:
>   	while (--i >= 0)
>  		__free_page(bp->b_pages[i]);
> +	_xfs_buf_free_pages(bp);
>   fail_free_buf:
> -	xfs_buf_free(bp);
> +	xfs_buf_deallocate(bp);
>   fail:
>  	return NULL;
>  }

I applied your patch and I get another oops

[  261.491499] XFS mounting filesystem loop0
[  261.501641] Ending clean XFS mount for filesystem: loop0
[  261.507698] SELinux: initialized (dev loop0, type xfs), uses xattr
[  261.567441] XFS mounting filesystem loop0
[  261.573931] allocation failed: out of vmalloc space - use vmalloc=<size> to increase size.
[  261.582935] xfs_buf_get_noaddr: failed to map pages
[  261.592478] Ending clean XFS mount for filesystem: loop0
[  261.618543] SELinux: initialized (dev loop0, type xfs), uses xattr
[  261.691563] XFS mounting filesystem loop0
[  261.698927] allocation failed: out of vmalloc space - use vmalloc=<size> to increase size.
                                  ^^^^^^^^^^^^^^^^^^^^
                                  interesting

[  261.724829] xfs_buf_get_noaddr: failed to map pages
[  261.734049] Ending clean XFS mount for filesystem: loop0
[  261.741069] SELinux: initialized (dev loop0, type xfs), uses xattr
[  261.978728] XFS mounting filesystem loop0
[  262.205863] xfs_buf_get_noaddr: failed to map pages
[  262.212523] Ending clean XFS mount for filesystem: loop0
[  262.218084] SELinux: initialized (dev loop0, type xfs), uses xattr
[..]
[  265.842566] xfs_buf_get_noaddr: failed to map pages
[  265.848267] xfs_buf_get_noaddr: failed to map pages
[  265.856480] Ending clean XFS mount for filesystem: loop0
[  265.862260] SELinux: initialized (dev loop0, type xfs), uses xattr
[  265.921288] XFS mounting filesystem loop0
[  265.927123] xfs_buf_get_noaddr: failed to map pages
[  265.932575] BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000
[  265.942886]  printing eip:
[  265.945665] fdc8e82a
[  265.948818] *pde = 00000000
[  265.952378] Oops: 0002 [#1]
[  265.955241] PREEMPT SMP 
[  265.957868] Modules linked in: xfs loop ipt_MASQUERADE iptable_nat nf_nat autofs4 af_packet nf_conntrack_netbios_ns ipt_REJECT nf_conntrack_ipv4 xt_state nf_conntrack nfnetlink iptable_filter ip_tables ip6t_REJECT xt_tcpudp ip6table_filter ip6_tables x_tables ipv6 binfmt_misc thermal processor fan container nvram snd_intel8x0 snd_ac97_codec ac97_bus snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm evdev intel_agp agpgart snd_timer snd soundcore snd_page_alloc i2c_i801 ide_cd cdrom rtc unix
[  266.007064] CPU:    0
[  266.007065] EIP:    0060:[<fdc8e82a>]    Not tainted VLI
[  266.007066] EFLAGS: 00010246   (2.6.22-rc1-mm1 #5)
[  266.019641] EIP is at xfs_buf_cond_lock+0x8/0x1f [xfs]
[  266.024853] eax: 00000000   ebx: ce3e9100   ecx: 00000000   edx: 00000001
[  266.031768] esi: ccf8b628   edi: ccf8b5d8   ebp: d04beb20   esp: d04beb20
[  266.038692] ds: 007b   es: 007b   fs: 00d8  gs: 0033  ss: 0068
[  266.044615] Process mount (pid: 7206, ti=d04be000 task=cdcb74f0 task.ti=d04be000)
[  266.052090] Stack: d04beb60 fdc75a12 00000005 fdc99174 00080020 00000000 ccf72c70 c992e5b0 
[  266.060680]        ccf8b6f0 00000007 c0875244 00000000 d04beb70 00080020 00000000 c992e5b0 
[  266.069247]        d04beb90 fdc75cd1 00080020 00000000 00002580 fdc8ccda c992e5f0 c992e5b0 
[  266.077866] Call Trace:
[  266.080611]  [<fdc75a12>] xlog_alloc_log+0x1b9/0x2cd [xfs]
[  266.086286]  [<fdc75cd1>] xfs_log_mount+0x6b/0xf1 [xfs]
[  266.091688]  [<fdc7ec47>] xfs_mountfs+0x959/0xc4a [xfs]
[  266.097097]  [<fdc714f6>] xfs_ioinit+0x26/0x2c [xfs]
[  266.102240]  [<fdc85692>] xfs_mount+0x2e5/0x358 [xfs]
[  266.107474]  [<fdc95b72>] vfs_mount+0x1a/0x1e [xfs]
[  266.112563]  [<fdc95a2c>] xfs_fs_fill_super+0x76/0x1a2 [xfs]
[  266.118433]  [<c0185987>] get_sb_bdev+0x105/0x143
[  266.123260]  [<fdc94d63>] xfs_fs_get_sb+0x21/0x27 [xfs]
[  266.128709]  [<c0185509>] vfs_kern_mount+0x81/0xf1
[  266.133589]  [<c0199b59>] do_mount+0x716/0x80d
[  266.138145]  [<c0199cd0>] sys_mount+0x80/0xb5
[  266.142595]  [<c01041d0>] syscall_call+0x7/0xb
[  266.147170]  [<b7fe6410>] 0xb7fe6410
[  266.150822]  =======================
[  266.154445] INFO: lockdep is turned off.
[  266.158411] Code: be 20 00 00 00 89 f2 29 c2 83 c8 ff 88 d1 d3 e0 29 de 89 f1 d3 e8 5b 5e 5d c3 55 89 e5 90 ff 40 7c 5d c3 55 89 e5 89 c1 31 c0 90 <ff> 09 79 07 8d 01 e8 d7 17 6c c2 83 f8 01 19 c0 f7 d0 83 e0 f0 
[  266.178534] EIP: [<fdc8e82a>] xfs_buf_cond_lock+0x8/0x1f [xfs] SS:ESP 0068:d04beb20
[  266.347522] XFS: Filesystem loop1 has duplicate UUID - can't mount
[  266.415823] XFS: Filesystem loop1 has duplicate UUID - can't mount
[  266.477997] XFS: Filesystem loop1 has duplicate UUID - can't mount
[  266.541940] XFS: Filesystem loop1 has duplicate UUID - can't mount

http://www.stardust.webpages.pl/files/tbf/bitis-gabonica/2.6.22-rc1-mm1/mm-dmesg3
http://www.stardust.webpages.pl/files/tbf/bitis-gabonica/2.6.22-rc1-mm1/mm-config

Regards,
Michal

-- 
Michal K. K. Piotrowski
Kernel Monkeys
(http://kernel.wikidot.com/start)

  reply	other threads:[~2007-05-17 20:05 UTC|newest]

Thread overview: 143+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16  3:19 2.6.22-rc1-mm1 Andrew Morton
2007-05-16  6:06 ` 2.6.22-rc1-mm1 KAMEZAWA Hiroyuki
2007-05-16  7:58   ` 2.6.22-rc1-mm1 Jeff Garzik
2007-05-16  8:04     ` 2.6.22-rc1-mm1 Andrew Morton
2007-05-16 15:33       ` 2.6.22-rc1-mm1 Jeff Garzik
2007-05-16 20:24       ` 2.6.22-rc1-mm1 Darrick J. Wong
2007-05-16 16:54   ` 2.6.22-rc1-mm1 Randy Dunlap
2007-05-16  7:57 ` 2.6.22-rc1-mm1 - s390 vs. md Cornelia Huck
2007-05-16 17:21   ` Williams, Dan J
2007-05-16 10:18 ` 2.6.22-rc1-mm1 Andy Whitcroft
2007-05-16 15:16   ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-16 17:40     ` 2.6.22-rc1-mm1 Mel Gorman
2007-05-16 17:55       ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-16 18:18         ` 2.6.22-rc1-mm1 Andy Whitcroft
2007-05-16 18:00       ` 2.6.22-rc1-mm1 Andrew Morton
2007-05-16 23:32       ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-16 23:36       ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-17  9:35         ` 2.6.22-rc1-mm1 Mel Gorman
2007-05-29 22:34           ` 2.6.22-rc1-mm1 Andy Whitcroft
2007-06-01  9:50             ` 2.6.22-rc1-mm1 Andy Whitcroft
2007-06-01 23:12               ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-06-05 18:38                 ` 2.6.22-rc1-mm1 Andy Whitcroft
2007-06-05 22:57                   ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-06-07  9:49                     ` 2.6.22-rc1-mm1 Andy Whitcroft
2007-06-11 13:58                       ` 2.6.22-rc1-mm1 Andy Whitcroft
     [not found]                         ` <63a08cc7547f14065becdf9a94d0d529@pinky>
2007-06-11 16:15                           ` [PATCH] move the kernel to 16MB for NUMA-Q Andrew Morton
2007-06-11 17:20                             ` Dave Jones
2007-06-11 17:36                               ` H. Peter Anvin
2007-06-11 18:19                                 ` Jan Engelhardt
2007-06-11 18:46                                   ` Dave Jones
2007-06-11 19:17                                     ` Alan Cox
2007-06-11 20:07                                     ` Rene Herman
2007-06-11 20:21                                       ` Rene Herman
2007-06-11 19:01                                   ` H. Peter Anvin
2007-06-11 20:44                                     ` Jan Engelhardt
2007-06-11 20:51                                       ` H. Peter Anvin
2007-06-15 11:12                                         ` Jan Engelhardt
2007-06-11 17:49                               ` Rene Herman
2007-06-11 17:58                                 ` H. Peter Anvin
2007-06-11 18:01                                   ` Rene Herman
2007-05-17  4:16     ` 2.6.22-rc1-mm1 Bharata B Rao
2007-05-18  8:54     ` 2.6.22-rc1-mm1 young dave
2007-05-18 10:07       ` 2.6.22-rc1-mm1 young dave
2007-05-18 16:54         ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-18 16:59           ` 2.6.22-rc1-mm1 Mel Gorman
2007-05-21  0:53           ` 2.6.22-rc1-mm1 young dave
2007-05-21  4:49             ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-21  5:00               ` 2.6.22-rc1-mm1 young dave
2007-05-21  5:03                 ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-21  5:39                   ` 2.6.22-rc1-mm1 young dave
     [not found]                     ` <465138CC.3060605@zytor.com>
2007-05-21  8:41                       ` 2.6.22-rc1-mm1 young dave
2007-05-21 16:35                         ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-22  2:14                           ` 2.6.22-rc1-mm1 young dave
     [not found]                             ` <465319C1.2080206@zytor.com>
2007-05-23  1:15                               ` 2.6.22-rc1-mm1 young dave
2007-05-16 12:10 ` (NFS) BUG: at page-writeback.c:829 [Was: 2.6.22-rc1-mm1] Jiri Slaby
2007-05-16 12:39   ` Nick Piggin
2007-05-16 12:44     ` Jiri Slaby
2007-05-16 12:47       ` Nick Piggin
2007-05-16 13:00     ` Trond Myklebust
2007-05-16 13:06       ` Nick Piggin
2007-05-16 12:52   ` Trond Myklebust
2007-05-16 14:30 ` 2.6.22-rc1-mm1 Michal Piotrowski
2007-05-16 14:37   ` 2.6.22-rc1-mm1 Nick Piggin
     [not found]     ` <6bffcb0e0705160935r1767a764hce72f24f9eee6c1e@mail.gmail.com>
2007-05-16 16:58       ` 2.6.22-rc1-mm1 Jiri Slaby
2007-05-16 15:34   ` 2.6.22-rc1-mm1 Gabriel C
2007-05-16 16:24 ` 2.6.22-rc1-mm1 Michal Piotrowski
2007-05-16 16:41   ` 2.6.22-rc1-mm1 Andrew Morton
2007-05-17  2:06     ` 2.6.22-rc1-mm1 David Chinner
2007-05-17  8:41       ` [xfs-masters] 2.6.22-rc1-mm1 Christoph Hellwig
2007-05-17 20:05         ` Michal Piotrowski [this message]
2007-05-18  2:11           ` David Chinner
2007-05-21 10:11             ` David Chinner
2007-05-21 10:23               ` Christoph Hellwig
2007-05-22 10:44                 ` David Chinner
2007-05-22 11:42                   ` Christoph Hellwig
2007-05-22 23:23                   ` Nathan Scott
2007-05-22 14:45               ` Michal Piotrowski
2007-05-16 16:50 ` 2.6.22-rc1-mm1 Randy Dunlap
2007-05-16 17:00   ` 2.6.22-rc1-mm1 Richard Purdie
2007-05-16 17:06     ` 2.6.22-rc1-mm1 Andrew Morton
2007-05-16 19:55       ` 2.6.22-rc1-mm1 Richard Purdie
2007-05-16 20:00       ` 2.6.22-rc1-mm1 Richard Purdie
2007-05-18 17:34         ` 2.6.22-rc1-mm1 Edward Shishkin
2007-05-16 17:37 ` 2.6.22-rc1-mm1 [cannot change thermal trip points] Maciej Rutecki
2007-05-16 17:47   ` Chuck Ebbert
2007-05-16 18:10     ` Goulven Guillard
2007-05-17  9:23     ` Pavel Machek
2007-05-17 13:36       ` Maciej Rutecki
2007-05-17 19:08         ` Len Brown
2007-05-17 20:09           ` Maciej Rutecki
2007-05-17 20:42             ` Maciej Rutecki
2007-05-17 21:53           ` Pavel Machek
2007-05-17 22:42             ` Len Brown
2007-05-21 12:11               ` Pavel Machek
2007-06-01  2:46                 ` Len Brown
2007-06-04 11:16                   ` Pavel Machek
2007-05-17 19:17       ` Len Brown
2007-05-17 21:52         ` Pavel Machek
2007-05-17 22:35           ` Len Brown
2007-06-04  9:02             ` Stefan Seyfried
2007-06-04 11:06               ` Pavel Machek
2007-05-19 19:56         ` Thomas Renninger
2007-05-21  3:50           ` Len Brown
2007-05-21 11:31             ` Thomas Renninger
2007-05-21 12:10             ` Pavel Machek
2007-05-21 13:27               ` Matthew Garrett
2007-05-21 13:29                 ` Pavel Machek
2007-05-21 13:36                   ` Matthew Garrett
2007-05-21 13:40                     ` Pavel Machek
2007-05-21 13:45                       ` Matthew Garrett
2007-05-21 22:42                         ` Pavel Machek
2007-05-22  0:31                           ` Matthew Garrett
2007-05-22  9:06                             ` Pavel Machek
2007-05-22  9:16                               ` Matthew Garrett
2007-05-22  9:28                                 ` Goulven Guillard
2007-05-22 10:05                                 ` Maciej Rutecki
2007-06-04  9:13                               ` Stefan Seyfried
2007-05-24 14:16                             ` 2.6.22-rc1-mm1 Implementing fan/thermal control in userspace - Was: " Thomas Renninger
2007-05-24 14:36                               ` Matthew Garrett
2007-05-24 18:18                                 ` Thomas Renninger
2007-05-25  6:38                                 ` Pavel Machek
2007-05-27 21:51                                   ` Matthew Garrett
2007-05-28 10:58                                     ` Pavel Machek
2007-05-28 12:50                                       ` Matthew Garrett
2007-05-28 12:53                                         ` Pavel Machek
2007-05-16 18:55 ` 2.6.22-rc1-mm1: IDE compile error Adrian Bunk
2007-05-23 23:45   ` Bartlomiej Zolnierkiewicz
2007-05-24 10:55     ` Alan Cox
2007-05-24 18:53       ` H. Peter Anvin
2007-05-25  0:05       ` H. Peter Anvin
2007-05-25  0:14         ` Alan Cox
2007-05-25  0:18           ` H. Peter Anvin
2007-05-25  0:38             ` Alan Cox
2007-05-25  0:51               ` H. Peter Anvin
2007-05-25 14:19                 ` Alan Cox
2007-05-17 12:38 ` 2.6.22-rc1-mm1 - Call trace in slub_def.h Reuben Farrelly
2007-05-17 12:52   ` Satyam Sharma
2007-05-20 10:12 ` 2.6.22-rc1-mm1 Mariusz Kozlowski
2007-05-20 10:21   ` 2.6.22-rc1-mm1 Sam Ravnborg
2007-05-20 15:33     ` 2.6.22-rc1-mm1 Kumar Gala
2007-05-22  7:25 ` 2.6.22-rc1-mm1: evm BUG when reading sysfs file Joseph Fannin
2007-05-22 21:23   ` Andrew Morton
2007-05-25 21:05     ` Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=464CB577.5080106@googlemail.com \
    --to=michal.k.k.piotrowski@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dgc@sgi.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xfs-masters@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome