From: Andrew Morton <andrewm@uow.edu.au>
To: Mike Galbraith <mikeg@wen-online.de>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [testcase] madvise->semaphore deadlock 2.4.0
Date: Tue, 09 Jan 2001 23:15:48 +1100 [thread overview]
Message-ID: <3A5B00F4.55FB83FE@uow.edu.au> (raw)
In-Reply-To: <Pine.Linu.4.10.10101091113020.2510-100000@mikeg.weiden.de>
Mike Galbraith wrote:
>
> Greetings,
>
> While trying to configure ftpsearch, the process hangs while running
> it's madvise confidence test below. It appears to be taking a fault
> in madvise_fixup_middle():atomic_add(2, &vma->vm_file->f_count) and
> immediately deadlocking forever on mm->mmap_sem per IKD. (Virgin 2.4.0
> agrees)
>
This should fix it.
We're still in disagreement with the HPUX 11 manpage though.
HP say that MADV_DONTNEED requires an underlying file,
and thus implies that MADV_WILLNEED doesn't need an
underlying file. We have it the other way round, which
seems more sensible.
--- linux-2.4.0/mm/filemap.c Fri Jan 5 21:37:20 2001
+++ linux-akpm/mm/filemap.c Tue Jan 9 23:05:00 2001
@@ -1835,7 +1835,8 @@
n->vm_end = end;
setup_read_behavior(n, behavior);
n->vm_raend = 0;
- get_file(n->vm_file);
+ if (n->vm_file)
+ get_file(n->vm_file);
if (n->vm_ops && n->vm_ops->open)
n->vm_ops->open(n);
lock_vma_mappings(vma);
@@ -1861,7 +1862,8 @@
n->vm_pgoff += (n->vm_start - vma->vm_start) >> PAGE_SHIFT;
setup_read_behavior(n, behavior);
n->vm_raend = 0;
- get_file(n->vm_file);
+ if (n->vm_file)
+ get_file(n->vm_file);
if (n->vm_ops && n->vm_ops->open)
n->vm_ops->open(n);
lock_vma_mappings(vma);
@@ -1893,7 +1895,8 @@
right->vm_pgoff += (right->vm_start - left->vm_start) >> PAGE_SHIFT;
left->vm_raend = 0;
right->vm_raend = 0;
- atomic_add(2, &vma->vm_file->f_count);
+ if (vma->vm_file)
+ atomic_add(2, &vma->vm_file->f_count);
if (vma->vm_ops && vma->vm_ops->open) {
vma->vm_ops->open(left);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-09 12:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-09 10:32 Mike Galbraith
2001-01-09 12:15 ` Andrew Morton [this message]
2001-01-09 13:29 ` Mike Galbraith
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=3A5B00F4.55FB83FE@uow.edu.au \
--to=andrewm@uow.edu.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mikeg@wen-online.de \
/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
all inboxes | Powered by JetHome®