From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Sasha Levin <sasha.levin@oracle.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/memory: print also a_ops->readpage in print_bad_pte
Date: Fri, 3 Apr 2015 20:33:12 +0300 [thread overview]
Message-ID: <20150403173312.GA29118@node.dhcp.inet.fi> (raw)
In-Reply-To: <20150403171818.22742.92919.stgit@buzz>
On Fri, Apr 03, 2015 at 08:18:18PM +0300, Konstantin Khlebnikov wrote:
> A lot of filesystems use generic_file_mmap() and filemap_fault(),
> f_op->mmap and vm_ops->fault aren't enough to identify filesystem.
>
> This prints file name, vm_ops->fault, f_op->mmap and a_ops->readpage
> (which is almost always implemented and filesystem-specific).
>
> Example:
>
> [ 23.676410] BUG: Bad page map in process sh pte:1b7e6025 pmd:19bbd067
> [ 23.676887] page:ffffea00006df980 count:4 mapcount:1 mapping:ffff8800196426c0 index:0x97
> [ 23.677481] flags: 0x10000000000000c(referenced|uptodate)
> [ 23.677896] page dumped because: bad pte
> [ 23.678205] addr:00007f52fcb17000 vm_flags:00000075 anon_vma: (null) mapping:ffff8800196426c0 index:97
> [ 23.678922] file:libc-2.19.so fault:filemap_fault mmap:generic_file_readonly_mmap readpage:v9fs_vfs_readpage
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> ---
> mm/memory.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/mm/memory.c b/mm/memory.c
> index 411144f977b1..ea868eea0c88 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -690,12 +690,12 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
> /*
> * Choose text because data symbols depend on CONFIG_KALLSYMS_ALL=y
> */
> - if (vma->vm_ops)
> - printk(KERN_ALERT "vma->vm_ops->fault: %pSR\n",
> - vma->vm_ops->fault);
> - if (vma->vm_file)
> - printk(KERN_ALERT "vma->vm_file->f_op->mmap: %pSR\n",
> - vma->vm_file->f_op->mmap);
> + printk(KERN_ALERT
pr_alert() ?
Otherwise,
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
It would be nice to patch dump_vma() to display this information too.
> + "file:%pD fault:%pf mmap:%pf readpage:%pf\n",
> + vma->vm_file,
> + vma->vm_ops ? vma->vm_ops->fault : NULL,
> + vma->vm_file ? vma->vm_file->f_op->mmap : NULL,
> + mapping ? mapping->a_ops->readpage : NULL);
> dump_stack();
> add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Kirill A. Shutemov
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-04-03 17:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 17:18 Konstantin Khlebnikov
2015-04-03 17:33 ` Kirill A. Shutemov [this message]
2015-04-03 22:10 ` Andrew Morton
2015-04-04 0:47 ` Konstantin Khlebnikov
2015-04-04 1:35 ` Andrew Morton
2015-04-04 17:02 ` Konstantin Khlebnikov
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=20150403173312.GA29118@node.dhcp.inet.fi \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sasha.levin@oracle.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