diff --git a/fs/fcntl.c b/fs/fcntl.c index dfc72f15be7f..1e2fe2386ca3 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -207,8 +207,9 @@ static int f_getown_ex(struct file *filp, unsigned long arg) struct f_owner_ex __user *owner_p = (void __user *)arg; struct f_owner_ex owner = {}; int ret = 0; + unsigned long flags; - read_lock(&filp->f_owner.lock); + read_lock_irqsave(&filp->f_owner.lock, flags); rcu_read_lock(); if (pid_task(filp->f_owner.pid, filp->f_owner.pid_type)) owner.pid = pid_vnr(filp->f_owner.pid); @@ -231,7 +232,7 @@ static int f_getown_ex(struct file *filp, unsigned long arg) ret = -EINVAL; break; } - read_unlock(&filp->f_owner.lock); + read_unlock_irqrestore(&filp->f_owner.lock, flags); if (!ret) { ret = copy_to_user(owner_p, &owner, sizeof(owner));