libceph: set -EINVAL in one place in crush_decode()
authorIlya Dryomov <idryomov@gmail.com>
Thu, 13 Jul 2017 13:57:26 +0000 (15:57 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 17 Jul 2017 12:54:58 +0000 (14:54 +0200)
commitc2acfd95d0c7df0bf6826d9d1ca3796160728a42
treeec72f9f1cc4ec422a54d910667cf15c897ee984d
parent00c8ebb360937bbc5da02929d62fcbf6a72801eb
libceph: set -EINVAL in one place in crush_decode()

No sooner than Dan had fixed this issue in commit 293dffaad8d5
("libceph: NULL deref on crush_decode() error path"), I brought it
back.  Add a new label and set -EINVAL once, right before failing.

Fixes: 278b1d709c6a ("libceph: ceph_decode_skip_* helpers")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/osdmap.c