From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [bug report] GFS2: Withdraw for IO errors writing to the journal or statfs
Date: Thu, 24 Aug 2017 13:23:31 +0100 [thread overview]
Message-ID: <20170824122330.GA16546@cicero> (raw)
In-Reply-To: <20170824110357.b3t7z2wcnl7doeyt@mwanda>
On Thu, Aug 24, 2017 at 02:03:57PM +0300, Dan Carpenter wrote:
> Hello Bob Peterson,
>
> The patch 9bfef7554e20: "GFS2: Withdraw for IO errors writing to the
> journal or statfs" from Aug 16, 2017, leads to the following static
> checker warning:
>
> fs/gfs2/super.c:949 gfs2_sync_fs()
> error: we previously assumed 'sdp' could be null (see line 947)
>
> fs/gfs2/super.c
> 942 static int gfs2_sync_fs(struct super_block *sb, int wait)
> 943 {
> 944 struct gfs2_sbd *sdp = sb->s_fs_info;
> 945
> 946 gfs2_quota_sync(sb, -1);
> 947 if (wait && sdp)
> ^^^
> Existing code checks for NULL.
The NULL check seemed odd to me, and other ->sync_fs implementations don't check it, but digging through the history there's a reason it was added (see 9171f5a ). That said, I can't see the quota_off code path that it was guarding against any more, so perhaps it is no longer required.
Andy
>
> 948 gfs2_log_flush(sdp, NULL, NORMAL_FLUSH);
> 949 return sdp->sd_log_error;
> ^^^^^^^^^^^^^^^^^
> Patch adds unchecked dereference.
next prev parent reply other threads:[~2017-08-24 12:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 11:03 [Cluster-devel] [bug report] GFS2: Withdraw for IO errors writing to the journal or statfs Dan Carpenter
2017-08-24 12:23 ` Andrew Price [this message]
2017-08-25 16:06 ` Bob Peterson
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=20170824122330.GA16546@cicero \
--to=anprice@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.