Re: BUG: unable to handle kernel paging request

Anca Emanuel
2011-03-27T17:44:17Z

On Sun, Mar 27, 2011 at 7:00 PM, Américo Wang <xiyou.wangcong@gmail.com> wrote:
> Exactly... should be fixed by something like:
>
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index 7c708a4..6b82632 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -90,7 +90,7 @@ static void pad_len_spaces(struct seq_file *m, int len)
>
>  static void vma_stop(struct proc_maps_private *priv, struct
> vm_area_struct *vma)
>  {
> -       if (vma && vma != priv->tail_vma) {
> +       if (vma && !IS_ERR(vma) && vma != priv->tail_vma) {
>                struct mm_struct *mm = vma->vm_mm;
>                up_read(&mm->mmap_sem);
>                mmput(mm);
>

I tested the patch and works ok now. Thanks Américo Wang !
Without it, I can reproduce the bug.