From: Gao feng <gaofeng@cn.fujitsu.com>
To: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] netconsole: enable netconsole can make net_device refcnt
Date: Tue, 11 Oct 2011 16:05:48 +0800 [thread overview]
Message-ID: <4E93F8DC.5080909@cn.fujitsu.com> (raw)
In-Reply-To: <1318319438-7159-1-git-send-email-gaowanlong@cn.fujitsu.com>
Im so sorry.
the first patch has some format err.
Please use this one.
thanks wanlong! ^V^
11.10.2011 15:50, Wanlong Gao wrote:
> There is no check if netconsole is enabled current.
> so when exec echo 1 > enabled;
> the reference of net_device will increment always.
>
> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
> ---
> drivers/net/netconsole.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
> index ed2a397..4e6323df 100644
> --- a/drivers/net/netconsole.c
> +++ b/drivers/net/netconsole.c
> @@ -307,6 +307,8 @@ static ssize_t store_enabled(struct netconsole_target *nt,
> return err;
> if (enabled < 0 || enabled > 1)
> return -EINVAL;
> + if (enabled == nt->enabled)
> + return err;
>
> if (enabled) { /* 1 */
>
next prev parent reply other threads:[~2011-10-11 8:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 6:29 [PATCH] netconsole: enable netconsole can make net_device refcnt incorrent Gao feng
2011-10-11 7:50 ` [PATCH] netconsole: enable netconsole can make net_device refcnt Wanlong Gao
2011-10-11 8:05 ` Gao feng [this message]
2011-10-12 1:11 ` Flavio Leitner
2011-10-12 1:45 ` Gao feng
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=4E93F8DC.5080909@cn.fujitsu.com \
--to=gaofeng@cn.fujitsu.com \
--cc=davem@davemloft.net \
--cc=gaowanlong@cn.fujitsu.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).