xfs: fix possible NULL dereference in xlog_verify_iclog
authorGeyslan G. Bem <geyslan@gmail.com>
Wed, 30 Oct 2013 21:01:00 +0000 (16:01 -0500)
committerJiri Slaby <jslaby@suse.cz>
Fri, 4 Jul 2014 08:06:57 +0000 (10:06 +0200)
commit9af76725ffcc8517643fd07d379f4a1232f6ae92
tree32248e006a457fdb9ed5fe810f5fe5f41e0a4772
parent710246604e1d8b6be253d056c922bdf7f57cc243
xfs: fix possible NULL dereference in xlog_verify_iclog

commit 643f7c4e5656bd18c769211f933190f7bb738245 upstream.

In xlog_verify_iclog a debug check of the incore log buffers prints an
error if icptr is null and then goes on to dereference the pointer
regardless.  Convert this to an assert so that the intention is clear.
This was reported by Coverty.

Signed-off-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/xfs/xfs_log.c