]> err.no Git - linux-2.6/blobdiff - ipc/mqueue.c
Merge branch 'for-2.6.25' of git://git.secretlab.ca/git/linux-2.6-mpc52xx into for...
[linux-2.6] / ipc / mqueue.c
index 1e04cd464af9b5ad961684dd358a97870bc36323..6ca7b97114f3c599d1fbb5c7beea0f7003bd4217 100644 (file)
@@ -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