lkml.org 
[lkml]   [2019]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/17] perf data: Fail check_backup in case of error
On Thu, Feb 21, 2019 at 10:41:32AM +0100, Jiri Olsa wrote:
> And display the error message from removing
> the old data file:
>
> $ perf record ls
> Can't remove old data: Permission denied (perf.data.old)
> Perf session creation failed.
>
> Not sure how to make fail the rename (after we successfully
> remove the destination file/dir) to show the message,
> anyway let's have it there.

The use of rm_rf is really scary. So I simple command line typo could turn
this into rm -rf / ?

Please add some sanity checks to not remove multiple levels,
and only remove files which look like they are generated
by perf.

-Andi

\
 
 \ /
  Last update: 2019-02-21 23:24    [W:0.237 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site