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] [day] [month] [year] [list]
Message-ID: <20080604134116.GD16854@us.ibm.com>
Date:	Wed, 4 Jun 2008 08:41:16 -0500
From:	"Serge E. Hallyn" <serue@...ibm.com>
To:	Pavel Emelyanov <xemul@...nvz.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Serge Hallyn <serue@...ibm.com>,
	Paul Menage <menage@...gle.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] devcgroup: make a helper to convert
	cgroup_subsys_state to devs_cgroup

Quoting Pavel Emelyanov (xemul@...nvz.org):
> This is just picking the container_of out of cgroup_to_devcgroup into
> a separate function.
> 
> This new css_to_devcgroup will be used in the 2nd patch.
> 
> Signed-off-by: Pavel Emelyanov <xemul@...nvz.org>

Thanks, Pavel.

Acked-by: Serge Hallyn <serue@...ibm.com>

to both, obviously.

-serge

> ---
>  security/device_cgroup.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/security/device_cgroup.c b/security/device_cgroup.c
> index 4ea5836..15f2f80 100644
> --- a/security/device_cgroup.c
> +++ b/security/device_cgroup.c
> @@ -49,10 +49,14 @@ struct dev_cgroup {
>  	spinlock_t lock;
>  };
> 
> +static inline struct dev_cgroup *css_to_devcgroup(struct cgroup_subsys_state *s)
> +{
> +	return container_of(s, struct dev_cgroup, css);
> +}
> +
>  static inline struct dev_cgroup *cgroup_to_devcgroup(struct cgroup *cgroup)
>  {
> -	return container_of(cgroup_subsys_state(cgroup, devices_subsys_id),
> -			    struct dev_cgroup, css);
> +	return css_to_devcgroup(cgroup_subsys_state(cgroup, devices_subsys_id));
>  }
> 
>  struct cgroup_subsys devices_subsys;
> -- 
> 1.5.3.4
--
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