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: <20250105180013.98eab05796c20d529df4aae8@kernel.org>
Date: Sun, 5 Jan 2025 18:00:13 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>, Peter Zijlstra
 <peterz@...radead.org>, Anil S Keshavamurthy
 <anil.s.keshavamurthy@...el.com>, "David S . Miller" <davem@...emloft.net>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Tzvetomir Stoyanov
 <tz.stoyanov@...il.com>, Naveen N Rao <naveen@...nel.org>, Josh Poimboeuf
 <jpoimboe@...nel.org>, Jason Baron <jbaron@...mai.com>, Ard Biesheuvel
 <ardb@...nel.org>, linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH 2/6] Provide __free(argv) for argv_split() users

On Sat, 4 Jan 2025 12:09:56 +0100
Oleg Nesterov <oleg@...hat.com> wrote:

> On 01/04, Masami Hiramatsu (Google) wrote:
> >
> > +DEFINE_FREE(argv, char **, argv_free(_T))
> 
> This doesn't look right, I think we need
> 
> 	DEFINE_FREE(argv, char **, if (_T) argv_free(_T))

Ah, yes. I misunderstood argv_free() can get NULL.

Thanks!

> 
> ?
> 
> From the next patch
> 
> 	@@ -73,24 +73,20 @@ int dyn_event_release(const char *raw_command, struct dyn_event_operations *type
> 		struct dyn_event *pos, *n;
> 		char *system = NULL, *event, *p;
> 		int argc, ret = -ENOENT;
> 	-	char **argv;
> 	+	char **argv __free(argv) = NULL;
> 	 
> 		argv = argv_split(GFP_KERNEL, raw_command, &argc);
> 		if (!argv)
> 			return -ENOMEM;
> 
> if argv_split() returns NULL, then __free_argv() will call argv_free(NULL) ?
> 
> Oleg.
> 
> 


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ