Re: [PATCH] net bridge: add null pointer check, fix panic

2013-11-11 Thread Alexander Y. Fomichev
On Thu, Jun 20, 2013 at 11:29 AM, Eric Dumazet wrote: > On Thu, 2013-06-20 at 15:00 +0800, xiaoming gao wrote: > >> HI Eric >> the problem is as follow: >> br_del_if()-->del_nbp(): >> >> list_del_rcu(>list); >> dev->priv_flags &= ~IFF_BRIDGE_PORT; >> >> -->at this point, the nic be deleting

Re: [PATCH] net bridge: add null pointer check, fix panic

2013-11-11 Thread Alexander Y. Fomichev
On Thu, Jun 20, 2013 at 11:29 AM, Eric Dumazet eric.duma...@gmail.com wrote: On Thu, 2013-06-20 at 15:00 +0800, xiaoming gao wrote: HI Eric the problem is as follow: br_del_if()--del_nbp(): list_del_rcu(p-list); dev-priv_flags = ~IFF_BRIDGE_PORT; --at this point, the nic be deleting

Re: [PATCH] net bridge: add null pointer check, fix panic

2013-06-20 Thread Eric Dumazet
On Thu, 2013-06-20 at 15:47 +0800, xiaoming gao wrote: > > if you remove the test on FF_BRIDGE_PORT, and br_port_get_rcu never returns > NULL, the problem is fixed. > but the codes in mainline is still bugged, am i right?? > by the way, kernel-stable 3.0 and 3.4 tree also have this bug, and is

Re: [PATCH] net bridge: add null pointer check, fix panic

2013-06-20 Thread xiaoming gao
Eric Dumazet said, at 2013-6-20 15:29: > On Thu, 2013-06-20 at 15:00 +0800, xiaoming gao wrote: > >> HI Eric >> the problem is as follow: >> br_del_if()-->del_nbp(): >> >> list_del_rcu(>list); >> dev->priv_flags &= ~IFF_BRIDGE_PORT; >> >> -->at this point, the nic be deleting still have

Re: [PATCH] net bridge: add null pointer check, fix panic

2013-06-20 Thread Eric Dumazet
On Thu, 2013-06-20 at 15:00 +0800, xiaoming gao wrote: > HI Eric > the problem is as follow: > br_del_if()-->del_nbp(): > > list_del_rcu(>list); > dev->priv_flags &= ~IFF_BRIDGE_PORT; > > -->at this point, the nic be deleting still have rx_handler , so , may in > br_handle_frame() >

Re: [PATCH] net bridge: add null pointer check, fix panic

2013-06-20 Thread xiaoming gao
Eric Dumazet said, at 2013-6-20 12:55: > On Thu, 2013-06-20 at 11:08 +0800, xiaoming gao wrote: >> From: newtongao >> Date: Wed, 19 Jun 2013 14:58:33 +0800 >> Subject: [PATCH] net bridge: add null pointer check,fix panic >> >> in kernel 3.0, br_port_get_r

Re: [PATCH] net bridge: add null pointer check, fix panic

2013-06-20 Thread xiaoming gao
Eric Dumazet said, at 2013-6-20 12:55: On Thu, 2013-06-20 at 11:08 +0800, xiaoming gao wrote: From: newtongao newton...@tencent.com Date: Wed, 19 Jun 2013 14:58:33 +0800 Subject: [PATCH] net bridge: add null pointer check,fix panic in kernel 3.0, br_port_get_rcu() may return NULL when

Re: [PATCH] net bridge: add null pointer check, fix panic

2013-06-20 Thread Eric Dumazet
On Thu, 2013-06-20 at 15:00 +0800, xiaoming gao wrote: HI Eric the problem is as follow: br_del_if()--del_nbp(): list_del_rcu(p-list); dev-priv_flags = ~IFF_BRIDGE_PORT; --at this point, the nic be deleting still have rx_handler , so , may in br_handle_frame()

Re: [PATCH] net bridge: add null pointer check, fix panic

2013-06-20 Thread xiaoming gao
Eric Dumazet said, at 2013-6-20 15:29: On Thu, 2013-06-20 at 15:00 +0800, xiaoming gao wrote: HI Eric the problem is as follow: br_del_if()--del_nbp(): list_del_rcu(p-list); dev-priv_flags = ~IFF_BRIDGE_PORT; --at this point, the nic be deleting still have rx_handler , so , may in

Re: [PATCH] net bridge: add null pointer check, fix panic

2013-06-20 Thread Eric Dumazet
On Thu, 2013-06-20 at 15:47 +0800, xiaoming gao wrote: if you remove the test on FF_BRIDGE_PORT, and br_port_get_rcu never returns NULL, the problem is fixed. but the codes in mainline is still bugged, am i right?? by the way, kernel-stable 3.0 and 3.4 tree also have this bug, and is very

Re: [PATCH] net bridge: add null pointer check, fix panic

2013-06-19 Thread Eric Dumazet
On Thu, 2013-06-20 at 11:08 +0800, xiaoming gao wrote: > From: newtongao > Date: Wed, 19 Jun 2013 14:58:33 +0800 > Subject: [PATCH] net bridge: add null pointer check,fix panic > > in kernel 3.0, br_port_get_rcu() may return NULL when network interface be > de

[PATCH] net bridge: add null pointer check, fix panic

2013-06-19 Thread xiaoming gao
From: newtongao Date: Wed, 19 Jun 2013 14:58:33 +0800 Subject: [PATCH] net bridge: add null pointer check,fix panic in kernel 3.0, br_port_get_rcu() may return NULL when network interface be deleting from bridge, but in function br_handle_frame and br_handle_local_finish, the pointer didn't

[PATCH] net bridge: add null pointer check, fix panic

2013-06-19 Thread xiaoming gao
From: newtongao newton...@tencent.com Date: Wed, 19 Jun 2013 14:58:33 +0800 Subject: [PATCH] net bridge: add null pointer check,fix panic in kernel 3.0, br_port_get_rcu() may return NULL when network interface be deleting from bridge, but in function br_handle_frame and br_handle_local_finish

Re: [PATCH] net bridge: add null pointer check, fix panic

2013-06-19 Thread Eric Dumazet
On Thu, 2013-06-20 at 11:08 +0800, xiaoming gao wrote: From: newtongao newton...@tencent.com Date: Wed, 19 Jun 2013 14:58:33 +0800 Subject: [PATCH] net bridge: add null pointer check,fix panic in kernel 3.0, br_port_get_rcu() may return NULL when network interface be deleting from bridge