From: WANG Cong <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] net: add network priority cgroup infrastructure
Date: Thu, 17 Nov 2011 09:29:24 +0000 (UTC) [thread overview]
Message-ID: <ja2k5j$hca$1@dough.gmane.org> (raw)
In-Reply-To: 1321476666-8225-2-git-send-email-nhorman@tuxdriver.com
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.
next prev parent reply other threads:[~2011-11-17 9:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 20:51 [PATCH 0/2] net: Add network priority cgroup Neil Horman
2011-11-16 20:51 ` [PATCH 1/2] net: add network priority cgroup infrastructure Neil Horman
2011-11-17 9:29 ` WANG Cong [this message]
2011-11-17 11:25 ` John Fastabend
2011-11-17 11:56 ` Neil Horman
2011-11-16 20:51 ` [PATCH 2/2] net: add documentation for net_prio cgroups Neil Horman
2011-11-17 21:47 ` [PATCH 0/2] net: Add network priority cgroup (v2) Neil Horman
2011-11-17 21:47 ` [PATCH 1/2] net: add network priority cgroup infrastructure (v2) Neil Horman
2011-11-18 3:17 ` John Fastabend
2011-11-18 11:50 ` Neil Horman
2011-11-17 21:47 ` [PATCH 2/2] net: add documentation for net_prio cgroups (v2) Neil Horman
2011-11-18 16:13 ` [PATCH 0/2] net: Add network priority cgroup (v3) Neil Horman
2011-11-18 16:13 ` [PATCH 1/2] net: add network priority cgroup infrastructure (v3) Neil Horman
2011-11-21 20:39 ` David Miller
2011-11-21 20:43 ` Neil Horman
2011-11-18 16:13 ` [PATCH 2/2] net: add documentation for net_prio cgroups (v3) Neil Horman
2011-11-22 15:10 ` [PATCH 0/2] net: Add network priority cgroup (v4) Neil Horman
2011-11-22 15:10 ` [PATCH 1/2] net: add network priority cgroup infrastructure (v4) Neil Horman
2011-11-22 15:10 ` [PATCH 2/2] net: add documentation for net_prio cgroups (v4) Neil Horman
2011-11-22 20:23 ` [PATCH 0/2] net: Add network priority cgroup (v4) David Miller
2011-11-22 20:39 ` Neil Horman
2011-11-22 20:45 ` David Miller
2011-11-22 21:00 ` Neil Horman
2011-11-23 10:19 ` Kirill Smelkov
2011-11-23 11:49 ` Neil Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ja2k5j$hca$1@dough.gmane.org' \
--to=xiyou.wangcong@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).