From: clsoto@linux.vnet.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, ogerlitz@mellanox.com,
brking@linux.vnet.ibm.com,
Carol L Soto <clsoto@linux.vnet.ibm.com>
Subject: [PATCH net-next 1/3] net/mlx4_core: double free of dev_vfs
Date: Tue, 2 Jun 2015 16:07:23 -0500 [thread overview]
Message-ID: <1433279245-5577-1-git-send-email-clsoto@linux.vnet.ibm.com> (raw)
From: Carol L Soto <clsoto@linux.vnet.ibm.com>
If user loads mlx4_core with num_vfs greater than
supported then variable dev->dev_vfs is freed 2 times after unloading the
driver.
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
---
drivers/net/ethernet/mellanox/mlx4/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 0dbd704..9485cbe 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -2824,6 +2824,7 @@ disable_sriov:
free_mem:
dev->persist->num_vfs = 0;
kfree(dev->dev_vfs);
+ dev->dev_vfs = NULL;
return dev_flags & ~MLX4_FLAG_MASTER;
}
--
1.8.3.1
next reply other threads:[~2015-06-02 21:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 21:07 clsoto [this message]
2015-06-02 21:07 ` [PATCH net-next 2/3] net/mlx4_core: need to call close fw if alloc icm is called twice clsoto
2015-06-04 3:13 ` David Miller
2015-06-02 21:07 ` [PATCH net-next 3/3] net/mlx4_core: fix typo in mlx4_set_vf_mac clsoto
2015-06-04 3:13 ` David Miller
2015-06-04 3:13 ` [PATCH net-next 1/3] net/mlx4_core: double free of dev_vfs 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=1433279245-5577-1-git-send-email-clsoto@linux.vnet.ibm.com \
--to=clsoto@linux.vnet.ibm.com \
--cc=brking@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.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).