lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 8 May 2008 14:51:23 -0400
From:	"John W. Linville" <linville@...driver.com>
To:	David Miller <davem@...emloft.net>
Cc:	xemul@...nvz.org, johannes@...solutions.net, netdev@...eo.de,
	linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 1/4][MAC80211]: Fix GFP_KERNEL allocation under read
	lock.

On Tue, May 06, 2008 at 10:59:50PM -0700, David Miller wrote:

> Whether you should resubmit your patch is up to the wireless
> folks :-)

If you don't do it Ingo Oeser's way then it looks like you would need
a patch like the one below.  And with the patch below, the last hunk
of your patch will probably need to be fixed-up to match.

Should I apply the patch below and wait for you to rebase and
resubmit yours?

---

From: John W. Linville <linville@...driver.com>
Subject: [PATCH] mac80211 mesh: add missing check for kmalloc failure

Signed-off-by: John W. Linville <linville@...driver.com>
---
 net/mac80211/mesh_pathtbl.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 5845dc2..ab54f77 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -171,6 +171,12 @@ int mesh_path_add(u8 *dst, struct net_device *dev)
 	new_mpath->flags = 0;
 	skb_queue_head_init(&new_mpath->frame_queue);
 	new_node = kmalloc(sizeof(struct mpath_node), GFP_KERNEL);
+	if (!new_node) {
+		atomic_dec(&sdata->u.sta.mpaths);
+		kfree(new_mpath);
+		err = -ENOMEM;
+		goto endadd2;
+	}
 	new_node->mpath = new_mpath;
 	new_mpath->timer.data = (unsigned long) new_mpath;
 	new_mpath->timer.function = mesh_path_timer;
-- 
1.5.3.3

-- 
John W. Linville
linville@...driver.com
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ