lkml.org 
[lkml]   [2020]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/9] mm, slub: introduce kmem_cache_debug_flags()
On Thu, Jun 18, 2020 at 10:37:07AM +0200, Vlastimil Babka wrote:
> On 6/10/20 6:31 PM, Vlastimil Babka wrote:
> > There are few places that call kmem_cache_debug(s) (which tests if any of debug
> > flags are enabled for a cache) immediatelly followed by a test for a specific
> > flag. The compiler can probably eliminate the extra check, but we can make the
> > code nicer by introducing kmem_cache_debug_flags() that works like
> > kmem_cache_debug() (including the static key check) but tests for specifig
> > flag(s). The next patches will add more users.
> >
> > Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
>
> Please add this fixup per reviews.
> ----8<----
> From 25793252a31a36f8d1d4ccf0f27ed3e43fba54d8 Mon Sep 17 00:00:00 2001
> From: Vlastimil Babka <vbabka@suse.cz>
> Date: Thu, 18 Jun 2020 10:34:53 +0200
> Subject: [PATCH] mm, slub: introduce kmem_cache_debug_flags()-fix
>
> Change return from int to bool, per Kees.
> Add VM_WARN_ON_ONCE() for invalid flags, per Roman.
>
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

Acked-by: Kees Cook <keescook@chromium.org>

--
Kees Cook

\
 
 \ /
  Last update: 2020-06-18 21:57    [W:0.070 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site