lkml.org 
[lkml]   [2022]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] mm/damon/dbgfs: avoid duplicate context directory creation
From
On 8/20/22 00:19, SeongJae Park wrote:
> From: Badari Pulavarty <badari.pulavarty@intel.com>
>
> When user tries to create a DAMON context via the DAMON debugfs
> interface with a name of an already existing context, the context
> directory creation silently fails but the context is added in the
> internal data structure. As a result, memory could leak and DAMON
> cannot be turned on. An example test case is as below:
>
> # cd /sys/kernel/debug/damon/
> # echo "off" > monitor_on
> # echo paddr > target_ids
> # echo "abc" > mk_context
> # echo "abc" > mk_context
> # echo $$ > abc/target_ids
> # echo "on" > monitor_on <<< fails
>
> This commit fixes the issue by checking if the name already exist and
> immediately returning '-EEXIST' in the case.
>

Meh...

SJ, I have seen most (if not all of) your patches uses descriptive mood
instead of imperative. Better say "Fix the issue by checking ...".

--
An old man doll... just what I always wanted! - Clara

\
 
 \ /
  Last update: 2022-08-20 04:31    [W:0.068 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site