* [PATCH] af_packet: fix typo of "unlikely" conditional in packet_snd
@ 2015-01-13 19:20 John W. Linville
2015-01-13 19:26 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: John W. Linville @ 2015-01-13 19:20 UTC (permalink / raw)
To: netdev
Cc: Daniel Borkmann, David S. Miller, Hannes Frederic Sowa,
John W. Linville
Change "unlikely(offset) < 0" to "unlikely(offset < 0)"...
Coverity: CID 1259984
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
Compile tested only...
net/packet/af_packet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 6880f34a529a..9cfe2e1dd8b5 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -2517,7 +2517,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)
err = -EINVAL;
if (sock->type == SOCK_DGRAM) {
offset = dev_hard_header(skb, dev, ntohs(proto), addr, NULL, len);
- if (unlikely(offset) < 0)
+ if (unlikely(offset < 0))
goto out_free;
} else {
if (ll_header_truncated(dev, len))
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] af_packet: fix typo of "unlikely" conditional in packet_snd
2015-01-13 19:20 [PATCH] af_packet: fix typo of "unlikely" conditional in packet_snd John W. Linville
@ 2015-01-13 19:26 ` David Miller
2015-01-13 21:40 ` John W. Linville
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2015-01-13 19:26 UTC (permalink / raw)
To: linville; +Cc: netdev, dborkman, hannes
From: "John W. Linville" <linville@tuxdriver.com>
Date: Tue, 13 Jan 2015 14:20:11 -0500
> Change "unlikely(offset) < 0" to "unlikely(offset < 0)"...
>
> Coverity: CID 1259984
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Should be fixed in the 'net' tree by:
commit 46d2cfb192b30d729aef064808ed5ece47cee369
Author: Christoph Jaeger <cj@linux.com>
Date: Sun Jan 11 13:01:16 2015 -0500
packet: bail out of packet_snd() if L2 header creation fails
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] af_packet: fix typo of "unlikely" conditional in packet_snd
2015-01-13 19:26 ` David Miller
@ 2015-01-13 21:40 ` John W. Linville
0 siblings, 0 replies; 3+ messages in thread
From: John W. Linville @ 2015-01-13 21:40 UTC (permalink / raw)
To: David Miller; +Cc: netdev, dborkman, hannes
On Tue, Jan 13, 2015 at 02:26:04PM -0500, David Miller wrote:
> From: "John W. Linville" <linville@tuxdriver.com>
> Date: Tue, 13 Jan 2015 14:20:11 -0500
>
> > Change "unlikely(offset) < 0" to "unlikely(offset < 0)"...
> >
> > Coverity: CID 1259984
> >
> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
>
> Should be fixed in the 'net' tree by:
>
> commit 46d2cfb192b30d729aef064808ed5ece47cee369
> Author: Christoph Jaeger <cj@linux.com>
> Date: Sun Jan 11 13:01:16 2015 -0500
>
> packet: bail out of packet_snd() if L2 header creation fails
Cool, sorry for the noise!
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-13 21:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13 19:20 [PATCH] af_packet: fix typo of "unlikely" conditional in packet_snd John W. Linville
2015-01-13 19:26 ` David Miller
2015-01-13 21:40 ` John W. Linville
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.