diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2015-10-11 19:38:00 +0200 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-11-14 18:58:28 +0100 |
commit | 9df1a69674639ed58d04437f8b66942ca0ef72cc (patch) | |
tree | 82fad1f61f0ed9639caf7d6c6305023c90f9b665 /security/keys | |
parent | a436ef7ab775920b278b3485526455a97736c4e3 (diff) | |
download | lwn-9df1a69674639ed58d04437f8b66942ca0ef72cc.tar.gz lwn-9df1a69674639ed58d04437f8b66942ca0ef72cc.zip |
rbd: prevent kernel stack blow up on rbd map
commit 6d69bb536bac0d403d83db1ca841444981b280cd upstream.
Mapping an image with a long parent chain (e.g. image foo, whose parent
is bar, whose parent is baz, etc) currently leads to a kernel stack
overflow, due to the following recursion in the reply path:
rbd_osd_req_callback()
rbd_obj_request_complete()
rbd_img_obj_callback()
rbd_img_parent_read_callback()
rbd_obj_request_complete()
...
Limit the parent chain to 16 images, which is ~5K worth of stack. When
the above recursion is eliminated, this limit can be lifted.
Fixes: http://tracker.ceph.com/issues/12538
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
[idryomov@gmail.com: backport to 3.10: rbd_dev->opts, context]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'security/keys')
0 files changed, 0 insertions, 0 deletions