linux/net/ceph
Chunwei Chen bcd5faf938 libceph: fix corruption when using page_count 0 page in rbd
commit 178eda29ca upstream.

It has been reported that using ZFSonLinux on rbd will result in memory
corruption. The bug report can be found here:

https://github.com/zfsonlinux/spl/issues/241
http://tracker.ceph.com/issues/7790

The reason is that ZFS will send pages with page_count 0 into rbd, which in
turns send them to tcp_sendpage. However, tcp_sendpage cannot deal with
page_count 0, as it will do get_page and put_page, and erroneously free the
page.

This type of issue has been noted before, and handled in iscsi, drbd,
etc. So, rbd should also handle this. This fix address this issue by fall back
to slower sendmsg when page_count 0 detected.

Cc: Sage Weil <sage@inktank.com>
Cc: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Reviewed-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07 10:28:28 -07:00
..
crush crush: fix off-by-one errors in total_tries refactor 2014-05-13 13:32:52 +02:00
Kconfig
Makefile libceph: create source file "net/ceph/snapshot.c" 2013-05-01 21:20:08 -07:00
armor.c
auth.c
auth_none.c libceph: Fix NULL pointer dereference in auth client code 2013-07-03 15:32:55 -07:00
auth_none.h net: 8021q/bluetooth/bridge/can/ceph: Remove extern from function prototypes 2013-10-19 19:12:11 -04:00
auth_x.c
auth_x.h net: 8021q/bluetooth/bridge/can/ceph: Remove extern from function prototypes 2013-10-19 19:12:11 -04:00
auth_x_protocol.h
buffer.c libceph: add ceph_kv{malloc,free}() and switch to them 2014-01-26 12:34:23 +02:00
ceph_common.c libceph: add ceph_kv{malloc,free}() and switch to them 2014-01-26 12:34:23 +02:00
ceph_fs.c
ceph_hash.c
ceph_strings.c
crypto.c
crypto.h net: 8021q/bluetooth/bridge/can/ceph: Remove extern from function prototypes 2013-10-19 19:12:11 -04:00
debugfs.c libceph: rename ceph_osd_request::r_{oloc,oid} to r_base_{oloc,oid} 2014-01-27 23:57:49 +02:00
messenger.c libceph: fix corruption when using page_count 0 page in rbd 2014-06-07 10:28:28 -07:00
mon_client.c libceph: rename ceph_msg::front_max to front_alloc_len 2014-01-14 11:27:26 +02:00
msgpool.c
osd_client.c libceph: take map_sem for read in handle_reply() 2014-02-07 10:45:53 -08:00
osdmap.c libceph: follow {read,write}_tier fields on osd request submission 2014-01-27 23:57:45 +02:00
pagelist.c
pagevec.c
snapshot.c libceph: create source file "net/ceph/snapshot.c" 2013-05-01 21:20:08 -07:00