From: Flavio Leitner <fbl@redhat.com>
To: Gao feng <gaofeng@cn.fujitsu.com>
Cc: Wanlong Gao <gaowanlong@cn.fujitsu.com>,
netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] netconsole: enable netconsole can make net_device refcnt
Date: Tue, 11 Oct 2011 22:11:48 -0300 [thread overview]
Message-ID: <20111011221148.2ef4487d@asterix.rh> (raw)
In-Reply-To: <4E93F8DC.5080909@cn.fujitsu.com>
On Tue, 11 Oct 2011 16:05:48 +0800
Gao feng <gaofeng@cn.fujitsu.com> wrote:
> 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;
It looks like 'err' will be 0. Maybe it is better to
return -EINVAL?
fbl
next prev parent reply other threads:[~2011-10-12 1:11 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
2011-10-12 1:11 ` Flavio Leitner [this message]
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=20111011221148.2ef4487d@asterix.rh \
--to=fbl@redhat.com \
--cc=davem@davemloft.net \
--cc=gaofeng@cn.fujitsu.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.