* Patch "fuse: fix time_to_jiffies nsec sanity check" has been added to the 4.9-stable tree
@ 2017-01-23 14:35 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-23 14:35 UTC (permalink / raw)
To: david.sheets, dsheets, gregkh, mszeredi; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
fuse: fix time_to_jiffies nsec sanity check
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
fuse-fix-time_to_jiffies-nsec-sanity-check.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 210675270caa33253e4c33f3c5e657e7d6060812 Mon Sep 17 00:00:00 2001
From: David Sheets <david.sheets@docker.com>
Date: Fri, 13 Jan 2017 15:58:30 +0000
Subject: fuse: fix time_to_jiffies nsec sanity check
From: David Sheets <david.sheets@docker.com>
commit 210675270caa33253e4c33f3c5e657e7d6060812 upstream.
Commit bcb6f6d2b9c2 ("fuse: use timespec64") introduced clamped nsec values
in time_to_jiffies but used the max of nsec and NSEC_PER_SEC - 1 instead of
the min. Because of this, dentries would stay in the cache longer than
requested and go stale in scenarios that relied on their timely eviction.
Fixes: bcb6f6d2b9c2 ("fuse: use timespec64")
Signed-off-by: David Sheets <dsheets@docker.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/fuse/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -68,7 +68,7 @@ static u64 time_to_jiffies(u64 sec, u32
if (sec || nsec) {
struct timespec64 ts = {
sec,
- max_t(u32, nsec, NSEC_PER_SEC - 1)
+ min_t(u32, nsec, NSEC_PER_SEC - 1)
};
return get_jiffies_64() + timespec64_to_jiffies(&ts);
Patches currently in stable-queue which might be from david.sheets@docker.com are
queue-4.9/fuse-fix-time_to_jiffies-nsec-sanity-check.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-23 14:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-23 14:35 Patch "fuse: fix time_to_jiffies nsec sanity check" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).