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
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux