diff options
| -rw-r--r-- | fs/proc/base.c | 1 | ||||
| -rw-r--r-- | include/linux/mmdebug.h | 1 | ||||
| -rw-r--r-- | mm/zswap.c | 6 |
3 files changed, 5 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index bd3e9e68125b..4bd5d3118acd 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
| @@ -2494,6 +2494,7 @@ static ssize_t proc_coredump_filter_write(struct file *file, | |||
| 2494 | mm = get_task_mm(task); | 2494 | mm = get_task_mm(task); |
| 2495 | if (!mm) | 2495 | if (!mm) |
| 2496 | goto out_no_mm; | 2496 | goto out_no_mm; |
| 2497 | ret = 0; | ||
| 2497 | 2498 | ||
| 2498 | for (i = 0, mask = 1; i < MMF_DUMP_FILTER_BITS; i++, mask <<= 1) { | 2499 | for (i = 0, mask = 1; i < MMF_DUMP_FILTER_BITS; i++, mask <<= 1) { |
| 2499 | if (val & mask) | 2500 | if (val & mask) |
diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h index 877ef226f90f..772362adf471 100644 --- a/include/linux/mmdebug.h +++ b/include/linux/mmdebug.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef LINUX_MM_DEBUG_H | 1 | #ifndef LINUX_MM_DEBUG_H |
| 2 | #define LINUX_MM_DEBUG_H 1 | 2 | #define LINUX_MM_DEBUG_H 1 |
| 3 | 3 | ||
| 4 | #include <linux/bug.h> | ||
| 4 | #include <linux/stringify.h> | 5 | #include <linux/stringify.h> |
| 5 | 6 | ||
| 6 | struct page; | 7 | struct page; |
diff --git a/mm/zswap.c b/mm/zswap.c index 025f8dc723de..bf14508afd64 100644 --- a/mm/zswap.c +++ b/mm/zswap.c | |||
| @@ -541,6 +541,7 @@ static struct zswap_pool *zswap_pool_last_get(void) | |||
| 541 | return last; | 541 | return last; |
| 542 | } | 542 | } |
| 543 | 543 | ||
| 544 | /* type and compressor must be null-terminated */ | ||
| 544 | static struct zswap_pool *zswap_pool_find_get(char *type, char *compressor) | 545 | static struct zswap_pool *zswap_pool_find_get(char *type, char *compressor) |
| 545 | { | 546 | { |
| 546 | struct zswap_pool *pool; | 547 | struct zswap_pool *pool; |
| @@ -548,10 +549,9 @@ static struct zswap_pool *zswap_pool_find_get(char *type, char *compressor) | |||
| 548 | assert_spin_locked(&zswap_pools_lock); | 549 | assert_spin_locked(&zswap_pools_lock); |
| 549 | 550 | ||
| 550 | list_for_each_entry_rcu(pool, &zswap_pools, list) { | 551 | list_for_each_entry_rcu(pool, &zswap_pools, list) { |
| 551 | if (strncmp(pool->tfm_name, compressor, sizeof(pool->tfm_name))) | 552 | if (strcmp(pool->tfm_name, compressor)) |
| 552 | continue; | 553 | continue; |
| 553 | if (strncmp(zpool_get_type(pool->zpool), type, | 554 | if (strcmp(zpool_get_type(pool->zpool), type)) |
| 554 | sizeof(zswap_zpool_type))) | ||
| 555 | continue; | 555 | continue; |
| 556 | /* if we can't get it, it's about to be destroyed */ | 556 | /* if we can't get it, it's about to be destroyed */ |
| 557 | if (!zswap_pool_get(pool)) | 557 | if (!zswap_pool_get(pool)) |
