Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1609276
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RESEND PATCH 1/3] net: hns: fix uninitialized data use |
| Date | 2017-03-26 05:20 +0200 |
| Message-ID | <tp6SJ-27x-9@gated-at.bofh.it> (permalink) |
| References | <toFzb-83Q-1@gated-at.bofh.it> <toFzc-83Q-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 24 Mar 2017 23:02:49 +0100
> When dev_dbg() is enabled, we print uninitialized data, as gcc-7.0.1
> now points out:
>
> ethernet/hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_set_promisc_tcam':
> ethernet/hisilicon/hns/hns_dsaf_main.c:2947:75: error: 'tbl_tcam_data.low.val' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> ethernet/hisilicon/hns/hns_dsaf_main.c:2947:75: error: 'tbl_tcam_data.high.val' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> We also pass the data into hns_dsaf_tcam_mc_cfg(), which might later
> use it (not sure about that), so it seems safer to just always initialize
> the tbl_tcam_data structure.
>
> Fixes: 1f5fa2dd1cfa ("net: hns: fix for promisc mode in HNS driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RESEND PATCH 0/3] hisilicon hns warning fixes for gcc-7.0.1 Arnd Bergmann <arnd@arndb.de> - 2017-03-24 23:10 +0100
[RESEND PATCH 3/3] infiniband: hns: avoid gcc-7.0.1 warning for uninitialized data Arnd Bergmann <arnd@arndb.de> - 2017-03-24 23:10 +0100
[RESEND PATCH 2/3] net: hns: avoid gcc-7.0.1 warning for uninitialized data Arnd Bergmann <arnd@arndb.de> - 2017-03-24 23:10 +0100
Re: [RESEND PATCH 2/3] net: hns: avoid gcc-7.0.1 warning for uninitialized data David Miller <davem@davemloft.net> - 2017-03-26 05:10 +0200
[RESEND PATCH 1/3] net: hns: fix uninitialized data use Arnd Bergmann <arnd@arndb.de> - 2017-03-24 23:10 +0100
Re: [RESEND PATCH 1/3] net: hns: fix uninitialized data use David Miller <davem@davemloft.net> - 2017-03-26 05:20 +0200
csiph-web