netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Shearman <rshearma@brocade.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, Tom Herbert <tom@herbertland.com>,
	Roopa Prabhu <roopa@cumulusnetworks.com>,
	David Lebrun <david.lebrun@uclouvain.be>,
	"Thomas Graf" <tgraf@suug.ch>,
	David Ahern <dsa@cumulusnetworks.com>,
	Robert Shearman <rshearma@brocade.com>
Subject: [PATCH net v2 0/2] net: Fix oops on state free after lwt module unload
Date: Sat, 21 Jan 2017 00:21:24 +0000	[thread overview]
Message-ID: <1484958086-6151-1-git-send-email-rshearma@brocade.com> (raw)
In-Reply-To: <1484753523-26230-1-git-send-email-rshearma@brocade.com>

An oops is seen in lwtstate_free after an lwt ops module has been
unloaded. This patchset fixes this by preventing modules implementing
lwtunnel ops from being unloaded whilst there's state alive using
those ops. The first patch adds fills in a new owner field in all lwt
ops and the second patch makes use of this to reference count the
modules as state is built and destroyed using them.

Changes in v2:
 - specify module owner for all modules as suggested by DaveM
 - reference count all modules building lwt state, not just those ops
   implementing destroy_state, as also suggested by DaveM.
 - rebased on top of David Ahern's lwtunnel changes

Robert Shearman (2):
  net: Specify the owning module for lwtunnel ops
  lwtunnel: Fix oops on state free after encap module unload

 include/net/lwtunnel.h    | 2 ++
 net/core/lwt_bpf.c        | 1 +
 net/core/lwtunnel.c       | 9 +++++++--
 net/ipv4/ip_tunnel_core.c | 2 ++
 net/ipv6/ila/ila_lwt.c    | 1 +
 net/ipv6/seg6_iptunnel.c  | 1 +
 net/mpls/mpls_iptunnel.c  | 1 +
 7 files changed, 15 insertions(+), 2 deletions(-)

-- 
2.1.4

  parent reply	other threads:[~2017-01-21  0:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18 15:32 [PATCH net 0/2] net: Fix oops on state free after lwt module unload Robert Shearman
2017-01-18 15:32 ` [PATCH net 1/2] lwtunnel: Fix oops on state free after encap " Robert Shearman
2017-01-18 15:32 ` [PATCH net 2/2] ila: Fix memory leak of lwt dst cache on " Robert Shearman
2017-01-20 17:03 ` [PATCH net 0/2] net: Fix oops on state free after lwt " David Miller
2017-01-20 20:21   ` Robert Shearman
2017-01-21  0:21 ` Robert Shearman [this message]
2017-01-21  0:21   ` [PATCH net v2 1/2] net: Specify the owning module for lwtunnel ops Robert Shearman
2017-01-21  0:21   ` [PATCH net v2 2/2] lwtunnel: Fix oops on state free after encap module unload Robert Shearman
2017-01-23 20:42     ` David Miller
2017-01-24 16:26       ` Robert Shearman
2017-01-24 16:26   ` [PATCH net v3 0/2] net: Fix oops on state free after lwt " Robert Shearman
2017-01-24 16:26     ` [PATCH net v3 1/2] net: Specify the owning module for lwtunnel ops Robert Shearman
2017-01-24 16:26     ` [PATCH net v3 2/2] lwtunnel: Fix oops on state free after encap module unload Robert Shearman
2017-01-24 21:21     ` [PATCH net v3 0/2] net: Fix oops on state free after lwt " David Miller

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=1484958086-6151-1-git-send-email-rshearma@brocade.com \
    --to=rshearma@brocade.com \
    --cc=davem@davemloft.net \
    --cc=david.lebrun@uclouvain.be \
    --cc=dsa@cumulusnetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    --cc=tgraf@suug.ch \
    --cc=tom@herbertland.com \
    /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).