* [PATCH] Fix CIFS compilation with CONFIG_KEYS unset
@ 2008-10-12 11:15 Rafael J. Wysocki
2008-10-12 13:40 ` Fwd: " Steve French
0 siblings, 1 reply; 11+ messages in thread
From: Rafael J. Wysocki @ 2008-10-12 11:15 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, LKML, Herbert Xu, Steve French
From: Rafael J. Wysocki <rjw@sisk.pl>
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@sisk.pl>
---
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; })
^ permalink raw reply [flat|nested] 11+ messages in thread* Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset 2008-10-12 11:15 [PATCH] Fix CIFS compilation with CONFIG_KEYS unset Rafael J. Wysocki @ 2008-10-12 13:40 ` Steve French 2008-10-12 13:42 ` Guo-Fu Tseng 2008-10-12 13:59 ` [linux-cifs-client] " Jeff Layton 0 siblings, 2 replies; 11+ messages in thread From: Steve French @ 2008-10-12 13:40 UTC (permalink / raw) To: rjw, David Miller, netdev, samba-technical@lists.samba.org, linux-cifs-client@lists.samba.org, cooldavid, jlayton, LKML 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@sisk.pl> Date: Sun, Oct 12, 2008 at 6:15 AM Subject: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset To: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org>, LKML <linux-kernel@vger.kernel.org>, Herbert Xu <herbert@gondor.apana.org.au>, Steve French <smfrench@gmail.com> From: Rafael J. Wysocki <rjw@sisk.pl> 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@sisk.pl> --- 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 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset 2008-10-12 13:40 ` Fwd: " Steve French @ 2008-10-12 13:42 ` Guo-Fu Tseng 2008-10-12 13:59 ` [linux-cifs-client] " Jeff Layton 1 sibling, 0 replies; 11+ messages in thread From: Guo-Fu Tseng @ 2008-10-12 13:42 UTC (permalink / raw) To: Steve French, rjw, David Miller, netdev, samba-technical@lists.samba.org, linux-cifs-client@lists.samba.org, jlayton, LKML On Sun, 12 Oct 2008 08:40:39 -0500, Steve French wrote > 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. Thank you for the fix. :) Guo-Fu Tseng ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-cifs-client] Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset 2008-10-12 13:40 ` Fwd: " Steve French 2008-10-12 13:42 ` Guo-Fu Tseng @ 2008-10-12 13:59 ` Jeff Layton 2008-10-12 14:12 ` Guo-Fu Tseng 2008-10-12 16:53 ` Steve French 1 sibling, 2 replies; 11+ messages in thread From: Jeff Layton @ 2008-10-12 13:59 UTC (permalink / raw) To: Steve French Cc: rjw, David Miller, netdev, samba-technical@lists.samba.org, linux-cifs-client@lists.samba.org, cooldavid, LKML On Sun, 12 Oct 2008 08:40:39 -0500 "Steve French" <smfrench@gmail.com> wrote: > 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. > Actually, I like Adrian/Rafael's fix better. I think we should avoid cluttering up the code with #ifdef's where possible. key_put() already is a no-op when CONFIG_KEYS is disabled. We might as well do the same thing with key_revoke(). Cheers, -- Jeff Layton <jlayton@redhat.com> ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-cifs-client] Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset 2008-10-12 13:59 ` [linux-cifs-client] " Jeff Layton @ 2008-10-12 14:12 ` Guo-Fu Tseng 2008-10-12 16:53 ` Steve French 1 sibling, 0 replies; 11+ messages in thread From: Guo-Fu Tseng @ 2008-10-12 14:12 UTC (permalink / raw) To: Jeff Layton, Steve French Cc: rjw, David Miller, netdev, samba-technical@lists.samba.org, linux-cifs-client@lists.samba.org, LKML On Sun, 12 Oct 2008 09:59:03 -0400, Jeff Layton wrote > On Sun, 12 Oct 2008 08:40:39 -0500 > "Steve French" <smfrench@gmail.com> wrote: > > > 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. > > > > Actually, I like Adrian/Rafael's fix better. I think we should avoid > cluttering up the code with #ifdef's where possible. key_put() already > is a no-op when CONFIG_KEYS is disabled. We might as well do the same > thing with key_revoke(). I found that my patch was not reasonable at all. And I agree with Jeff. Guo-Fu Tseng ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-cifs-client] Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset 2008-10-12 13:59 ` [linux-cifs-client] " Jeff Layton 2008-10-12 14:12 ` Guo-Fu Tseng @ 2008-10-12 16:53 ` Steve French 2008-10-12 16:57 ` Steve French 1 sibling, 1 reply; 11+ messages in thread From: Steve French @ 2008-10-12 16:53 UTC (permalink / raw) To: Jeff Layton Cc: rjw, David Miller, netdev, samba-technical@lists.samba.org, linux-cifs-client@lists.samba.org, cooldavid, LKML On Sun, Oct 12, 2008 at 8:59 AM, Jeff Layton <jlayton@redhat.com> wrote: > On Sun, 12 Oct 2008 08:40:39 -0500 > "Steve French" <smfrench@gmail.com> wrote: > >> 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. >> > > Actually, I like Adrian/Rafael's fix better. I think we should avoid > cluttering up the code with #ifdef's where possible. key_put() already > is a no-op when CONFIG_KEYS is disabled. We might as well do the same > thing with key_revoke(). I don't think it matters much - but we probably shouldn't be overriding global functions. -- Thanks, Steve ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-cifs-client] Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset 2008-10-12 16:53 ` Steve French @ 2008-10-12 16:57 ` Steve French 2008-10-12 17:09 ` Rafael J. Wysocki 2008-10-12 20:16 ` Jeff Layton 0 siblings, 2 replies; 11+ messages in thread From: Steve French @ 2008-10-12 16:57 UTC (permalink / raw) To: Jeff Layton Cc: rjw, David Miller, netdev, samba-technical@lists.samba.org, linux-cifs-client@lists.samba.org, cooldavid, LKML On Sun, Oct 12, 2008 at 11:53 AM, Steve French <smfrench@gmail.com> wrote: > On Sun, Oct 12, 2008 at 8:59 AM, Jeff Layton <jlayton@redhat.com> wrote: >> On Sun, 12 Oct 2008 08:40:39 -0500 >> "Steve French" <smfrench@gmail.com> wrote: >> >> Actually, I like Adrian/Rafael's fix better. I think we should avoid >> cluttering up the code with #ifdef's where possible. key_put() already >> is a no-op when CONFIG_KEYS is disabled. We might as well do the same >> thing with key_revoke(). > I don't think it matters much - but we probably shouldn't be > overriding global functions. To clarify, I like fixing it in keys.h better than overriding it in cifs, but in the meantime we need an ifdef in cifs until keys.h changes. -- Thanks, Steve ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-cifs-client] Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset 2008-10-12 16:57 ` Steve French @ 2008-10-12 17:09 ` Rafael J. Wysocki 2008-10-12 18:47 ` Steve French 2008-10-12 20:16 ` Jeff Layton 1 sibling, 1 reply; 11+ messages in thread From: Rafael J. Wysocki @ 2008-10-12 17:09 UTC (permalink / raw) To: Steve French Cc: Jeff Layton, David Miller, netdev, samba-technical@lists.samba.org, linux-cifs-client@lists.samba.org, cooldavid, LKML On Sunday, 12 of October 2008, Steve French wrote: > On Sun, Oct 12, 2008 at 11:53 AM, Steve French <smfrench@gmail.com> wrote: > > On Sun, Oct 12, 2008 at 8:59 AM, Jeff Layton <jlayton@redhat.com> wrote: > >> On Sun, 12 Oct 2008 08:40:39 -0500 > >> "Steve French" <smfrench@gmail.com> wrote: > >> > >> Actually, I like Adrian/Rafael's fix better. I think we should avoid > >> cluttering up the code with #ifdef's where possible. key_put() already > >> is a no-op when CONFIG_KEYS is disabled. We might as well do the same > >> thing with key_revoke(). > > I don't think it matters much - but we probably shouldn't be > > overriding global functions. > > To clarify, I like fixing it in keys.h better than overriding it in > cifs, but in the meantime we need an ifdef in cifs until keys.h > changes. Well, adding an empty definition for key_revoke() in the !CONFIG_KEYS case makes sense anyway IMO. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-cifs-client] Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset 2008-10-12 17:09 ` Rafael J. Wysocki @ 2008-10-12 18:47 ` Steve French 0 siblings, 0 replies; 11+ messages in thread From: Steve French @ 2008-10-12 18:47 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Jeff Layton, David Miller, netdev, samba-technical@lists.samba.org, linux-cifs-client@lists.samba.org, cooldavid, LKML On Sun, Oct 12, 2008 at 12:09 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote: > On Sunday, 12 of October 2008, Steve French wrote: >> On Sun, Oct 12, 2008 at 11:53 AM, Steve French <smfrench@gmail.com> wrote: >> > On Sun, Oct 12, 2008 at 8:59 AM, Jeff Layton <jlayton@redhat.com> wrote: >> >> On Sun, 12 Oct 2008 08:40:39 -0500 >> >> "Steve French" <smfrench@gmail.com> wrote: >> >> >> >> Actually, I like Adrian/Rafael's fix better. I think we should avoid >> >> cluttering up the code with #ifdef's where possible. key_put() already >> >> is a no-op when CONFIG_KEYS is disabled. We might as well do the same >> >> thing with key_revoke(). >> > I don't think it matters much - but we probably shouldn't be >> > overriding global functions. >> >> To clarify, I like fixing it in keys.h better than overriding it in >> cifs, but in the meantime we need an ifdef in cifs until keys.h >> changes. > > Well, adding an empty definition for key_revoke() in the !CONFIG_KEYS case > makes sense anyway IMO. I agree. ACKED -- Thanks, Steve ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-cifs-client] Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset 2008-10-12 16:57 ` Steve French 2008-10-12 17:09 ` Rafael J. Wysocki @ 2008-10-12 20:16 ` Jeff Layton 2008-10-12 20:38 ` Steve French 1 sibling, 1 reply; 11+ messages in thread From: Jeff Layton @ 2008-10-12 20:16 UTC (permalink / raw) To: Steve French Cc: rjw, linux-cifs-client@lists.samba.org, netdev, cooldavid, samba-technical@lists.samba.org, David Miller, LKML On Sun, 12 Oct 2008 11:57:47 -0500 "Steve French" <smfrench@gmail.com> wrote: > On Sun, Oct 12, 2008 at 11:53 AM, Steve French <smfrench@gmail.com> wrote: > > On Sun, Oct 12, 2008 at 8:59 AM, Jeff Layton <jlayton@redhat.com> wrote: > >> On Sun, 12 Oct 2008 08:40:39 -0500 > >> "Steve French" <smfrench@gmail.com> wrote: > >> > >> Actually, I like Adrian/Rafael's fix better. I think we should avoid > >> cluttering up the code with #ifdef's where possible. key_put() already > >> is a no-op when CONFIG_KEYS is disabled. We might as well do the same > >> thing with key_revoke(). > > I don't think it matters much - but we probably shouldn't be > > overriding global functions. > > To clarify, I like fixing it in keys.h better than overriding it in > cifs, but in the meantime we need an ifdef in cifs until keys.h > changes. > > > It's your call, but if we're going to carry a temporary patch, then I'd prefer to just carry the one that adds the empty key_revoke definition. I don't think there's much benefit to changing the cifs code for this, but I don't feel very strongly about it either way... -- Jeff Layton <jlayton@redhat.com> ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-cifs-client] Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset 2008-10-12 20:16 ` Jeff Layton @ 2008-10-12 20:38 ` Steve French 0 siblings, 0 replies; 11+ messages in thread From: Steve French @ 2008-10-12 20:38 UTC (permalink / raw) To: Jeff Layton Cc: rjw, linux-cifs-client@lists.samba.org, netdev, cooldavid, samba-technical@lists.samba.org, David Miller, LKML On Sun, Oct 12, 2008 at 3:16 PM, Jeff Layton <jlayton@redhat.com> wrote: > It's your call, but if we're going to carry a temporary patch, then I'd > prefer to just carry the one that adds the empty key_revoke definition. > I don't think there's much benefit to changing the cifs code for this, > but I don't feel very strongly about it either way... > -- > Jeff Layton <jlayton@redhat.com> There are probably various CIFS_UPCALL related ifdefs that could be merged/shrunk - let's do this as a set later. -- Thanks, Steve ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-10-12 20:39 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-10-12 11:15 [PATCH] Fix CIFS compilation with CONFIG_KEYS unset Rafael J. Wysocki 2008-10-12 13:40 ` Fwd: " Steve French 2008-10-12 13:42 ` Guo-Fu Tseng 2008-10-12 13:59 ` [linux-cifs-client] " Jeff Layton 2008-10-12 14:12 ` Guo-Fu Tseng 2008-10-12 16:53 ` Steve French 2008-10-12 16:57 ` Steve French 2008-10-12 17:09 ` Rafael J. Wysocki 2008-10-12 18:47 ` Steve French 2008-10-12 20:16 ` Jeff Layton 2008-10-12 20:38 ` Steve French
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox