Re: [PATCH net] mac80211: mesh: fix mesh_pathtbl_init() error path

2020-12-04 Thread Jakub Kicinski
On Fri, 04 Dec 2020 17:29:39 +0100 Johannes Berg wrote: > On Fri, 2020-12-04 at 08:24 -0800, Eric Dumazet wrote: > > From: Eric Dumazet > > > > If tbl_mpp can not be allocated, we call mesh_table_free(tbl_path) > > while tbl_path rhashtable has not yet been initialized, which causes > > panics. >

Re: [PATCH net] mac80211: mesh: fix mesh_pathtbl_init() error path

2020-12-04 Thread Johannes Berg
On Fri, 2020-12-04 at 08:24 -0800, Eric Dumazet wrote: > From: Eric Dumazet > > If tbl_mpp can not be allocated, we call mesh_table_free(tbl_path) > while tbl_path rhashtable has not yet been initialized, which causes > panics. > > Simply factorize the rhashtable_init() call into mesh_table_allo

Re: [PATCH net] mac80211: mesh: fix mesh_pathtbl_init() error path

2020-12-04 Thread Johannes Berg
On Fri, 2020-12-04 at 17:26 +0100, Johannes Berg wrote: > On Fri, 2020-12-04 at 08:24 -0800, Eric Dumazet wrote: > > From: Eric Dumazet > > > > If tbl_mpp can not be allocated, we call mesh_table_free(tbl_path) > > while tbl_path rhashtable has not yet been initialized, which causes > > panics. >

Re: [PATCH net] mac80211: mesh: fix mesh_pathtbl_init() error path

2020-12-04 Thread Johannes Berg
On Fri, 2020-12-04 at 08:24 -0800, Eric Dumazet wrote: > From: Eric Dumazet > > If tbl_mpp can not be allocated, we call mesh_table_free(tbl_path) > while tbl_path rhashtable has not yet been initialized, which causes > panics. Thanks Eric! I was going to ask how you ran into this ... > Report

[PATCH net] mac80211: mesh: fix mesh_pathtbl_init() error path

2020-12-04 Thread Eric Dumazet
From: Eric Dumazet If tbl_mpp can not be allocated, we call mesh_table_free(tbl_path) while tbl_path rhashtable has not yet been initialized, which causes panics. Simply factorize the rhashtable_init() call into mesh_table_alloc() WARNING: CPU: 1 PID: 8474 at kernel/workqueue.c:3040 __flush_wor