[lkml]   [2018]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] mm/kasan: make quarantine_lock a raw_spinlock_t
On Wed, 10 Oct 2018 23:49:45 +0200 Sebastian Andrzej Siewior <> wrote:

> On 2018-10-10 11:57:41 [+0200], Dmitry Vyukov wrote:
> > Yes. Clark's patch looks good to me. Probably would be useful to add a
> > comment as to why raw spinlock is used (otherwise somebody may
> > refactor it back later).
> If you really insist, I could add something but this didn't happen so
> far. git's changelog should provide enough information why to why it was
> changed.

Requiring code readers to look up changelogs in git is rather user-hostile.
There are several reasons for using raw_*, so an explanatory comment at
each site is called for.

However it would be smarter to stop "using raw_* for several reasons".
Instead, create a differently named variant for each such reason. ie, do

* Nice comment goes here. It explains all the possible reasons why -rt
* might use a raw_spin_lock when a spin_lock could otherwise be used.
#define raw_spin_lock_for_rt raw_spinlock

Then use raw_spin_lock_for_rt() at all such sites.

 \ /
  Last update: 2018-10-13 01:58    [W:0.118 / U:1.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site