public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: check: Sanitize the return value for qgroup error
Date: Wed, 1 Apr 2020 19:57:08 +0200	[thread overview]
Message-ID: <20200401175708.GX5920@twin.jikos.cz> (raw)
In-Reply-To: <20200330070159.50077-1-wqu@suse.com>

On Mon, Mar 30, 2020 at 03:01:59PM +0800, Qu Wenruo wrote:
> [BUG]
> btrfs check can return strange return value for shell:
>  [Inferior 1 (process 48641) exited with code 0213]
> 					      ^^^^
> 
> [CAUSE]
> It's caused by the incorrect handling of qgroup error.
> 
> qgroup_report_ret can be -117 (-EUCLEAN), using that value with exit()
> can cause overflow, causing return value not properly recognized.
> 
> [FIX]
> Fix it by sanitize the return value to 0 or 1.
> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>

Added to devel, thanks.

      parent reply	other threads:[~2020-04-01 17:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30  7:01 [PATCH] btrfs-progs: check: Sanitize the return value for qgroup error Qu Wenruo
2020-03-30  9:15 ` Nikolay Borisov
2020-04-01 17:57 ` David Sterba [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=20200401175708.GX5920@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.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