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:	Thu, 17 Nov 2011 09:29:24 +0000 (UTC)
From:	WANG Cong <xiyou.wangcong@...il.com>
To:	netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] net: add network priority cgroup infrastructure

On Wed, 16 Nov 2011 15:51:05 -0500, Neil Horman wrote:
 
> +static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp)
> +{
> +	struct cgroup_netprio_state *cs;
> +	struct net_device *dev;
> +
> +	cs = cgrp_netprio_state(cgrp);
> +	rtnl_lock();
> +	for_each_netdev(&init_net, dev) {
> +		if (dev->priomap)
> +			dev->priomap->priomap[cs->prioidx] = 0; 
> +	}
> +	rtnl_unlock();
> +	put_prioidx(cs->prioidx);
> +out_free:
> +	kfree(cs);
> +}

'out_free' is unused.


> +
> +static int write_priomap(struct cgroup *cgrp, struct cftype *cft, 
> +			 const char *buffer)
> +{
> +	char *devname = kstrdup(buffer, GFP_KERNEL); 
> +	int ret = -EINVAL;
> +	u32 prioidx = cgrp_netprio_state(cgrp)->prioidx; 
> +	unsigned long priority;
> +	char *priostr;
> +	struct net_device *dev;
> +
> +	devname = kstrdup(buffer, GFP_KERNEL); 


kstrdup() is called twice...


Thanks.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ