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:	Tue, 22 Apr 2008 08:01:22 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Jens Axboe <jens.axboe@...cle.com>
cc:	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	npiggin@...e.de
Subject: Re: [PATCH 1/11] Add generic helpers for arch IPI function calls



On Tue, 22 Apr 2008, Jens Axboe wrote:
> > 
> > You forgot to free the "data" here? The waiter must also free the object, 
> > since now the callee does not.
> 
> The ipi interrupt handler does that, see kfree() in
> generic_smp_call_function_single_interrupt() or call_func_data_free() in
> generic_smp_call_function_interrupt().

Hell no, it does *not*.

Doing that for the waiting case would be a *huge* bug, since the waiter 
needs to wait until the flag is clear - and if the waitee free's the 
allocation, that will never happen.

So the rule *must* be:
 - waiter frees
 - ipi interrupt frees non-waiting ones.
because anything else cannot work.

And you must have known that, because the code you pointed me to does 
*not* free the data at all. It just clears the FLAG_WAIT flag:

	+               if (data->csd.flags & CSD_FLAG_WAIT) {
	+                       smp_wmb();
	+                       data->csd.flags &= ~CSD_FLAG_WAIT;
	+               } else
	+                       call_func_data_free(data);

So please think about this some more. 

		Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ