linux/net/ceph
Ilya Dryomov a319bf56a6 libceph: store timeouts in jiffies, verify user input
There are currently three libceph-level timeouts that the user can
specify on mount: mount_timeout, osd_idle_ttl and osdkeepalive.  All of
these are in seconds and no checking is done on user input: negative
values are accepted, we multiply them all by HZ which may or may not
overflow, arbitrarily large jiffies then get added together, etc.

There is also a bug in the way mount_timeout=0 is handled.  It's
supposed to mean "infinite timeout", but that's not how wait.h APIs
treat it and so __ceph_open_session() for example will busy loop
without much chance of being interrupted if none of ceph-mons are
there.

Fix all this by verifying user input, storing timeouts capped by
msecs_to_jiffies() in jiffies and using the new ceph_timeout_jiffies()
helper for all user-specified waits to handle infinite timeouts
correctly.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
2015-06-25 11:49:29 +03:00
..
crush crush: straw2 bucket type with an efficient 64-bit crush_ln() 2015-04-22 18:33:43 +03:00
armor.c
auth.c
auth_none.c
auth_none.h
auth_x.c libceph: fix sparse endianness warnings 2015-01-08 20:36:57 +03:00
auth_x.h libceph: store session key in cephx authorizer 2014-12-17 20:09:50 +03:00
auth_x_protocol.h
buffer.c libceph: nuke ceph_kvfree() 2014-12-17 20:09:50 +03:00
ceph_common.c libceph: store timeouts in jiffies, verify user input 2015-06-25 11:49:29 +03:00
ceph_fs.c
ceph_hash.c
ceph_strings.c libceph: nuke pool op infrastructure 2015-02-19 13:31:37 +03:00
crypto.c libceph: do not crash on large auth tickets 2014-11-13 22:21:12 +03:00
crypto.h
debugfs.c libceph: expose client options through debugfs 2015-04-20 18:55:39 +03:00
Kconfig
Makefile
messenger.c libceph: don't overwrite specific con error msgs 2015-04-20 18:55:37 +03:00
mon_client.c libceph: store timeouts in jiffies, verify user input 2015-06-25 11:49:29 +03:00
msgpool.c
osd_client.c libceph: store timeouts in jiffies, verify user input 2015-06-25 11:49:29 +03:00
osdmap.c crush: straw2 bucket type with an efficient 64-bit crush_ln() 2015-04-22 18:33:43 +03:00
pagelist.c
pagevec.c libceph: use kvfree() instead of open-coding it 2015-06-25 11:49:28 +03:00
snapshot.c