aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm64/mm/fault.c2
-rw-r--r--fs/buffer.c4
-rw-r--r--fs/ext4/inode.c2
-rw-r--r--fs/ext4/namei.c2
-rw-r--r--fs/open.c2
-rw-r--r--kernel/softirq.c3
6 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 4bf899fb451b..c19aa0733610 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -305,6 +305,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 9196f2a270da..c24fa6e34359 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1269,6 +1269,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 4247d8d25687..0a3cdabc4ea2 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4586,6 +4586,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 6ad612c576fc..eefa176f4877 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1572,6 +1572,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 949cef29c3bb..571f6c408165 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -1039,6 +1039,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