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


Groups > linux.kernel > #1718580

Re: [PATCH][netdev-next] gre: remove duplicated assignment of iph

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH][netdev-next] gre: remove duplicated assignment of iph
Date 2017-08-23 20:50 +0200
Message-ID <uhISZ-486-1@gated-at.bofh.it> (permalink)
References <uhBRv-8eY-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Colin King <colin.king@canonical.com>
Date: Wed, 23 Aug 2017 12:13:05 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> iph is being assigned the same value twice; remove the redundant
> second assignment.
> 
> Fixes warning:
> net/ipv4/ip_gre.c:265:2: warning: Value stored to 'iph' is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

It is always necessary to reload any SKB header pointer after calls
to functions which potentially change the data buffer of the SKB.

pskb_may_pull() is one such call.

Therefore your patch is adding a bug.

If you want to remove the dup, you must remove the first not
the second one.

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


Thread

[PATCH][netdev-next] gre: remove duplicated assignment of iph Colin King <colin.king@canonical.com> - 2017-08-23 13:20 +0200
  Re: [PATCH][netdev-next] gre: remove duplicated assignment of iph Nikolay Aleksandrov <nikolay@cumulusnetworks.com> - 2017-08-23 14:00 +0200
  Re: [PATCH][netdev-next] gre: remove duplicated assignment of iph David Miller <davem@davemloft.net> - 2017-08-23 20:50 +0200

csiph-web