* [net:master 16/16] net//ipv4/udp.c:1789:47: error: 'struct sk_buff' has no member named 'sp'; did you mean 'sk'?
@ 2017-07-25 19:38 kbuild test robot
2017-07-26 9:33 ` [PATCH net] udp: unbreak build lacking CONFIG_XFRM Paolo Abeni
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2017-07-25 19:38 UTC (permalink / raw)
To: Paolo Abeni; +Cc: kbuild-all, netdev
[-- Attachment #1: Type: text/plain, Size: 3090 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master
head: dce4551cb2adb1ac9a30f8ab5299d614392b3cff
commit: dce4551cb2adb1ac9a30f8ab5299d614392b3cff [16/16] udp: preserve head state for IP_CMSG_PASSSEC
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout dce4551cb2adb1ac9a30f8ab5299d614392b3cff
# save the attached .config to linux build tree
make.cross ARCH=arm
All errors (new ones prefixed by >>):
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/thread_info.h:10,
from include/asm-generic/current.h:4,
from ./arch/arm/include/generated/asm/current.h:1,
from include/linux/sched.h:11,
from include/linux/uaccess.h:4,
from net//ipv4/udp.c:82:
net//ipv4/udp.c: In function '__udp_queue_rcv_skb':
>> net//ipv4/udp.c:1789:47: error: 'struct sk_buff' has no member named 'sp'; did you mean 'sk'?
if (likely(IPCB(skb)->opt.optlen == 0 && !skb->sp))
^
include/linux/compiler.h:174:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
vim +1789 net//ipv4/udp.c
1772
1773 static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
1774 {
1775 int rc;
1776
1777 if (inet_sk(sk)->inet_daddr) {
1778 sock_rps_save_rxhash(sk, skb);
1779 sk_mark_napi_id(sk, skb);
1780 sk_incoming_cpu_update(sk);
1781 } else {
1782 sk_mark_napi_id_once(sk, skb);
1783 }
1784
1785 /* At recvmsg() time we may access skb->dst or skb->sp depending on
1786 * the IP options and the cmsg flags, elsewhere can we clear all
1787 * pending head states while they are hot in the cache
1788 */
> 1789 if (likely(IPCB(skb)->opt.optlen == 0 && !skb->sp))
1790 skb_release_head_state(skb);
1791
1792 rc = __udp_enqueue_schedule_skb(sk, skb);
1793 if (rc < 0) {
1794 int is_udplite = IS_UDPLITE(sk);
1795
1796 /* Note that an ENOMEM error is charged twice */
1797 if (rc == -ENOMEM)
1798 UDP_INC_STATS(sock_net(sk), UDP_MIB_RCVBUFERRORS,
1799 is_udplite);
1800 UDP_INC_STATS(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
1801 kfree_skb(skb);
1802 trace_udp_fail_queue_rcv_skb(rc, sk);
1803 return -1;
1804 }
1805
1806 return 0;
1807 }
1808
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23094 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH net] udp: unbreak build lacking CONFIG_XFRM
2017-07-25 19:38 [net:master 16/16] net//ipv4/udp.c:1789:47: error: 'struct sk_buff' has no member named 'sp'; did you mean 'sk'? kbuild test robot
@ 2017-07-26 9:33 ` Paolo Abeni
2017-07-26 16:43 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Abeni @ 2017-07-26 9:33 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Paul Moore, kbuild-all
We must use pre-processor conditional block or suitable accessors to
manipulate skb->sp elsewhere builds lacking the CONFIG_XFRM will break.
Fixes: dce4551cb2ad ("udp: preserve head state for IP_CMSG_PASSSEC")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
net/ipv4/udp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index d243772f6efc..fac7cb9e3b0f 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1786,7 +1786,7 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
* the IP options and the cmsg flags, elsewhere can we clear all
* pending head states while they are hot in the cache
*/
- if (likely(IPCB(skb)->opt.optlen == 0 && !skb->sp))
+ if (likely(IPCB(skb)->opt.optlen == 0 && !skb_sec_path(skb)))
skb_release_head_state(skb);
rc = __udp_enqueue_schedule_skb(sk, skb);
--
2.13.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-26 16:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 19:38 [net:master 16/16] net//ipv4/udp.c:1789:47: error: 'struct sk_buff' has no member named 'sp'; did you mean 'sk'? kbuild test robot
2017-07-26 9:33 ` [PATCH net] udp: unbreak build lacking CONFIG_XFRM Paolo Abeni
2017-07-26 16:43 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox