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: <20110824022831.GF28444@count0.beaverton.ibm.com>
Date:	Tue, 23 Aug 2011 19:28:31 -0700
From:	Matt Helsley <matthltc@...ibm.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	rjw@...k.pl, menage@...gle.com, linux-kernel@...r.kernel.org,
	arnd@...db.de, oleg@...hat.com
Subject: Re: [PATCH 05/16] freezer: rename thaw_process() to __thaw_task()
 and simplify the implementation

On Fri, Aug 19, 2011 at 04:16:11PM +0200, Tejun Heo wrote:
> thaw_process() now has only internal users - system and cgroup
> freezers.  Remove the unnecessary return value, rename, unexport and
> collapse __thaw_process() into it.  This will help further updates to
> the freezer code.

<snip>

> diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c
> index e691818..e7fa0ec 100644
> --- a/kernel/cgroup_freezer.c
> +++ b/kernel/cgroup_freezer.c

<snip (Looks fine)>

> diff --git a/kernel/freezer.c b/kernel/freezer.c
> index 656492c..f5db7fd 100644
> --- a/kernel/freezer.c
> +++ b/kernel/freezer.c

<snip>

> @@ -164,15 +154,17 @@ static int __thaw_process(struct task_struct *p)
>   * refrigerator() could call frozen_process(), in which case the task would be
>   * frozen and no one would thaw it.
>   */
> -int thaw_process(struct task_struct *p)
> +void __thaw_task(struct task_struct *p)
>  {
> +	bool was_frozen;
> +
>  	task_lock(p);
> -	if (__thaw_process(p) == 1) {
> -		task_unlock(p);
> -		wake_up_process(p);
> -		return 1;
> -	}
> +	if ((was_frozen = frozen(p)))

Style nit: I think this form is preferable:

	was_frozen = frozen(p);
	if (was_frozen)
		...

However I know Rafael already pulled this so I don't
know if it's worth bothering.

Cheers,
	-Matt Helsley
--
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