udpv6: add the required annotation to mib type [Linux 5.0]

udpv6: add the required annotation to mib type [Linux 5.0]

This Linux kernel change "udpv6: add the required annotation to mib type" is included in the Linux 5.0 release. This change is authored by Paolo Abeni <pabeni [at] redhat.com> on Thu Feb 21 17:43:57 2019 +0100. The commit for this change in Linux stable tree is 543fc3f (patch).

udpv6: add the required annotation to mib type

In commit 029a37434880 ("udp6: cleanup stats accounting in recvmsg()")
I forgot to add the percpu annotation for the mib pointer. Add it, and
make sparse happy.

Fixes: 029a37434880 ("udp6: cleanup stats accounting in recvmsg()")
Signed-off-by: Paolo Abeni <[email protected]>
Signed-off-by: David S. Miller <[email protected]>

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 net/ipv6/udp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 2596ffd..e6c52c2 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -288,8 +288,8 @@ int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
    int peeked, peeking, off;
    int err;
    int is_udplite = IS_UDPLITE(sk);
+   struct udp_mib __percpu *mib;
    bool checksum_valid = false;
-   struct udp_mib *mib;
    int is_udp4;

    if (flags & MSG_ERRQUEUE)

Leave a Reply

Your email address will not be published. Required fields are marked *