From patchwork Sun Oct 12 13:40:39 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 4086 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 DE247DDDFA for ; Mon, 13 Oct 2008 00:40:54 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753526AbYJLNkn (ORCPT ); Sun, 12 Oct 2008 09:40:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753514AbYJLNkm (ORCPT ); Sun, 12 Oct 2008 09:40:42 -0400 Received: from nf-out-0910.google.com ([64.233.182.185]:38527 "EHLO nf-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753375AbYJLNkl (ORCPT ); Sun, 12 Oct 2008 09:40:41 -0400 Received: by nf-out-0910.google.com with SMTP id d3so546170nfc.21 for ; Sun, 12 Oct 2008 06:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=dnIb4BfC0N2kYChrZZVDGE/PQRsOsqlXFJxQsNvOP3A=; b=cGH6FqgOGkXjlfmjLQ2Y+VAOa0ubuU0i6UFzrte/t4/H3tIh95/ujnnVgZX3TSOvq+ umbhkXTwO+LVap0YqxUcvOX9jaIhQTPKbT35Lzu7D7HrB4BjNB/s1rU9FteNi2QGLPKu gxF9FUEUFNcN6iLvOxSS16zrRgXYkOvN5toKc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=vm03L2dtmscQ56s3c+faO54oPUlAZ2hKpKZVzwk+UksuY9S/drWlE9zICRyGfR3TMN i4fvshpL+KK7u9eCFfTAJEsXGmEqJMPSOKphCj5ewFQrrscMK4EAsNjnSiE6udGLuevS O3A41ADuhq+PVin0JO65Wsahab8kmSaUhFW5Y= Received: by 10.210.115.17 with SMTP id n17mr3779433ebc.71.1223818839382; Sun, 12 Oct 2008 06:40:39 -0700 (PDT) Received: by 10.210.111.14 with HTTP; Sun, 12 Oct 2008 06:40:39 -0700 (PDT) Message-ID: <524f69650810120640v41778375wf0a7662e773da26f@mail.gmail.com> Date: Sun, 12 Oct 2008 08:40:39 -0500 From: "Steve French" To: rjw@sisk.pl, "David Miller" , netdev@vger.kernel.org, "samba-technical@lists.samba.org" , "linux-cifs-client@lists.samba.org" , cooldavid@cooldavid.org, jlayton@redhat.com, LKML Subject: Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset In-Reply-To: <200810121315.37203.rjw@sisk.pl> MIME-Version: 1.0 Content-Disposition: inline References: <200810121315.37203.rjw@sisk.pl> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Rafael and Guo-Fu, The following change to address the compile error that you noted is slightly different than what you suggested but should fix what you found. diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 2851d5d..d8fce19 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c @@ -624,10 +624,12 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time, ses, nls_cp); ssetup_exit: +#ifdef CONFIG_CIFS_UPCALL if (spnego_key) { key_revoke(spnego_key); key_put(spnego_key); } +#endif kfree(str_area); if (resp_buf_type == CIFS_SMALL_BUFFER) { cFYI(1, ("ssetup freeing small buf %p", iov[0].iov_base)); ---------- Forwarded message ---------- From: Rafael J. Wysocki Date: Sun, Oct 12, 2008 at 6:15 AM Subject: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset To: Linus Torvalds Cc: Andrew Morton , LKML , Herbert Xu , Steve French From: Rafael J. Wysocki Fix CIFS compilation with CONFIG_KEYS unset If CONFIG_KEYS is unset, fs/cifs/sess.c doesn't build due to key_revoke() being undefined. Fix that. Signed-off-by: Rafael J. Wysocki --- include/linux/key.h | 1 + 1 file changed, 1 insertion(+) Index: linux-2.6/include/linux/key.h =================================================================== --- linux-2.6.orig/include/linux/key.h +++ linux-2.6/include/linux/key.h @@ -300,6 +300,7 @@ extern void key_init(void); #define key_serial(k) 0 #define key_get(k) ({ NULL; }) #define key_put(k) do { } while(0) +#define key_revoke(k) do { } while(0) #define key_ref_put(k) do { } while(0) #define make_key_ref(k, p) ({ NULL; }) #define key_ref_to_ptr(k) ({ NULL; })