Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1510234
| From | Jarod Wilson <jarod@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] [media] dvb: avoid warning in dvb_net |
| Date | 2016-10-27 16:20 +0200 |
| Message-ID | <swTHc-31G-9@gated-at.bofh.it> (permalink) |
| References | <swTxx-2VB-71@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Oct 27, 2016 at 03:57:41PM +0200, Arnd Bergmann wrote:
> With gcc-5 or higher on x86, we can get a bogus warning in the
> dvb-net code:
>
> drivers/media/dvb-core/dvb_net.c: In function ‘dvb_net_ule’:
> arch/x86/include/asm/string_32.h:77:14: error: ‘dest_addr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> drivers/media/dvb-core/dvb_net.c:633:8: note: ‘dest_addr’ was declared here
>
> The problem here is that gcc doesn't track all of the conditions
> to prove it can't end up copying uninitialized data.
> This changes the logic around so we zero out the destination
> address earlier when we determine that it is not set here.
> This allows the compiler to figure it out.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/media/dvb-core/dvb_net.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c
> index 088914c4623f..f1b416de9dab 100644
> --- a/drivers/media/dvb-core/dvb_net.c
> +++ b/drivers/media/dvb-core/dvb_net.c
> @@ -688,6 +688,9 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
> ETH_ALEN);
> skb_pull(priv->ule_skb, ETH_ALEN);
> }
> + } else {
> + /* othersie use zero destination address */
I'm assuming you meant "otherwise" there instead of "othersie".
--
Jarod Wilson
jarod@redhat.com
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] [media] dvb: avoid warning in dvb_net Arnd Bergmann <arnd@arndb.de> - 2016-10-27 16:10 +0200
Re: [PATCH] [media] dvb: avoid warning in dvb_net Jarod Wilson <jarod@redhat.com> - 2016-10-27 16:20 +0200
Re: [PATCH] [media] dvb: avoid warning in dvb_net Arnd Bergmann <arnd@arndb.de> - 2016-10-27 17:20 +0200
Re: [PATCH] [media] dvb: avoid warning in dvb_net Jarod Wilson <jarod@redhat.com> - 2016-10-27 17:30 +0200
csiph-web