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]
Date:   Fri, 22 Jan 2021 16:00:52 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Tom Zanussi <zanussi@...nel.org>
Cc:     axelrasmussen@...gle.com, mhiramat@...nel.org,
        dan.carpenter@...cle.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 2/6] tracing: Rework synthetic event command parsing

On Thu, 21 Jan 2021 11:01:05 -0600
Tom Zanussi <zanussi@...nel.org> wrote:

> @@ -1208,13 +1173,14 @@ static int __create_synth_event(int argc, const char *name, const char **argv)
>  	 *      where 'field' = type field_name
>  	 */
>  
> -	if (name[0] == '\0' || argc < 1) {
> +	mutex_lock(&event_mutex);

I'm curious, why is the event_mutex taken here? I'm guessing it is first
needed for the find_synth_event() call, in which case, it can be moved
after the is_good_name() check. I don't see why the goto out is required
here or for the is_good_name() check.

-- Steve

> +
> +	if (name[0] == '\0') {
>  		synth_err(SYNTH_ERR_CMD_INCOMPLETE, 0);
> -		return -EINVAL;
> +		ret = -EINVAL;
> +		goto out;
>  	}
>  
> -	mutex_lock(&event_mutex);
> -
>  	if (!is_good_name(name)) {
>  		synth_err(SYNTH_ERR_BAD_NAME, errpos(name));
>  		ret = -EINVAL;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ