diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 1e04cd464af9b5ad961684dd358a97870bc36323..6ca7b97114f3c599d1fbb5c7beea0f7003bd4217 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -1138,8 +1138,10 @@ asmlinkage long sys_mq_getsetattr(mqd_t mqdes, omqstat.mq_flags = filp->f_flags & O_NONBLOCK; if (u_mqstat) { ret = audit_mq_getsetattr(mqdes, &mqstat); - if (ret != 0) - goto out; + if (ret != 0) { + spin_unlock(&info->lock); + goto out_fput; + } if (mqstat.mq_flags & O_NONBLOCK) filp->f_flags |= O_NONBLOCK; else