netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: socketcan@hartkopp.net
Cc: duanj.fnst@cn.fujitsu.com, lisovy@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: em_canid: remove useless statements from em_canid_change
Date: Sun, 22 Jun 2014 17:27:07 -0700 (PDT)	[thread overview]
Message-ID: <20140622.172707.816044847520857805.davem@davemloft.net> (raw)
In-Reply-To: <53A703F6.9090507@hartkopp.net>

From: Oliver Hartkopp <socketcan@hartkopp.net>
Date: Sun, 22 Jun 2014 18:27:34 +0200

> This is right for the first set of filters that is ever configured in
> em_canid_change().
> 
> But what happens in an update case?
> Does is turn the cm_old reference to a memory leak then?
> 
> Or do we always get a brand new "struct tcf_ematch *m" here??

There is only one call to this method is tcf_em_validate(), which also
unconditionally assigns new pointers to em->data without checking if
an existing non-NULL value is in em->data.  Specifically in the code
path where em->ops->change is not implemented.

      reply	other threads:[~2014-06-23  0:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18  8:48 [PATCH net-next] net: em_canid: remove useless statements from em_canid_change Duan Jiong
2014-06-21 22:40 ` David Miller
2014-06-22 16:27   ` Oliver Hartkopp
2014-06-23  0:27     ` David Miller [this message]

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=20140622.172707.816044847520857805.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=duanj.fnst@cn.fujitsu.com \
    --cc=lisovy@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    /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).