diff mbox

[v2,2/2] dma-buf: clarify locking documentation for reservation_object_get_excl

Message ID 20180111165302.25556-2-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Stach Jan. 11, 2018, 4:53 p.m. UTC
The documentation was misleading, as for a lot of use-cases holding
the RCU read side lock is sufficient.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 include/linux/reservation.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/include/linux/reservation.h b/include/linux/reservation.h
index 21fc84d82d41..ae1175e5997c 100644
--- a/include/linux/reservation.h
+++ b/include/linux/reservation.h
@@ -204,7 +204,8 @@  reservation_object_unlock(struct reservation_object *obj)
  * @obj: the reservation object
  *
  * Returns the exclusive fence (if any).  Does NOT take a
- * reference.  The obj->lock must be held.
+ * reference. Writers must hold obj->lock, readers may only
+ * hold a RCU read side lock.
  *
  * RETURNS
  * The exclusive fence or NULL