lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7cg0j3j-EXY2MULYWpyMri5_GxBnHVNvrHN4UG0pwsa=mw@mail.gmail.com>
Date:   Tue, 20 Oct 2020 14:43:16 +0900
From:   Namhyung Kim <namhyung@...nel.org>
To:     John Garry <john.garry@...wei.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>, Kajol Jain <kjain@...ux.ibm.com>,
        Ian Rogers <irogers@...gle.com>,
        Yao Jin <yao.jin@...ux.intel.com>, yeyunfeng@...wei.com,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Linuxarm <linuxarm@...wei.com>
Subject: Re: [PATCH 1/2] perf jevents: Tidy error handling

Hello,

On Tue, Oct 20, 2020 at 12:42 AM John Garry <john.garry@...wei.com> wrote:
>
> There is much duplication in the error handling for directory traversing
> for processing JSONs.
>
> Factor out the common code to tidy a bit.
>
> Signed-off-by: John Garry <john.garry@...wei.com>
> ---
[SNIP]
> -empty_map:
> +err_processing_std_arch_event_dir:
> +       err_string_ext = " for std arch event";
> +err_processing_dir:
> +       if (verbose || rc > 0) {
> +               pr_info("%s: Error walking file tree %s%s\n", prog, ldirname,
> +                       err_string_ext);

This was printed only if verbose is set but now changed.

Thanks
Namhyung


> +               empty_map = 1;
> +       } else {
> +               ret = 1;
> +       }
> +err_close_eventsfp:
>         fclose(eventsfp);
> -       create_empty_mapping(output_file);
> +       if (empty_map)
> +               create_empty_mapping(output_file);
> +err_out:
>         free_arch_std_events();
> -out_free_mapfile:
>         free(mapfile);
>         return ret;
>  }
> --
> 2.26.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ