android_kernel_motorola_sm6375/net/ceph
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ilya Dryomov 693860e795 libceph: fix alloc_msg_with_page_vector() memory leaks
commit e886274031200bb60965c1b9c49b7acda56a93bd upstream.

Make it so that CEPH_MSG_DATA_PAGES data item can own pages,
fixing a bunch of memory leaks for a page vector allocated in
alloc_msg_with_page_vector().  Currently, only watch-notify
messages trigger this allocation, and normally the page vector
is freed either in handle_watch_notify() or by the caller of
ceph_osdc_notify().  But if the message is freed before that
(e.g. if the session faults while reading in the message or
if the notify is stale), we leak the page vector.

This was supposed to be fixed by switching to a message-owned
pagelist, but that never happened.

Fixes: 1907920324 ("libceph: support for sending notifies")
Reported-by: Roman Penyaev <rpenyaev@suse.de>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Roman Penyaev <rpenyaev@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-02 15:11:02 +02:00
..
crush
armor.c
auth.c
auth_none.c
auth_none.h
auth_x.c
auth_x.h
auth_x_protocol.h
buffer.c
ceph_common.c libceph: avoid a __vmalloc() deadlock in ceph_kvmalloc() 2019-09-16 12:06:25 +02:00
ceph_fs.c
ceph_hash.c
ceph_strings.c
cls_lock_client.c rbd: support for object-map and fast-diff 2019-07-08 14:01:45 +02:00
crypto.c libceph: don't call crypto_free_sync_skcipher() on a NULL tfm 2019-08-28 12:33:46 +02:00
crypto.h
debugfs.c
decode.c libceph: use TYPE_LEGACY for entity addrs instead of TYPE_NONE 2019-07-08 14:01:43 +02:00
Kconfig
Makefile libceph: add ceph_decode_entity_addr 2019-07-08 14:01:43 +02:00
messenger.c libceph: fix alloc_msg_with_page_vector() memory leaks 2020-04-02 15:11:02 +02:00
mon_client.c libceph: add function that reset client's entity addr 2019-09-16 12:06:23 +02:00
msgpool.c
osd_client.c libceph: fix alloc_msg_with_page_vector() memory leaks 2020-04-02 15:11:02 +02:00
osdmap.c ceph: check POOL_FLAG_FULL/NEARFULL in addition to OSDMAP_FULL/NEARFULL 2020-04-01 11:01:58 +02:00
pagelist.c
pagevec.c
snapshot.c
string_table.c
striper.c rbd: support for object-map and fast-diff 2019-07-08 14:01:45 +02:00