Re: [PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-24 Thread Weidong Wang
On 2015/9/24 13:34, David Miller wrote: > From: Weidong Wang > Date: Thu, 24 Sep 2015 10:00:45 +0800 > >> It does affect the intention. Although, the problem exists then makes the >> system panic within some case. >> >> Do you have any idea about it? > > Allocate the statistics block at probe

Re: [PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-24 Thread Weidong Wang
On 2015/9/24 13:34, David Miller wrote: > From: Weidong Wang > Date: Thu, 24 Sep 2015 10:00:45 +0800 > >> It does affect the intention. Although, the problem exists then makes the >> system panic within some case. >> >> Do you have any idea about it? > > Allocate the

Re: [PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-23 Thread David Miller
From: Weidong Wang Date: Thu, 24 Sep 2015 10:00:45 +0800 > It does affect the intention. Although, the problem exists then makes the > system panic within some case. > > Do you have any idea about it? Allocate the statistics block at probe time so that this problem is impossible. -- To

Re: [PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-23 Thread Weidong Wang
On 2015/9/24 6:31, David Miller wrote: > From: Weidong Wang > Date: Tue, 22 Sep 2015 20:42:40 +0800 > >> @@ -880,6 +882,7 @@ bnx2_alloc_mem(struct bnx2 *bp) >> } >> } >> >> +spin_lock(>stats64_lock); >> bp->stats_blk = status_blk + status_blk_size; >> >>

Re: [PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-23 Thread David Miller
From: Weidong Wang Date: Tue, 22 Sep 2015 20:42:40 +0800 > @@ -880,6 +882,7 @@ bnx2_alloc_mem(struct bnx2 *bp) > } > } > > + spin_lock(>stats64_lock); > bp->stats_blk = status_blk + status_blk_size; > > bp->stats_blk_mapping = bp->status_blk_mapping +

Re: [PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-23 Thread David Miller
From: Weidong Wang Date: Tue, 22 Sep 2015 20:42:40 +0800 > @@ -880,6 +882,7 @@ bnx2_alloc_mem(struct bnx2 *bp) > } > } > > + spin_lock(>stats64_lock); > bp->stats_blk = status_blk + status_blk_size; > > bp->stats_blk_mapping =

Re: [PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-23 Thread Weidong Wang
On 2015/9/24 6:31, David Miller wrote: > From: Weidong Wang > Date: Tue, 22 Sep 2015 20:42:40 +0800 > >> @@ -880,6 +882,7 @@ bnx2_alloc_mem(struct bnx2 *bp) >> } >> } >> >> +spin_lock(>stats64_lock); >> bp->stats_blk = status_blk +

Re: [PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-23 Thread David Miller
From: Weidong Wang Date: Thu, 24 Sep 2015 10:00:45 +0800 > It does affect the intention. Although, the problem exists then makes the > system panic within some case. > > Do you have any idea about it? Allocate the statistics block at probe time so that this problem is

[PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-22 Thread Weidong Wang
we have two processes to do: P1#: ifconfig eth0 down; which will call bnx2_close, then will , and set Null to stats_blk P2#: ifconfig eth0; which will call bnx2_get_stats64, it will use stats_blk. In one case: --P1#-- --P2#-- stats_blk(no null)

[PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-22 Thread Weidong Wang
we have two processes to do: P1#: ifconfig eth0 down; which will call bnx2_close, then will , and set Null to stats_blk P2#: ifconfig eth0; which will call bnx2_get_stats64, it will use stats_blk. In one case: --P1#-- --P2#-- stats_blk(no null)