Re: [PATCH 08/12] cgroup, memcg: move cgroup->event_list[_lock] and event callbacks into memcg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu 15-08-13 12:02:26, Tejun Heo wrote:
[...]
> @@ -6030,12 +6050,13 @@ static void cgroup_event_ptable_queue_proc(struct file *file,
>  static int cgroup_write_event_control(struct cgroup_subsys_state *css,
>  				      struct cftype *cft, const char *buffer)
>  {
> -	struct cgroup *cgrp = css->cgroup;
> +	struct mem_cgroup *memcg = mem_cgroup_from_css(css);
>  	struct cgroup_event *event;
>  	struct cgroup_subsys_state *cfile_css;
>  	unsigned int efd, cfd;
>  	struct file *efile;
>  	struct file *cfile;
> +	const char *name;
>  	char *endp;
>  	int ret;

AFAICS nothing prevents from registering a new event after css_offline
is done already which would lead to a mem leak. The we would need to do
css_tryget somewhere in the beginning. Or is there anything that would
prevent from that?

Other than that it looks correct to me. After the above concern is
sorted out:
Acked-by: Michal Hocko <mhocko@xxxxxxx>
-- 
Michal Hocko
SUSE Labs
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/containers




[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux