lkml.org 
[lkml]   [2023]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 01/26] selftests/resctrl: Don't use ctrlc_handler() outside signal handling
From
Hi Ilpo,

On 11/20/2023 3:13 AM, Ilpo Järvinen wrote:
> perf_event_open_llc_miss() calls ctrlc_handler() to cleanup if
> perf_event_open() returns an error. Those cleanups, however, are not
> the responsability of perf_event_open_llc_miss() and it thus interferes

responsibility

> unnecessarily with the usual cleanup pattern. Worse yet,
> ctrlc_handler() calls exit() in the end preventing the ordinary cleanup
> done in the calling function from executing.
>
> ctrlc_handler() should only be used as a signal handler, not during
> normal error handling.
>
> Remove call to ctrlc_handler() from perf_event_open_llc_miss(). As
> unmounting resctrlfs and test cleanup are already handled properly
> by error rollbacks in the calling functions, no other changes are
> necessary.
>
> Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>

Reinette

\
 
 \ /
  Last update: 2023-11-28 23:10    [W:0.277 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site