Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1244108

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

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH net-next v3] BNX2: fix a Null Pointer for stats_blk
Date 2015-10-11 14:00 +0200
Message-ID <qinsd-7rc-3@gated-at.bofh.it> (permalink)
References <qdTCq-2zg-9@gated-at.bofh.it> <qeh21-2kv-7@gated-at.bofh.it> <qhgj9-iz-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Weidong Wang <wangweidong1@huawei.com>
Date: Thu, 8 Oct 2015 18:03:47 +0800

> 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)
>     bnx2_free_mem
>     ->bp->stats_blk = NULL
>                               GET_64BIT_NET_STATS
> 
> then it will cause 'NULL Pointer' Problem.
> it is as well with 'ethtool -S ethx'.
> 
> Allocate the statistics block at probe time so that this problem is
> impossible
> 
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>

Applied, thank you.
--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH net-next v3] BNX2: fix a Null Pointer for stats_blk Weidong Wang <wangweidong1@huawei.com> - 2015-10-08 12:10 +0200
  Re: [PATCH net-next v3] BNX2: fix a Null Pointer for stats_blk David Miller <davem@davemloft.net> - 2015-10-11 14:00 +0200

csiph-web