diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2016-11-17 13:12:33 +0000 |
---|---|---|
committer | Daniel Thompson <daniel.thompson@linaro.org> | 2017-03-29 17:02:09 +0100 |
commit | 660f38b6a61ab655d65bf3370fe909c8ed0f6d2c (patch) | |
tree | 416cbe2bd3af67e3ca3e2ab58b284c27f0909377 | |
parent | 57d7ca934f47555ca45acbca1f07a4e72776a7a4 (diff) | |
download | linux-660f38b6a61ab655d65bf3370fe909c8ed0f6d2c.tar.gz |
BUG HUNTING: Big pile of additional irqs_disabled() tests
Most of these do not trigger on rel10p0. Leads to the conclusion that
something came along and crapped over the PMR registers.
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
-rw-r--r-- | arch/arm64/mm/fault.c | 2 | ||||
-rw-r--r-- | fs/buffer.c | 4 | ||||
-rw-r--r-- | fs/ext4/inode.c | 2 | ||||
-rw-r--r-- | fs/ext4/namei.c | 2 | ||||
-rw-r--r-- | fs/open.c | 2 | ||||
-rw-r--r-- | kernel/softirq.c | 3 |
6 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 156169c6981b..fda99f136f48 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -304,6 +304,8 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr, tsk = current; mm = tsk->mm; + BUG_ON(irqs_disabled()); + /* * If we're in an interrupt or have no user context, we must not take * the fault. diff --git a/fs/buffer.c b/fs/buffer.c index 0e87401cf335..54272cb767e6 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1268,6 +1268,10 @@ static DEFINE_PER_CPU(struct bh_lru, bh_lrus) = {{ NULL }}; static inline void check_irqs_on(void) { #ifdef irqs_disabled + if (irqs_disabled()) { + pr_crit("flags: %x\n", arch_local_save_flags()); + + } BUG_ON(irqs_disabled()); #endif } diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 88d57af1b516..24b935e3c864 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4550,6 +4550,8 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino) gid_t i_gid; projid_t i_projid; + BUG_ON(irqs_disabled()); + inode = iget_locked(sb, ino); if (!inode) return ERR_PTR(-ENOMEM); diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index eadba919f26b..03822ebcf0f2 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1570,6 +1570,8 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, unsi struct ext4_dir_entry_2 *de; struct buffer_head *bh; + BUG_ON(irqs_disabled()); + if (ext4_encrypted_inode(dir)) { int res = fscrypt_get_encryption_info(dir); diff --git a/fs/open.c b/fs/open.c index 9921f70bc5ca..0e3a643e3243 100644 --- a/fs/open.c +++ b/fs/open.c @@ -1041,6 +1041,8 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode) int fd = build_open_flags(flags, mode, &op); struct filename *tmp; + BUG_ON(irqs_disabled()); + if (fd) return fd; diff --git a/kernel/softirq.c b/kernel/softirq.c index 744fa611cae0..b1870343667f 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -158,7 +158,8 @@ EXPORT_SYMBOL(_local_bh_enable); void __local_bh_enable_ip(unsigned long ip, unsigned int cnt) { - WARN_ON_ONCE(in_irq() || irqs_disabled()); + WARN_ON_ONCE(in_irq()); + WARN_ON_ONCE(irqs_disabled()); #ifdef CONFIG_TRACE_IRQFLAGS local_irq_disable(); #endif |