Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1531291

Re: [PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL context

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL context
Date 2016-11-28 14:00 +0100
Message-ID <sItHj-2cp-13@gated-at.bofh.it> (permalink)
References <sIteh-22H-3@gated-at.bofh.it> <sIteh-22H-25@gated-at.bofh.it> <sItxD-29e-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Nov 28, 2016 at 01:42:26PM +0100, Maarten Lankhorst wrote:

> > +	ww_mutex_lock(&resv->lock.base, NULL);
> Yuck, can we rename base to __NEVER_TOUCH_DIRECTLY_OUTSIDE_LOCKING_CORE?
> It's harder to get them confused like that, even with a null context it's illegal to call mutex_lock/unlock directly.

I think there's a __private sparse annotation that could be used.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL context Nicolai Hähnle <nhaehnle@gmail.com> - 2016-11-28 13:30 +0100
  Re: [PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL  context Maarten Lankhorst <dev@mblankhorst.nl> - 2016-11-28 13:50 +0100
    Re: [PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL  context Peter Zijlstra <peterz@infradead.org> - 2016-11-28 14:00 +0100
  Re: [PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL  context Christian König <deathsimple@vodafone.de> - 2016-11-28 14:00 +0100

csiph-web