linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Luis Henriques <lhenriques@suse.de>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] filefrag: handle invalid st_dev and blksize cases
Date: Tue, 19 Jan 2021 23:44:01 -0500	[thread overview]
Message-ID: <YAe1EYzFWWxAK2I/@mit.edu> (raw)
In-Reply-To: <20201028155550.24680-1-lhenriques@suse.de>

On Wed, Oct 28, 2020 at 03:55:50PM +0000, Luis Henriques wrote:
> It is possible to crash filefrag with a "Floating point exception" in
> two different scenarios:
> 
> 1. When fstat() returns a device ID set to 0
> 2. When FIGETBSZ ioctl returns a blocksize of 0
> 
> In both scenarios a divide-by-zero will occur in frag_report() because
> variable blksize will be set to zero.
> 
> I've managed to trigger this crash with an old CephFS kernel client,
> using xfstest generic/519.  The first scenario has been fixed by kernel
> commit 75c9627efb72 ("ceph: map snapid to anonymous bdev ID").  The
> second scenario is also fixed with commit 8f97d1e99149 ("vfs: fix
> FIGETBSZ ioctl on an overlayfs file").
> 
> However, it is desirable to handle these two scenarios gracefully by
> checking these conditions explicitly.
> 
> Signed-off-by: Luis Henriques <lhenriques@suse.de>

Thanks, applied.

					- Ted

      reply	other threads:[~2021-01-20  4:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28 15:55 [PATCH] filefrag: handle invalid st_dev and blksize cases Luis Henriques
2021-01-20  4:44 ` Theodore Ts'o [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=YAe1EYzFWWxAK2I/@mit.edu \
    --to=tytso@mit.edu \
    --cc=lhenriques@suse.de \
    --cc=linux-ext4@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).