All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs:xfs_dir2_node.c: pointer use before check for null
@ 2013-10-22  7:36 ` Denis Efremov
  0 siblings, 0 replies; 10+ messages in thread
From: Denis Efremov @ 2013-10-22  7:36 UTC (permalink / raw)
  To: Ben Myers; +Cc: ldv-project, Alex Elder, Denis Efremov, linux-kernel, xfs

Reorder of assert and args pointer dereference.

Found by Linux Driver Verification project (linuxtesting.org) -
PVS-Studio analyzer.

Signed-off-by: Denis Efremov <yefremov.denis@gmail.com>
---
 fs/xfs/xfs_dir2_node.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c
index 4c3dba7..0ba7382 100644
--- a/fs/xfs/xfs_dir2_node.c
+++ b/fs/xfs/xfs_dir2_node.c
@@ -1365,8 +1365,8 @@ xfs_dir2_leafn_split(
 	 * Allocate space for a new leaf node.
 	 */
 	args = state->args;
-	mp = args->dp->i_mount;
 	ASSERT(args != NULL);
+	mp = args->dp->i_mount;
 	ASSERT(oldblk->magic == XFS_DIR2_LEAFN_MAGIC);
 	error = xfs_da_grow_inode(args, &blkno);
 	if (error) {
-- 
1.8.3.1

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-10-31 15:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22  7:36 [PATCH] xfs:xfs_dir2_node.c: pointer use before check for null Denis Efremov
2013-10-22  7:36 ` Denis Efremov
2013-10-22 20:33 ` Dave Chinner
2013-10-22 20:33   ` Dave Chinner
2013-10-25 11:53   ` [PATCH v2] " Denis Efremov
2013-10-25 11:53     ` Denis Efremov
2013-10-25 15:06     ` Ben Myers
2013-10-25 15:06       ` Ben Myers
2013-10-31 15:56       ` Ben Myers
2013-10-31 15:56         ` Ben Myers

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.