linux_dsm_epyc7002/fs/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
..
acl.c ceph: acl: Remove unused function 2015-02-19 13:31:38 +03:00
addr.c ceph: set i_head_snapc when getting CEPH_CAP_FILE_WR reference 2015-06-25 11:49:28 +03:00
cache.c ceph: fscache: Wait for completion of object initialization 2014-04-03 10:33:53 +08:00
cache.h ceph: fscache: add an interface to synchronize object store limit 2014-04-03 10:33:53 +08:00
caps.c ceph: don't pre-allocate space for cap release messages 2015-06-25 11:49:29 +03:00
ceph_frag.c
debugfs.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
dir.c libceph: store timeouts in jiffies, verify user input 2015-06-25 11:49:29 +03:00
export.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
file.c ceph: set i_head_snapc when getting CEPH_CAP_FILE_WR reference 2015-06-25 11:49:28 +03:00
inode.c ceph: take snap_rwsem when accessing snap realm's cached_context 2015-06-25 11:49:28 +03:00
ioctl.c ceph: fix divide-by-zero in __validate_layout() 2014-10-14 12:57:05 -07:00
ioctl.h
Kconfig ceph: add acl for cephfs 2013-12-31 20:32:01 +02:00
locks.c Revert "locks: keep a count of locks on the flctx lists" 2015-02-16 14:32:03 -05:00
Makefile ceph: add acl for cephfs 2013-12-31 20:32:01 +02:00
mds_client.c libceph: store timeouts in jiffies, verify user input 2015-06-25 11:49:29 +03:00
mds_client.h libceph: store timeouts in jiffies, verify user input 2015-06-25 11:49:29 +03:00
mdsmap.c fs/ceph: replace pr_warning by pr_warn 2014-06-06 16:08:06 -07:00
snap.c ceph: make sure syncfs flushes all cap snaps 2015-06-25 11:49:29 +03:00
strings.c ceph: rename snapshot support 2015-04-22 18:33:41 +03:00
super.c libceph: store timeouts in jiffies, verify user input 2015-06-25 11:49:29 +03:00
super.h ceph: don't pre-allocate space for cap release messages 2015-06-25 11:49:29 +03:00
xattr.c ceph: take snap_rwsem when accessing snap realm's cached_context 2015-06-25 11:49:28 +03:00