All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@redhat.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>,
	Josef Bacik <josef@redhat.com>
Subject: Re: [PATCH] fix oops in ext4_mb_release_group_pa tracing
Date: Thu, 19 Aug 2010 14:02:25 -0400	[thread overview]
Message-ID: <20100819180225.GB2487@localhost.localdomain> (raw)
In-Reply-To: <4C6D7116.2080905@redhat.com>

On Thu, Aug 19, 2010 at 12:59:50PM -0500, Eric Sandeen wrote:
> Our QA reported an oops in the ext4_mb_release_group_pa tracing,
> and Josef Bacik pointed out that it was because we may have a
> non-null but uninitialized ac_inode in the allocation context.
> 
> I can reproduce it when running xfstests with ext4 tracepoints on, 
> on a CONFIG_SLAB_DEBUG kernel.
> 
> We call trace_ext4_mb_release_group_pa from 2 places, 
> ext4_mb_discard_group_preallocations and 
> ext4_mb_discard_lg_preallocations
> 
> In both cases we allocate an ac as a container just for tracing (!)
> and never fill in the ac_inode.  There's no reason to be assigning,
> testing, or printing it as far as I can see, so just remove it from
> the tracepoint.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
> index 01e9e00..e352c77 100644
> --- a/include/trace/events/ext4.h
> +++ b/include/trace/events/ext4.h
> @@ -432,7 +432,6 @@ TRACE_EVENT(ext4_mb_release_group_pa,
>  
>  	TP_STRUCT__entry(
>  		__field(	dev_t,	dev			)
> -		__field(	ino_t,	ino			)
>  		__field(	__u64,	pa_pstart		)
>  		__field(	__u32,	pa_len			)
>  
> @@ -440,8 +439,6 @@ TRACE_EVENT(ext4_mb_release_group_pa,
>  
>  	TP_fast_assign(
>  		__entry->dev		= sb->s_dev;
> -		__entry->ino		= (ac && ac->ac_inode) ?
> -						ac->ac_inode->i_ino : 0;
>  		__entry->pa_pstart	= pa->pa_pstart;
>  		__entry->pa_len		= pa->pa_len;
>  	),
> 

Reviewed-by: Josef Bacik <josef@redhat.com>

Thanks,

Josef

  reply	other threads:[~2010-08-19 18:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19 17:59 [PATCH] fix oops in ext4_mb_release_group_pa tracing Eric Sandeen
2010-08-19 18:02 ` Josef Bacik [this message]
2010-10-07 16:45 ` Eric Sandeen
2010-10-07 16:47 ` Eric Sandeen
2010-10-09 22:26 ` Ted Ts'o

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=20100819180225.GB2487@localhost.localdomain \
    --to=josef@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.