aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-04-27 09:52:15 +0800
committerAlex Shi <alex.shi@linaro.org>2016-04-27 09:52:15 +0800
commite0ac66e00b01f6ff4e8274a4b5c008a26583c1b9 (patch)
treec845d5e80991f0eef3a38381036c8261baffb08a /fs
parente9cd0f1ce300f433a478bd1973dea112b5fbb800 (diff)
parent7b44c3df0b89d05c80e15eb0522a21d033d1314f (diff)
downloadlinux-linaro-stable-e0ac66e00b01f6ff4e8274a4b5c008a26583c1b9.tar.gz
Merge branch 'v3.18/topic/KASAN' into linux-linaro-lsk-v3.18lsk-v3.18-16.04
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/connect.c6
-rw-r--r--fs/dcache.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 82ebe7dbd834..c750973fd20a 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -773,8 +773,7 @@ static void clean_demultiplex_info(struct TCP_Server_Info *server)
length = atomic_dec_return(&tcpSesAllocCount);
if (length > 0)
- mempool_resize(cifs_req_poolp, length + cifs_min_rcv,
- GFP_KERNEL);
+ mempool_resize(cifs_req_poolp, length + cifs_min_rcv);
}
static int
@@ -848,8 +847,7 @@ cifs_demultiplex_thread(void *p)
length = atomic_inc_return(&tcpSesAllocCount);
if (length > 1)
- mempool_resize(cifs_req_poolp, length + cifs_min_rcv,
- GFP_KERNEL);
+ mempool_resize(cifs_req_poolp, length + cifs_min_rcv);
set_freezable();
while (server->tcpStatus != CifsExiting) {
diff --git a/fs/dcache.c b/fs/dcache.c
index d25f8fdcd397..da349a1c5f3f 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -38,6 +38,8 @@
#include <linux/prefetch.h>
#include <linux/ratelimit.h>
#include <linux/list_lru.h>
+#include <linux/kasan.h>
+
#include "internal.h"
#include "mount.h"
@@ -1433,6 +1435,9 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
}
atomic_set(&p->u.count, 1);
dname = p->name;
+ if (IS_ENABLED(CONFIG_DCACHE_WORD_ACCESS))
+ kasan_unpoison_shadow(dname,
+ round_up(name->len + 1, sizeof(unsigned long)));
} else {
dname = dentry->d_iname;
}