[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150111.215427.2061918421162909520.davem@davemloft.net>
Date: Sun, 11 Jan 2015 21:54:27 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: cj@...ux.com
Cc: willemb@...gle.com, edumazet@...gle.com, dborkman@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] packet: bail out of packet_snd() if L2 header
creation fails
From: Christoph Jaeger <cj@...ux.com>
Date: Sun, 11 Jan 2015 13:01:16 -0500
> Due to a misplaced parenthesis, the expression
>
> (unlikely(offset) < 0),
>
> which expands to
>
> (__builtin_expect(!!(offset), 0) < 0),
>
> never evaluates to true. Therefore, when sending packets with
> PF_PACKET/SOCK_DGRAM, packet_snd() does not abort as intended
> if the creation of the layer 2 header fails.
>
> Spotted by Coverity - CID 1259975 ("Operands don't affect result").
>
> Fixes: 9c7077622dd9 ("packet: make packet_snd fail on len smaller than l2 header")
> Signed-off-by: Christoph Jaeger <cj@...ux.com>
Applied, thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists