Skip to content

Commit

Permalink
Merge branch 'akpm' (patches from Andrew)
Browse files Browse the repository at this point in the history
Merge misc fixes from Andrew Morton:
 "Three patches"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  include/linux/mmdebug.h: should include linux/bug.h
  mm/zswap: change incorrect strncmp use to strcmp
  proc: fix -ESRCH error when writing to /proc/$pid/coredump_filter
  • Loading branch information
torvalds committed Dec 18, 2015
2 parents 65d70e7 + 1d5cda4 commit 8b4414f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2494,6 +2494,7 @@ static ssize_t proc_coredump_filter_write(struct file *file,
mm = get_task_mm(task);
if (!mm)
goto out_no_mm;
ret = 0;

for (i = 0, mask = 1; i < MMF_DUMP_FILTER_BITS; i++, mask <<= 1) {
if (val & mask)
Expand Down
1 change: 1 addition & 0 deletions include/linux/mmdebug.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef LINUX_MM_DEBUG_H
#define LINUX_MM_DEBUG_H 1

#include <linux/bug.h>
#include <linux/stringify.h>

struct page;
Expand Down
6 changes: 3 additions & 3 deletions mm/zswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,17 +541,17 @@ static struct zswap_pool *zswap_pool_last_get(void)
return last;
}

/* type and compressor must be null-terminated */
static struct zswap_pool *zswap_pool_find_get(char *type, char *compressor)
{
struct zswap_pool *pool;

assert_spin_locked(&zswap_pools_lock);

list_for_each_entry_rcu(pool, &zswap_pools, list) {
if (strncmp(pool->tfm_name, compressor, sizeof(pool->tfm_name)))
if (strcmp(pool->tfm_name, compressor))
continue;
if (strncmp(zpool_get_type(pool->zpool), type,
sizeof(zswap_zpool_type)))
if (strcmp(zpool_get_type(pool->zpool), type))
continue;
/* if we can't get it, it's about to be destroyed */
if (!zswap_pool_get(pool))
Expand Down

0 comments on commit 8b4414f

Please sign in to comment.