Skip to content

Commit

Permalink
ipc/util.h: update documentation for ipc_getref() and ipc_putref()
Browse files Browse the repository at this point in the history
Now that ipc_rcu_alloc() and ipc_rcu_free() are removed,
document when it is valid to use ipc_getref() and ipc_putref().

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Manfred Spraul <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: Kees Cook <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
manfred-colorfu authored and hnaz committed Jun 2, 2017
1 parent e14846a commit 94aec75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ipc/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flg);
* Objects are reference counted, they start with reference count 1.
* getref increases the refcount, the putref call that reduces the recount
* to 0 schedules the rcu destruction. Caller must guarantee locking.
*
* refcount is initialized by ipc_addid(), before that point call_rcu()
* must be used.
*/
int ipc_rcu_getref(struct kern_ipc_perm *ptr);
void ipc_rcu_putref(struct kern_ipc_perm *ptr,
Expand Down

0 comments on commit 94aec75

Please sign in to comment.