bug report: re: vfs: Convert ceph to use the new mount API

From: Colin Ian King
Date: Mon Jul 08 2019 - 17:31:38 EST


Hi,

Static analysis with Coverity on linux-next has detected an
uninitialized variable error in the following commit:

commit 108f95bfaa5665724159e66e4a26206b5589f126
Author: David Howells <dhowells@xxxxxxxxxx>
Date: Mon Mar 25 16:38:32 2019 +0000

vfs: Convert ceph to use the new mount API


Specifically, in fs/ceph/super.c in function ceph_real_mount, variable
err is not initialized, and when the if (!fsc->sb->s_root) code block is
not executed then err is never assigned and an uninitialized value is
returned:

884 mutex_unlock(&fsc->client->mount_mutex);

Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value err.

885 return err;
886
887 out:
888 mutex_unlock(&fsc->client->mount_mutex);
889 return err;
890 }

Not sure what err should be returning, so I'm reporting this a as bug.

Colin