- ipc-integrate-ipc_checkid-into-ipc_lock-fix-3.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     IPC: sleeping function called ...
has been removed from the -mm tree.  Its filename was
     ipc-integrate-ipc_checkid-into-ipc_lock-fix-3.patch

This patch was dropped because it was folded into ipc-integrate-ipc_checkid-into-ipc_lock.patch

------------------------------------------------------
Subject: IPC: sleeping function called ...
From: Nadia Derbey <Nadia.Derbey@xxxxxxxx>

This patch fixes the missing rcu_read_(un)lock in the ipc code

Signed-off-by: Nadia Derbey <Nadia.Derbey@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 ipc/util.c |    3 ++-
 ipc/util.h |    4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff -puN ipc/util.c~ipc-integrate-ipc_checkid-into-ipc_lock-fix-3 ipc/util.c
--- a/ipc/util.c~ipc-integrate-ipc_checkid-into-ipc_lock-fix-3
+++ a/ipc/util.c
@@ -295,6 +295,7 @@ int ipc_addid(struct ipc_ids* ids, struc
 
 	spin_lock_init(&new->lock);
 	new->deleted = 0;
+	rcu_read_lock();
 	spin_lock(&new->lock);
 	return id;
 }
@@ -690,7 +691,7 @@ struct kern_ipc_perm *ipc_lock(struct ip
 		rcu_read_unlock();
 		return ERR_PTR(-EINVAL);
 	}
-	rcu_read_unlock();
+
 	return out;
 }
 
diff -puN ipc/util.h~ipc-integrate-ipc_checkid-into-ipc_lock-fix-3 ipc/util.h
--- a/ipc/util.h~ipc-integrate-ipc_checkid-into-ipc_lock-fix-3
+++ a/ipc/util.h
@@ -135,12 +135,14 @@ static inline int ipc_checkid(struct ipc
 
 static inline void ipc_lock_by_ptr(struct kern_ipc_perm *perm)
 {
+	rcu_read_lock();
 	spin_lock(&perm->lock);
 }
 
 static inline void ipc_unlock(struct kern_ipc_perm *perm)
 {
 	spin_unlock(&perm->lock);
+	rcu_read_unlock();
 }
 
 static inline struct kern_ipc_perm *ipc_lock_check(struct ipc_ids *ids,
@@ -153,7 +155,7 @@ static inline struct kern_ipc_perm *ipc_
 		return out;
 
 	if (ipc_checkid(ids, out, id)) {
-		spin_unlock(&out->lock);
+		ipc_unlock(out);
 		return ERR_PTR(-EIDRM);
 	}
 
_

Patches currently in -mm which might be from Nadia.Derbey@xxxxxxxx are

ipc-store-ipcs-into-idrs.patch
ipc-unify-the-syscalls-code.patch
ipc-remove-the-ipc_get-routine.patch
ipc-integrate-ipc_checkid-into-ipc_lock.patch
ipc-integrate-ipc_checkid-into-ipc_lock-fix-3.patch
storing-ipcs-into-idrs.patch
ipc-introduce-the-ipcid_to_idx-macro.patch
ipc-inline-ipc_buildid.patch
ipc_fix_wrong_comments.patch
fix-idr_find-locking.patch
ipc-remove-unneeded-parameters.patch
ipc-cleanup-some-code-and-wrong-comments-about-semundo.patch
virtualization-of-sysv-msg-queues-is-incomplete.patch
ipc-fix-error-case-when-idr-cache-is-empty-in-ipcget.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux