Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1730824

Re: [PATCH] btrfs: avoid null pointer dereference on fs_info when calling btrfs_crit

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
From David Sterba <dsterba@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH] btrfs: avoid null pointer dereference on fs_info when calling btrfs_crit
Date Tue, 12 Sep 2017 13:30:01 +0200
Message-ID <uoRy9-Ch-5@gated-at.bofh.it> (permalink)
References <uoyFb-57i-17@gated-at.bofh.it>
X-Original-To Colin King <colin.king@canonical.com>
Reply-To dsterba@suse.cz
Mail-Followup-To dsterba@suse.cz, Colin King <colin.king@canonical.com>, Chris Mason <clm@fb.com>, Josef Bacik <jbacik@fb.com>, David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.23.1 (2014-03-12)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 14
Organization linux.* mail to news gateway
X-Original-Cc Chris Mason <clm@fb.com>, Josef Bacik <jbacik@fb.com>, David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
X-Original-Date Tue, 12 Sep 2017 13:26:58 +0200
X-Original-Message-ID <20170912112658.GH14538@twin.jikos.cz>
X-Original-References <20170911151528.26348-1-colin.king@canonical.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1730824

Show key headers only | View raw


On Mon, Sep 11, 2017 at 04:15:28PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> There are checks on fs_info in __btrfs_panic to avoid dereferencing a
> null fs_info, however, there is a call to btrfs_crit that may also
> dereference a null fs_info. Fix this by adding a check to see if fs_info
> is null and only print the s_id if fs_info is non-null.
> 
> Detected by CoverityScan CID#401973 ("Dereference after null check")
> 
> Fixes: efe120a067c8 ("Btrfs: convert printk to btrfs_ and fix BTRFS prefix")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: David Sterba <dsterba@suse.com>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] btrfs: avoid null pointer dereference on fs_info when calling btrfs_crit Colin King <colin.king@canonical.com> - 2017-09-11 17:20 +0200
  Re: [PATCH] btrfs: avoid null pointer dereference on fs_info when  calling btrfs_crit David Sterba <dsterba@suse.cz> - 2017-09-12 13:30 +0200

csiph-web