[PATCH 0/7] FS-Cache: Miscellaneous fixes

From: David Howells
Date: Fri Nov 30 2018 - 11:39:50 EST



Hi Linus,

Can you pull these fixes for fscache and cachefiles?

(1) Fix an assertion failure at fs/cachefiles/xattr.c:138 caused by a race
between a cache object lookup failing and someone attempting to
reenable that object, thereby triggering an update of the object's
attributes.

(2) Fix an assertion failure at fs/fscache/operation.c:449 caused by a
split atomic subtract and atomic read that allows a race to happen.

(3) Fix a leak of backing pages when simultaneously reading the same page
from the same object from two or more threads.

(4) Fix a hang due to a race between a cache object being discarded and
the corresponding cookie being reenabled.

There are also some minor stuff. Do you want me to punt these to the next
merge window instead?

(5) Cast an enum value to a different enum type to prevent clang from
generating a warning. This shouldn't cause any sort of change in the
emitted code.

(6) Use ktime_get_real_seconds() instead of get_seconds(). This is just
used to uniquify a filename for an object to be placed in the
graveyard. Objects placed there are deleted by cachfilesd in
userspace immediately thereafter.

(7) Remove an initialised, but otherwise unused variable. This should
have been entirely optimised away anyway.

The patches are tagged here:

git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
fscache-fixes-20181130

and can also be found on the following branch:

http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=fscache-fixes

Thanks,
David
---
Arnd Bergmann (1):
cachefiles: avoid deprecated get_seconds()

Colin Ian King (1):
fscache, cachefiles: remove redundant variable 'cache'

David Howells (1):
cachefiles: Fix an assertion failure when trying to update a failed object

Kiran Kumar Modukuri (1):
cachefiles: Fix page leak in cachefiles_read_backing_file while vmscan is active

Nathan Chancellor (1):
cachefiles: Explicitly cast enumerated type in put_object

NeilBrown (1):
fscache: fix race between enablement and dropping of object

kiran.modukuri (1):
fscache: Fix race in fscache_op_complete() due to split atomic_sub & read


fs/cachefiles/namei.c | 8 +++++---
fs/cachefiles/rdwr.c | 9 ++++++---
fs/cachefiles/xattr.c | 3 ++-
fs/fscache/object.c | 3 +++
include/linux/fscache-cache.h | 3 +--
5 files changed, 17 insertions(+), 9 deletions(-)