[ 3.5.y.z extended stable ] Patch "net: fix a compile error when SOCK_REFCNT_DEBUG is enabled" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Thu Feb 28 11:59:29 UTC 2013


This is a note to let you know that I have just added a patch titled

    net: fix a compile error when SOCK_REFCNT_DEBUG is enabled

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From 02f783767536fd82cfc887ce98951def466b5b6e Mon Sep 17 00:00:00 2001
From: Ying Xue <ying.xue at windriver.com>
Date: Fri, 15 Feb 2013 22:28:25 +0000
Subject: [PATCH] net: fix a compile error when SOCK_REFCNT_DEBUG is enabled

commit dec34fb0f5b7873de45132a84a3af29e61084a6b upstream.

When SOCK_REFCNT_DEBUG is enabled, below build error is met:

kernel/sysctl_binary.o: In function `sk_refcnt_debug_release':
include/net/sock.h:1025: multiple definition of `sk_refcnt_debug_release'
kernel/sysctl.o:include/net/sock.h:1025: first defined here
kernel/audit.o: In function `sk_refcnt_debug_release':
include/net/sock.h:1025: multiple definition of `sk_refcnt_debug_release'
kernel/sysctl.o:include/net/sock.h:1025: first defined here
make[1]: *** [kernel/built-in.o] Error 1
make: *** [kernel] Error 2

So we decide to make sk_refcnt_debug_release static to eliminate
the error.

Signed-off-by: Ying Xue <ying.xue at windriver.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 include/net/sock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index 5de6557..5e904e6 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -979,7 +979,7 @@ static inline void sk_refcnt_debug_dec(struct sock *sk)
 	       sk->sk_prot->name, sk, atomic_read(&sk->sk_prot->socks));
 }

-inline void sk_refcnt_debug_release(const struct sock *sk)
+static inline void sk_refcnt_debug_release(const struct sock *sk)
 {
 	if (atomic_read(&sk->sk_refcnt) != 1)
 		printk(KERN_DEBUG "Destruction of the %s socket %p delayed, refcnt=%d\n",
--
1.8.1.2





More information about the kernel-team mailing list