From: Alexander Duyck <alexander.h.duyck@intel.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, jeffrey.t.kirsher@intel.com, edumazet@google.com
Subject: [v2 PATCH 4/4] ixgbe: Fix use after free on module remove
Date: Thu, 03 May 2012 00:19:14 -0700 [thread overview]
Message-ID: <20120503071914.13636.31157.stgit@gitlad.jf.intel.com> (raw)
In-Reply-To: <20120503071141.13636.37564.stgit@gitlad.jf.intel.com>
While testing the TCP changes I had to fix an issue in order to be able to
load and unload the module.
The recent patch that added thermal sensor support added a use after free
bug on module unload with an 82598 adapter in the system. To resolve the
issue I have updated the code so that when we free the info_kobj we set it
back to NULL.
I suspect there are likely other bugs present, but I will leave that for
another patch that can undergo more testing.
I am submitting this directly to net-next since this fixes a fairly serious
bug that will lock up the ixgbe module until the system is rebooted.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c
index aa41fb7..f81c166 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c
@@ -185,8 +185,10 @@ static void ixgbe_sysfs_del_adapter(struct ixgbe_adapter *adapter)
hwmon_device_unregister(adapter->ixgbe_hwmon_buff.device);
#endif /* CONFIG_IXGBE_HWMON */
- if (adapter->info_kobj != NULL)
+ if (adapter->info_kobj != NULL) {
kobject_put(adapter->info_kobj);
+ adapter->info_kobj = NULL;
+ }
}
/* called from ixgbe_main.c */
next prev parent reply other threads:[~2012-05-03 7:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 7:18 [v2 PATCH 0/4] Cleanup tcp_try_coalesce, fix module lockup on ixgbe Alexander Duyck
2012-05-03 7:18 ` [v2 PATCH 1/4] tcp: Fix truesize accounting in tcp_try_coalesce Alexander Duyck
2012-05-03 7:48 ` Eric Dumazet
2012-05-03 8:21 ` David Miller
2012-05-03 9:33 ` [PATCH net-next] net: Fix truesize accounting in skb_gro_receive() Eric Dumazet
2012-05-03 10:48 ` Alexander Duyck
2012-05-03 17:22 ` David Miller
2012-05-03 7:19 ` [v2 PATCH 2/4] tcp: Move code related to head frag in tcp_try_coalesce Alexander Duyck
2012-05-03 7:50 ` Eric Dumazet
2012-05-03 8:22 ` David Miller
2012-05-03 7:19 ` [v2 PATCH 3/4] tcp: move stats merge to the end of tcp_try_coalesce Alexander Duyck
2012-05-03 7:52 ` Eric Dumazet
2012-05-03 8:22 ` David Miller
2012-05-03 7:19 ` Alexander Duyck [this message]
2012-05-03 8:22 ` [v2 PATCH 4/4] ixgbe: Fix use after free on module remove 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=20120503071914.13636.31157.stgit@gitlad.jf.intel.com \
--to=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jeffrey.t.kirsher@intel.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.