]> git.hungrycats.org Git - linux/commit
libceph: add an ONSTACK initializer for oids
authorIlya Dryomov <idryomov@gmail.com>
Tue, 26 Jul 2016 13:22:35 +0000 (15:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Sep 2016 08:12:47 +0000 (10:12 +0200)
commitdcb3f83230cdafb7d72cdf13676685351692b958
tree1e5f8cae8d7cce97f4f089a10289b585d9ab0f3f
parent453e10c44c128082d408894b1eab453735cf00ba
libceph: add an ONSTACK initializer for oids

commit 281dbe5db81c6137def9757e07a7aea14b1ed86e upstream.

An on-stack oid in ceph_ioctl_get_dataloc() is not initialized,
resulting in a WARN and a NULL pointer dereference later on.  We will
have more of these on-stack in the future, so fix it with a convenience
macro.

Fixes: d30291b985d1 ("libceph: variable-sized ceph_object_id")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/ioctl.c
include/linux/ceph/osdmap.h