From patchwork Tue Jan 13 08:20:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaswinder Singh X-Patchwork-Id: 18185 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id BA2CDDE30C for ; Tue, 13 Jan 2009 19:23:16 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755159AbZAMIXO (ORCPT ); Tue, 13 Jan 2009 03:23:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754634AbZAMIXM (ORCPT ); Tue, 13 Jan 2009 03:23:12 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:56168 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752605AbZAMIXM (ORCPT ); Tue, 13 Jan 2009 03:23:12 -0500 Received: from [59.180.49.31] (helo=[192.168.1.200]) by bombadil.infradead.org with esmtpsa (Exim 4.69 #1 (Red Hat Linux)) id 1LMeYH-0007Xs-FZ; Tue, 13 Jan 2009 08:23:10 +0000 Subject: [PATCH -tip] socket.h: extern's make no sense in userspace From: Jaswinder Singh Rajput To: Ingo Molnar , netdev , sam@ravnborg.org, harvey.harrison@gmail.com, gorcunov@gmail.com, LKML Date: Tue, 13 Jan 2009 13:50:55 +0530 Message-Id: <1231834855.3212.35.camel@jaswinder.satnam> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Impact: fix 2 make headers_check warnings: usr/include/linux/socket.h:27: leaks CONFIG_PROC to userspace where it is not valid usr/include/linux/socket.h:29: extern's make no sense in userspace Signed-off-by: Jaswinder Singh Rajput --- include/linux/socket.h | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/socket.h b/include/linux/socket.h index 20fc4bb..f5771a2 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -24,11 +24,6 @@ struct __kernel_sockaddr_storage { #include /* pid_t */ #include /* __user */ -#ifdef CONFIG_PROC_FS -struct seq_file; -extern void socket_seq_show(struct seq_file *seq); -#endif - typedef unsigned short sa_family_t; /* @@ -303,6 +298,11 @@ struct ucred { #define IPX_TYPE 1 #ifdef __KERNEL__ +#ifdef CONFIG_PROC_FS +struct seq_file; +extern void socket_seq_show(struct seq_file *seq); +#endif + extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); extern int memcpy_fromiovecend(unsigned char *kdata, struct iovec *iov, int offset, int len);