Re: [PATCH v2 5/6] mm: Print the inode number in dump_page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/9/20 10:21 PM, Matthew Wilcox (Oracle) wrote:
> The inode number helps correlate this page with debug messages elsewhere
> in the kernel.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
> ---
>  mm/debug.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/debug.c b/mm/debug.c
> index fb64ff7454b6..60347d0d7609 100644
> --- a/mm/debug.c
> +++ b/mm/debug.c
> @@ -137,7 +137,7 @@ void __dump_page(struct page *page, const char *reason)
>  		}
>  
>  		if (!dentry_first) {
> -			pr_warn("aops:%ps\n", a_ops);
> +			pr_warn("aops:%ps ino:%lx\n", a_ops, host->i_ino);

Hmm it's a bit subtle that we assume reading host->i_ino is safe because we
passed the get_kernel_nofault() for &host->i_dentry.first. Maybe worth a comment?

>  			goto out_mapping;
>  		}
>  
> @@ -151,8 +151,8 @@ void __dump_page(struct page *page, const char *reason)

Would it be worth printing the inode number also here in the 'pr_warn("aops:%ps
with invalid dentry %px\n"' case?

>  			 * crash, but it's unlikely that we reach here with a
>  			 * corrupted struct page
>  			 */
> -			pr_warn("aops:%ps dentry name:\"%pd\"\n", a_ops,
> -					&dentry);
> +			pr_warn("aops:%ps ino:%lx dentry name:\"%pd\"\n",
> +					a_ops, host->i_ino, &dentry);
>  		}
>  	}
>  out_mapping:
> 





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux