We are currently experiencing downtime impacting viewing & cloning the Mesa repo, and some GitLab pages returning 503. Please see #freedesktop on IRC for more updates.

Commit d8f190ee authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
 "31 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (31 commits)
  ocfs2: fix potential use after free
  mm/khugepaged: fix the xas_create_range() error path
  mm/khugepaged: collapse_shmem() do not crash on Compound
  mm/khugepaged: collapse_shmem() without freezing new_page
  mm/khugepaged: minor reorderings in collapse_shmem()
  mm/khugepaged: collapse_shmem() remember to clear holes
  mm/khugepaged: fix crashes due to misaccounted holes
  mm/khugepaged: collapse_shmem() stop if punched or truncated
  mm/huge_memory: fix lockdep complaint on 32-bit i_size_read()
  mm/huge_memory: splitting set mapping+index before unfreeze
  mm/huge_memory: rename freeze_page() to unmap_page()
  initramfs: clean old path before creating a hardlink
  kernel/kcov.c: mark funcs in __sanitizer_cov_trace_pc() as notrace
  psi: make disabling/enabling easier for vendor kernels
  proc: fixup map_files test on arm
  debugobjects: avoid recursive calls with kmemleak
  userfaultfd: shmem: UFFDIO_COPY: set the page dirty if VM_WRITE is not set
  userfaultfd: shmem: add i_size checks
  userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas
  userfaultfd: shmem: allocate anonymous memory for MAP_PRIVATE shmem
  ...
parents 6c7954b7 164f7e58
...@@ -3505,6 +3505,10 @@ ...@@ -3505,6 +3505,10 @@
before loading. before loading.
See Documentation/blockdev/ramdisk.txt. See Documentation/blockdev/ramdisk.txt.
psi= [KNL] Enable or disable pressure stall information
tracking.
Format: <bool>
psmouse.proto= [HW,MOUSE] Highest PS2 mouse protocol extension to psmouse.proto= [HW,MOUSE] Highest PS2 mouse protocol extension to
probe for; one of (bare|imps|exps|lifebook|any). probe for; one of (bare|imps|exps|lifebook|any).
psmouse.rate= [HW,MOUSE] Set desired mouse report rate, in reports psmouse.rate= [HW,MOUSE] Set desired mouse report rate, in reports
......
...@@ -2491,7 +2491,7 @@ F: drivers/net/wireless/ath/* ...@@ -2491,7 +2491,7 @@ F: drivers/net/wireless/ath/*
ATHEROS ATH5K WIRELESS DRIVER ATHEROS ATH5K WIRELESS DRIVER
M: Jiri Slaby <jirislaby@gmail.com> M: Jiri Slaby <jirislaby@gmail.com>
M: Nick Kossifidis <mickflemm@gmail.com> M: Nick Kossifidis <mickflemm@gmail.com>
M: "Luis R. Rodriguez" <mcgrof@do-not-panic.com> M: Luis Chamberlain <mcgrof@kernel.org>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
W: http://wireless.kernel.org/en/users/Drivers/ath5k W: http://wireless.kernel.org/en/users/Drivers/ath5k
S: Maintained S: Maintained
...@@ -5835,7 +5835,7 @@ F: include/uapi/linux/firewire*.h ...@@ -5835,7 +5835,7 @@ F: include/uapi/linux/firewire*.h
F: tools/firewire/ F: tools/firewire/
FIRMWARE LOADER (request_firmware) FIRMWARE LOADER (request_firmware)
M: Luis R. Rodriguez <mcgrof@kernel.org> M: Luis Chamberlain <mcgrof@kernel.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/firmware_class/ F: Documentation/firmware_class/
...@@ -8135,7 +8135,7 @@ F: tools/testing/selftests/ ...@@ -8135,7 +8135,7 @@ F: tools/testing/selftests/
F: Documentation/dev-tools/kselftest* F: Documentation/dev-tools/kselftest*
KERNEL USERMODE HELPER KERNEL USERMODE HELPER
M: "Luis R. Rodriguez" <mcgrof@kernel.org> M: Luis Chamberlain <mcgrof@kernel.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
S: Maintained S: Maintained
F: kernel/umh.c F: kernel/umh.c
...@@ -8311,7 +8311,7 @@ F: mm/kmemleak.c ...@@ -8311,7 +8311,7 @@ F: mm/kmemleak.c
F: mm/kmemleak-test.c F: mm/kmemleak-test.c
KMOD KERNEL MODULE LOADER - USERMODE HELPER KMOD KERNEL MODULE LOADER - USERMODE HELPER
M: "Luis R. Rodriguez" <mcgrof@kernel.org> M: Luis Chamberlain <mcgrof@kernel.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
S: Maintained S: Maintained
F: kernel/kmod.c F: kernel/kmod.c
...@@ -12061,7 +12061,7 @@ F: kernel/printk/ ...@@ -12061,7 +12061,7 @@ F: kernel/printk/
F: include/linux/printk.h F: include/linux/printk.h
PRISM54 WIRELESS DRIVER PRISM54 WIRELESS DRIVER
M: "Luis R. Rodriguez" <mcgrof@gmail.com> M: Luis Chamberlain <mcgrof@kernel.org>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
W: http://wireless.kernel.org/en/users/Drivers/p54 W: http://wireless.kernel.org/en/users/Drivers/p54
S: Obsolete S: Obsolete
...@@ -12075,9 +12075,10 @@ S: Maintained ...@@ -12075,9 +12075,10 @@ S: Maintained
F: fs/proc/ F: fs/proc/
F: include/linux/proc_fs.h F: include/linux/proc_fs.h
F: tools/testing/selftests/proc/ F: tools/testing/selftests/proc/
F: Documentation/filesystems/proc.txt
PROC SYSCTL PROC SYSCTL
M: "Luis R. Rodriguez" <mcgrof@kernel.org> M: Luis Chamberlain <mcgrof@kernel.org>
M: Kees Cook <keescook@chromium.org> M: Kees Cook <keescook@chromium.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
L: linux-fsdevel@vger.kernel.org L: linux-fsdevel@vger.kernel.org
......
...@@ -338,13 +338,14 @@ void hfs_bmap_free(struct hfs_bnode *node) ...@@ -338,13 +338,14 @@ void hfs_bmap_free(struct hfs_bnode *node)
nidx -= len * 8; nidx -= len * 8;
i = node->next; i = node->next;
hfs_bnode_put(node);
if (!i) { if (!i) {
/* panic */; /* panic */;
pr_crit("unable to free bnode %u. bmap not found!\n", pr_crit("unable to free bnode %u. bmap not found!\n",
node->this); node->this);
hfs_bnode_put(node);
return; return;
} }
hfs_bnode_put(node);
node = hfs_bnode_find(tree, i); node = hfs_bnode_find(tree, i);
if (IS_ERR(node)) if (IS_ERR(node))
return; return;
......
...@@ -466,14 +466,15 @@ void hfs_bmap_free(struct hfs_bnode *node) ...@@ -466,14 +466,15 @@ void hfs_bmap_free(struct hfs_bnode *node)
nidx -= len * 8; nidx -= len * 8;
i = node->next; i = node->next;
hfs_bnode_put(node);
if (!i) { if (!i) {
/* panic */; /* panic */;
pr_crit("unable to free bnode %u. " pr_crit("unable to free bnode %u. "
"bmap not found!\n", "bmap not found!\n",
node->this); node->this);
hfs_bnode_put(node);
return; return;
} }
hfs_bnode_put(node);
node = hfs_bnode_find(tree, i); node = hfs_bnode_find(tree, i);
if (IS_ERR(node)) if (IS_ERR(node))
return; return;
......
...@@ -125,10 +125,10 @@ static struct dentry *ocfs2_get_dentry(struct super_block *sb, ...@@ -125,10 +125,10 @@ static struct dentry *ocfs2_get_dentry(struct super_block *sb,
check_gen: check_gen:
if (handle->ih_generation != inode->i_generation) { if (handle->ih_generation != inode->i_generation) {
iput(inode);
trace_ocfs2_get_dentry_generation((unsigned long long)blkno, trace_ocfs2_get_dentry_generation((unsigned long long)blkno,
handle->ih_generation, handle->ih_generation,
inode->i_generation); inode->i_generation);
iput(inode);
result = ERR_PTR(-ESTALE); result = ERR_PTR(-ESTALE);
goto bail; goto bail;
} }
......
...@@ -157,18 +157,14 @@ static int __ocfs2_move_extent(handle_t *handle, ...@@ -157,18 +157,14 @@ static int __ocfs2_move_extent(handle_t *handle,
} }
/* /*
* lock allocators, and reserving appropriate number of bits for * lock allocator, and reserve appropriate number of bits for
* meta blocks and data clusters. * meta blocks.
*
* in some cases, we don't need to reserve clusters, just let data_ac
* be NULL.
*/ */
static int ocfs2_lock_allocators_move_extents(struct inode *inode, static int ocfs2_lock_meta_allocator_move_extents(struct inode *inode,
struct ocfs2_extent_tree *et, struct ocfs2_extent_tree *et,
u32 clusters_to_move, u32 clusters_to_move,
u32 extents_to_split, u32 extents_to_split,
struct ocfs2_alloc_context **meta_ac, struct ocfs2_alloc_context **meta_ac,
struct ocfs2_alloc_context **data_ac,
int extra_blocks, int extra_blocks,
int *credits) int *credits)
{ {
...@@ -193,13 +189,6 @@ static int ocfs2_lock_allocators_move_extents(struct inode *inode, ...@@ -193,13 +189,6 @@ static int ocfs2_lock_allocators_move_extents(struct inode *inode,
goto out; goto out;
} }
if (data_ac) {
ret = ocfs2_reserve_clusters(osb, clusters_to_move, data_ac);
if (ret) {
mlog_errno(ret);
goto out;
}
}
*credits += ocfs2_calc_extend_credits(osb->sb, et->et_root_el); *credits += ocfs2_calc_extend_credits(osb->sb, et->et_root_el);
...@@ -259,10 +248,10 @@ static int ocfs2_defrag_extent(struct ocfs2_move_extents_context *context, ...@@ -259,10 +248,10 @@ static int ocfs2_defrag_extent(struct ocfs2_move_extents_context *context,
} }
} }
ret = ocfs2_lock_allocators_move_extents(inode, &context->et, *len, 1, ret = ocfs2_lock_meta_allocator_move_extents(inode, &context->et,
&context->meta_ac, *len, 1,
&context->data_ac, &context->meta_ac,
extra_blocks, &credits); extra_blocks, &credits);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
goto out; goto out;
...@@ -285,6 +274,21 @@ static int ocfs2_defrag_extent(struct ocfs2_move_extents_context *context, ...@@ -285,6 +274,21 @@ static int ocfs2_defrag_extent(struct ocfs2_move_extents_context *context,
} }
} }
/*
* Make sure ocfs2_reserve_cluster is called after
* __ocfs2_flush_truncate_log, otherwise, dead lock may happen.
*
* If ocfs2_reserve_cluster is called
* before __ocfs2_flush_truncate_log, dead lock on global bitmap
* may happen.
*
*/
ret = ocfs2_reserve_clusters(osb, *len, &context->data_ac);
if (ret) {
mlog_errno(ret);
goto out_unlock_mutex;
}
handle = ocfs2_start_trans(osb, credits); handle = ocfs2_start_trans(osb, credits);
if (IS_ERR(handle)) { if (IS_ERR(handle)) {
ret = PTR_ERR(handle); ret = PTR_ERR(handle);
...@@ -617,9 +621,10 @@ static int ocfs2_move_extent(struct ocfs2_move_extents_context *context, ...@@ -617,9 +621,10 @@ static int ocfs2_move_extent(struct ocfs2_move_extents_context *context,
} }
} }
ret = ocfs2_lock_allocators_move_extents(inode, &context->et, len, 1, ret = ocfs2_lock_meta_allocator_move_extents(inode, &context->et,
&context->meta_ac, len, 1,
NULL, extra_blocks, &credits); &context->meta_ac,
extra_blocks, &credits);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
goto out; goto out;
......
...@@ -1361,6 +1361,19 @@ static int userfaultfd_register(struct userfaultfd_ctx *ctx, ...@@ -1361,6 +1361,19 @@ static int userfaultfd_register(struct userfaultfd_ctx *ctx,
ret = -EINVAL; ret = -EINVAL;
if (!vma_can_userfault(cur)) if (!vma_can_userfault(cur))
goto out_unlock; goto out_unlock;
/*
* UFFDIO_COPY will fill file holes even without
* PROT_WRITE. This check enforces that if this is a
* MAP_SHARED, the process has write permission to the backing
* file. If VM_MAYWRITE is set it also enforces that on a
* MAP_SHARED vma: there is no F_WRITE_SEAL and no further
* F_WRITE_SEAL can be taken until the vma is destroyed.
*/
ret = -EPERM;
if (unlikely(!(cur->vm_flags & VM_MAYWRITE)))
goto out_unlock;
/* /*
* If this vma contains ending address, and huge pages * If this vma contains ending address, and huge pages
* check alignment. * check alignment.
...@@ -1406,6 +1419,7 @@ static int userfaultfd_register(struct userfaultfd_ctx *ctx, ...@@ -1406,6 +1419,7 @@ static int userfaultfd_register(struct userfaultfd_ctx *ctx,
BUG_ON(!vma_can_userfault(vma)); BUG_ON(!vma_can_userfault(vma));
BUG_ON(vma->vm_userfaultfd_ctx.ctx && BUG_ON(vma->vm_userfaultfd_ctx.ctx &&
vma->vm_userfaultfd_ctx.ctx != ctx); vma->vm_userfaultfd_ctx.ctx != ctx);
WARN_ON(!(vma->vm_flags & VM_MAYWRITE));
/* /*
* Nothing to do: this vma is already registered into this * Nothing to do: this vma is already registered into this
...@@ -1552,6 +1566,7 @@ static int userfaultfd_unregister(struct userfaultfd_ctx *ctx, ...@@ -1552,6 +1566,7 @@ static int userfaultfd_unregister(struct userfaultfd_ctx *ctx,
cond_resched(); cond_resched();
BUG_ON(!vma_can_userfault(vma)); BUG_ON(!vma_can_userfault(vma));
WARN_ON(!(vma->vm_flags & VM_MAYWRITE));
/* /*
* Nothing to do: this vma is already registered into this * Nothing to do: this vma is already registered into this
......
#ifndef _LINUX_PSI_H #ifndef _LINUX_PSI_H
#define _LINUX_PSI_H #define _LINUX_PSI_H
#include <linux/jump_label.h>
#include <linux/psi_types.h> #include <linux/psi_types.h>
#include <linux/sched.h> #include <linux/sched.h>
...@@ -9,7 +10,7 @@ struct css_set; ...@@ -9,7 +10,7 @@ struct css_set;
#ifdef CONFIG_PSI #ifdef CONFIG_PSI
extern bool psi_disabled; extern struct static_key_false psi_disabled;
void psi_init(void); void psi_init(void);
......
...@@ -509,6 +509,15 @@ config PSI ...@@ -509,6 +509,15 @@ config PSI
Say N if unsure. Say N if unsure.
config PSI_DEFAULT_DISABLED
bool "Require boot parameter to enable pressure stall information tracking"
default n
depends on PSI
help
If set, pressure stall information tracking will be disabled
per default but can be enabled through passing psi_enable=1
on the kernel commandline during boot.
endmenu # "CPU/Task time and stats accounting" endmenu # "CPU/Task time and stats accounting"
config CPU_ISOLATION config CPU_ISOLATION
......
...@@ -291,16 +291,6 @@ static int __init do_reset(void) ...@@ -291,16 +291,6 @@ static int __init do_reset(void)
return 1; return 1;
} }
static int __init maybe_link(void)
{
if (nlink >= 2) {
char *old = find_link(major, minor, ino, mode, collected);
if (old)
return (ksys_link(old, collected) < 0) ? -1 : 1;
}
return 0;
}
static void __init clean_path(char *path, umode_t fmode) static void __init clean_path(char *path, umode_t fmode)
{ {
struct kstat st; struct kstat st;
...@@ -313,6 +303,18 @@ static void __init clean_path(char *path, umode_t fmode) ...@@ -313,6 +303,18 @@ static void __init clean_path(char *path, umode_t fmode)
} }
} }
static int __init maybe_link(void)
{
if (nlink >= 2) {
char *old = find_link(major, minor, ino, mode, collected);
if (old) {
clean_path(collected, 0);
return (ksys_link(old, collected) < 0) ? -1 : 1;
}
}
return 0;
}
static __initdata int wfd; static __initdata int wfd;
static int __init do_name(void) static int __init do_name(void)
......
...@@ -56,7 +56,7 @@ struct kcov { ...@@ -56,7 +56,7 @@ struct kcov {
struct task_struct *t; struct task_struct *t;
}; };
static bool check_kcov_mode(enum kcov_mode needed_mode, struct task_struct *t) static notrace bool check_kcov_mode(enum kcov_mode needed_mode, struct task_struct *t)
{ {
unsigned int mode; unsigned int mode;
...@@ -78,7 +78,7 @@ static bool check_kcov_mode(enum kcov_mode needed_mode, struct task_struct *t) ...@@ -78,7 +78,7 @@ static bool check_kcov_mode(enum kcov_mode needed_mode, struct task_struct *t)
return mode == needed_mode; return mode == needed_mode;
} }
static unsigned long canonicalize_ip(unsigned long ip) static notrace unsigned long canonicalize_ip(unsigned long ip)
{ {
#ifdef CONFIG_RANDOMIZE_BASE #ifdef CONFIG_RANDOMIZE_BASE
ip -= kaslr_offset(); ip -= kaslr_offset();
......
...@@ -136,8 +136,18 @@ ...@@ -136,8 +136,18 @@
static int psi_bug __read_mostly; static int psi_bug __read_mostly;
bool psi_disabled __read_mostly; DEFINE_STATIC_KEY_FALSE(psi_disabled);
core_param(psi_disabled, psi_disabled, bool, 0644);
#ifdef CONFIG_PSI_DEFAULT_DISABLED
bool psi_enable;
#else
bool psi_enable = true;
#endif
static int __init setup_psi(char *str)
{
return kstrtobool(str, &psi_enable) == 0;
}
__setup("psi=", setup_psi);
/* Running averages - we need to be higher-res than loadavg */ /* Running averages - we need to be higher-res than loadavg */
#define PSI_FREQ (2*HZ+1) /* 2 sec intervals */ #define PSI_FREQ (2*HZ+1) /* 2 sec intervals */
...@@ -169,8 +179,10 @@ static void group_init(struct psi_group *group) ...@@ -169,8 +179,10 @@ static void group_init(struct psi_group *group)
void __init psi_init(void) void __init psi_init(void)
{ {
if (psi_disabled) if (!psi_enable) {
static_branch_enable(&psi_disabled);
return; return;
}
psi_period = jiffies_to_nsecs(PSI_FREQ); psi_period = jiffies_to_nsecs(PSI_FREQ);
group_init(&psi_system); group_init(&psi_system);
...@@ -549,7 +561,7 @@ void psi_memstall_enter(unsigned long *flags) ...@@ -549,7 +561,7 @@ void psi_memstall_enter(unsigned long *flags)
struct rq_flags rf; struct rq_flags rf;
struct rq *rq; struct rq *rq;
if (psi_disabled) if (static_branch_likely(&psi_disabled))
return; return;
*flags = current->flags & PF_MEMSTALL; *flags = current->flags & PF_MEMSTALL;
...@@ -579,7 +591,7 @@ void psi_memstall_leave(unsigned long *flags) ...@@ -579,7 +591,7 @@ void psi_memstall_leave(unsigned long *flags)
struct rq_flags rf; struct rq_flags rf;
struct rq *rq; struct rq *rq;
if (psi_disabled) if (static_branch_likely(&psi_disabled))
return; return;
if (*flags) if (*flags)
...@@ -600,7 +612,7 @@ void psi_memstall_leave(unsigned long *flags) ...@@ -600,7 +612,7 @@ void psi_memstall_leave(unsigned long *flags)
#ifdef CONFIG_CGROUPS #ifdef CONFIG_CGROUPS
int psi_cgroup_alloc(struct cgroup *cgroup) int psi_cgroup_alloc(struct cgroup *cgroup)
{ {
if (psi_disabled) if (static_branch_likely(&psi_disabled))
return 0; return 0;
cgroup->psi.pcpu = alloc_percpu(struct psi_group_cpu); cgroup->psi.pcpu = alloc_percpu(struct psi_group_cpu);
...@@ -612,7 +624,7 @@ int psi_cgroup_alloc(struct cgroup *cgroup) ...@@ -612,7 +624,7 @@ int psi_cgroup_alloc(struct cgroup *cgroup)
void psi_cgroup_free(struct cgroup *cgroup) void psi_cgroup_free(struct cgroup *cgroup)
{ {
if (psi_disabled) if (static_branch_likely(&psi_disabled))
return; return;
cancel_delayed_work_sync(&cgroup->psi.clock_work); cancel_delayed_work_sync(&cgroup->psi.clock_work);
...@@ -637,7 +649,7 @@ void cgroup_move_task(struct task_struct *task, struct css_set *to) ...@@ -637,7 +649,7 @@ void cgroup_move_task(struct task_struct *task, struct css_set *to)
struct rq_flags rf; struct rq_flags rf;
struct rq *rq; struct rq *rq;
if (psi_disabled) { if (static_branch_likely(&psi_disabled)) {
/* /*
* Lame to do this here, but the scheduler cannot be locked * Lame to do this here, but the scheduler cannot be locked
* from the outside, so we move cgroups from inside sched/. * from the outside, so we move cgroups from inside sched/.
...@@ -673,7 +685,7 @@ int psi_show(struct seq_file *m, struct psi_group *group, enum psi_res res) ...@@ -673,7 +685,7 @@ int psi_show(struct seq_file *m, struct psi_group *group, enum psi_res res)
{ {
int full; int full;
if (psi_disabled) if (static_branch_likely(&psi_disabled))
return -EOPNOTSUPP; return -EOPNOTSUPP;
update_stats(group); update_stats(group);
......
...@@ -66,7 +66,7 @@ static inline void psi_enqueue(struct task_struct *p, bool wakeup) ...@@ -66,7 +66,7 @@ static inline void psi_enqueue(struct task_struct *p, bool wakeup)
{ {
int clear = 0, set = TSK_RUNNING; int clear = 0, set = TSK_RUNNING;
if (psi_disabled) if (static_branch_likely(&psi_disabled))
return; return;
if (!wakeup || p->sched_psi_wake_requeue) { if (!wakeup || p->sched_psi_wake_requeue) {
...@@ -86,7 +86,7 @@ static inline void psi_dequeue(struct task_struct *p, bool sleep) ...@@ -86,7 +86,7 @@ static inline void psi_dequeue(struct task_struct *p, bool sleep)
{ {
int clear = TSK_RUNNING, set = 0; int clear = TSK_RUNNING, set = 0;
if (psi_disabled) if (static_branch_likely(&psi_disabled))
return; return;
if (!sleep) { if (!sleep) {
...@@ -102,7 +102,7 @@ static inline void psi_dequeue(struct task_struct *p, bool sleep) ...@@ -102,7 +102,7 @@ static inline void psi_dequeue(struct task_struct *p, bool sleep)
static inline void psi_ttwu_dequeue(struct task_struct *p) static inline void psi_ttwu_dequeue(struct task_struct *p)
{ {
if (psi_disabled) if (static_branch_likely(&psi_disabled))
return; return;
/* /*
* Is the task being migrated during a wakeup? Make sure to * Is the task being migrated during a wakeup? Make sure to
...@@ -128,7 +128,7 @@ static inline void psi_ttwu_dequeue(struct task_struct *p) ...@@ -128,7 +128,7 @@ static inline void psi_ttwu_dequeue(struct task_struct *p)
static inline void psi_task_tick(struct rq *rq) static inline void psi_task_tick(struct rq *rq)
{ {
if (psi_disabled) if (static_branch_likely(&psi_disabled))
return; return;
if (unlikely(rq->curr->flags & PF_MEMSTALL)) if (unlikely(rq->curr->flags & PF_MEMSTALL))
......
...@@ -135,7 +135,6 @@ static void fill_pool(void) ...@@ -135,7 +135,6 @@ static void fill_pool(void)
if (!new) if (!new)
return; return;
kmemleak_ignore(new);
raw_spin_lock_irqsave(&pool_lock, flags); raw_spin_lock_irqsave(&pool_lock, flags);
hlist_add_head(&new->node, &obj_pool); hlist_add_head(&new->node, &obj_pool);
debug_objects_allocated++; debug_objects_allocated++;
...@@ -1128,7 +1127,6 @@ static int __init debug_objects_replace_static_objects(void) ...@@ -1128,7 +1127,6 @@ static int __init debug_objects_replace_static_objects(void)
obj = kmem_cache_zalloc(obj_cache, GFP_KERNEL); obj = kmem_cache_zalloc(obj_cache, GFP_KERNEL);
if (!obj) if (!obj)
goto free; goto free;
kmemleak_ignore(obj);
hlist_add_head(&obj->node, &objects); hlist_add_head(&obj->node, &objects);
}