Google
  Web www.spinics.net

Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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 <rjw@xxxxxxx>
Date: Sun, Oct 12, 2008 at 6:15 AM
Subject: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset
To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, LKML
<linux-kernel@xxxxxxxxxxxxxxx>, Herbert Xu
<herbert@xxxxxxxxxxxxxxxxxxx>, Steve French <smfrench@xxxxxxxxx>


From: Rafael J. Wysocki <rjw@xxxxxxx>

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 <rjw@xxxxxxx>
---
 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; })



-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Kernel List]     [Site Home]     [Ethernet Bridging]     [Git]     [IETF Annouce]     [Linux Assembly]     [VLAN]     [Networking]     [Security]     [Bugtraq]     [Rubini]     [Photo]     [Singles Social Netowrking]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Linux Wireless]     [DDR & Rambus]     [Free Dating]     [Linux Resources]     [Wireless Reading Device]

Add to Google Powered by Linux