Re: oops when adding bridge interface, using v2.5.45

romieu@fr.zoreil.com
Mon, 11 Nov 2002 00:08:56 +0100


Bart De Schuymer <bdschuym@pandora.be> :
[...]
> net/bridge/br_if.c::new_nbp() does
> p = kmalloc(sizeof(*p), GFP_KERNEL);
> which triggers the oops through mm/slab.c::kmem_flagcheck()
> I don't know what is wrong (I have no such problems with 2.4).
>
> The trace is below:
[sleeping function called with lock held]

[net/bridge/br_if.c:236]
write_lock_bh(&br->lock);
if ((p = new_nbp(br, dev)) == NULL) {
write_unlock_bh(&br->lock);

Following patch should fix it. It looks the same in 2.5.46.

--- net/bridge/br_if.c Sun Nov 10 23:57:28 2002
+++ net/bridge/br_if.c Sun Nov 10 23:57:57 2002
@@ -143,7 +143,7 @@ static struct net_bridge_port *new_nbp(s
int i;
struct net_bridge_port *p;

- p = kmalloc(sizeof(*p), GFP_KERNEL);
+ p = kmalloc(sizeof(*p), GFP_ATOMIC);
if (p == NULL)
return p;

--
Ueimor
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/