]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: potential NULL dereference in ceph_msg_data_create()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 17 Jul 2017 08:13:35 +0000 (11:13 +0300)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 17 Jul 2017 12:54:59 +0000 (14:54 +0200)
commitb79862bcd90066a497aad3ca506f751bf9efd3eb
tree83ca96fd7f28d2efc8ba8fa8dcabc37a3ba82ba1
parent30207b5df3f61606dbc0440b722fb83e3f6c3c96
libceph: potential NULL dereference in ceph_msg_data_create()

If kmem_cache_zalloc() returns NULL then the INIT_LIST_HEAD(&data->links);
will Oops.  The callers aren't really prepared for NULL returns so it
doesn't make a lot of difference in real life.

Fixes: fb8bbd1c38ff ("libceph: replace message data pointer with list")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/messenger.c