lkml.org 
[lkml]   [2018]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kmemleak: Add option to print warnings to dmesg
On Fri, Aug 24, 2018 at 02:40:11PM +0200, Vincent Whitchurch wrote:
> diff --git a/mm/kmemleak.c b/mm/kmemleak.c
> index 9a085d525bbc..61ba47a357fc 100644
> --- a/mm/kmemleak.c
> +++ b/mm/kmemleak.c
> @@ -311,6 +311,9 @@ static void hex_dump_object(struct seq_file *seq,
> const u8 *ptr = (const u8 *)object->pointer;
> size_t len;
>
> + if (!seq)
> + return;
> +
> /* limit the number of lines to HEX_MAX_LINES */
> len = min_t(size_t, object->size, HEX_MAX_LINES * HEX_ROW_SIZE);
>

We have a print_hex_dump() function you could use here instead of
skipping it. Sometimes such information is useful to capture part of the
object state.

--
Catalin

\
 
 \ /
  Last update: 2018-08-24 14:58    [W:0.032 / U:1.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site