public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Mark Tinguely <tinguely@sgi.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 9/9] xfsdump: fix uninit ackstr in content_mediachange_query()
Date: Thu, 13 Nov 2014 13:23:19 -0600	[thread overview]
Message-ID: <54650527.1@redhat.com> (raw)
In-Reply-To: <5464F3F9.10305@sgi.com>

On 11/13/14 12:10 PM, Mark Tinguely wrote:
> On 11/12/14 12:57, Eric Sandeen wrote:
>> Today, this sends an uninitialized ackstr[0] to be mlog'd -
>> who knows what we get out of it.  Other places follow this
>> "count = 0, string = "\n"" pattern which seemsa bit odd, but
>> better than printing uninitialized memory.
>>
>> To be completely honest, I have no test for this.
>>
>> Signed-off-by: Eric Sandeen<sandeen@redhat.com>
>> ---
>>   restore/content.c |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/restore/content.c b/restore/content.c
>> index c99aed7..bc5b398 100644
>> --- a/restore/content.c
>> +++ b/restore/content.c
>> @@ -2915,6 +2915,7 @@ content_mediachange_query( void )
>>               bagp = 0;
>>           }
>>           ackcnt = 0;
>> +        ackstr[ ackcnt++ ] = "\n";
>>           dlog_multi_ack( ackstr,
>>                   ackcnt );
>>           querycnt = 0;
> 
> dlog_multi_ack() with count of 0 will exit without doing anything.

Oh, yeah, I misread it.  Sorry.  I saw stuff like this in sigint_dialog()

                ackcnt = 0;
                ackstr[ ackcnt++ ] = "\n";
                dlog_multi_ack( ackstr,
                                ackcnt );


and got carried away.

> Looks like some conditional code that filled the ackstr array (like
> the other callers) was removed. I vote to pull ackstr, ackcnt and the
> dlog_multi_ack() from this function.

I wondered about that, but didn't want to go changing things I wasn't
able to test or trivially understand.

However, I guess I'm challenged even in the latter this week.  ;)

Anyway, yeah, just drop this patch, sorry.

Thanks for the review,
-Eric


> --Mark.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2014-11-13 19:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 18:57 [PATCH 0/9] Random xfsdump fixes Eric Sandeen
2014-11-12 18:57 ` [PATCH 1/9] xfsdump: don't try to close fd from failed open Eric Sandeen
2014-11-12 18:57 ` [PATCH 2/9] xfsdump: Fix overflow of "question" string in Media_prompt_erase() Eric Sandeen
2014-11-12 18:58   ` Christoph Hellwig
2014-11-12 19:05   ` [PATCH 2/9 V2] " Eric Sandeen
2014-11-13 17:38     ` Christoph Hellwig
2014-11-13 18:00       ` Eric Sandeen
2014-11-12 18:57 ` [PATCH 3/9] xfsdump: fix wrong test for hard stack limit change failure Eric Sandeen
2014-11-12 18:57 ` [PATCH 4/9] xfsdump: remove pointless if (dirty); Eric Sandeen
2014-11-13 17:35   ` Mark Tinguely
2014-11-13 17:47     ` Eric Sandeen
2014-11-13 19:02       ` Mark Tinguely
2014-11-12 18:57 ` [PATCH 5/9] xfsdump: remove some unreachable code Eric Sandeen
2014-11-12 18:57 ` [PATCH 6/9] xfsdump: free suboptstrs if mlog_init1 fails Eric Sandeen
2014-11-12 18:57 ` [PATCH 7/9] xfsdump: free allocated persistent paths Eric Sandeen
2014-11-12 18:57 ` [PATCH 8/9] xfsdump: children[] is an array of child pointers, not of child structures Eric Sandeen
2014-11-12 18:57 ` [PATCH 9/9] xfsdump: fix uninit ackstr in content_mediachange_query() Eric Sandeen
2014-11-13 18:10   ` Mark Tinguely
2014-11-13 19:23     ` Eric Sandeen [this message]

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=54650527.1@redhat.com \
    --to=sandeen@redhat.com \
    --cc=tinguely@sgi.com \
    --cc=xfs@oss.sgi.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