Re: [patch 08/12] NLM: Fix a circular lock dependency in lockd

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Greg KH <gregkh@...>
Cc: <linux-kernel@...>, <stable@...>, Justin Forbes <jmforbes@...>, Zwane Mwaikambo <zwane@...>, Theodore Ts'o <tytso@...>, Randy Dunlap <rdunlap@...>, Dave Jones <davej@...>, Chuck Wolber <chuckw@...>, Chris Wedgwood <reviews@...>, Michael Krufky <mkrufky@...>, Chuck Ebbert <cebbert@...>, Domenico Andreoli <cavokz@...>, <torvalds@...>, <akpm@...>, <alan@...>, Trond Myklebust <Trond.Myklebust@...>
Date: Monday, October 8, 2007 - 4:01 pm

Greg KH wrote:

@@ -477,10 +479,15 @@ nlmsvc_testlock(struct svc_rqst *rqstp, 
 
 	if (block == NULL) {
 		struct file_lock *conf = kzalloc(sizeof(*conf), GFP_KERNEL);
+		struct nlm_host	*host;
 
 		if (conf == NULL)
 			return nlm_granted;
-		block = nlmsvc_create_block(rqstp, file, lock, cookie);
+		/* Create host handle for callback */
+		host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len);
+		if (host == NULL)
+			return nlm_lck_denied_nolocks;
+		block = nlmsvc_create_block(rqstp, host, file, lock, cookie);
 		if (block == NULL) {
 			kfree(conf);
 			return nlm_granted;

To be frankly I don't know what this is about, but shouldn't conf be freed if host == NULL?
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/12] 2.6.22.10 -stable review, Greg KH, (Mon Oct 8, 2:05 pm)
Re: [patch 00/12] 2.6.22.10 -stable review, Greg KH, (Mon Oct 8, 2:09 pm)
[patch 09/12] Fix SMP poweroff hangs, Greg KH, (Mon Oct 8, 2:06 pm)
Re: [patch 09/12] Fix SMP poweroff hangs, Olof Johansson, (Tue Oct 9, 11:17 am)
Re: [stable] [patch 09/12] Fix SMP poweroff hangs, Thomas Gleixner, (Tue Oct 9, 7:21 pm)
Re: [stable] [patch 09/12] Fix SMP poweroff hangs, Linus Torvalds, (Tue Oct 9, 7:27 pm)
Re: [stable] [patch 09/12] Fix SMP poweroff hangs, Paul Mackerras, (Wed Oct 10, 8:24 pm)
Re: [stable] [patch 09/12] Fix SMP poweroff hangs, Olof Johansson, (Tue Oct 9, 8:03 pm)
Re: [stable] [patch 09/12] Fix SMP poweroff hangs, Thomas Gleixner, (Tue Oct 9, 7:35 pm)
Re: [stable] [patch 09/12] Fix SMP poweroff hangs, Linus Torvalds, (Wed Oct 10, 1:29 am)
Re: [patch 08/12] NLM: Fix a circular lock dependency in lockd, Roel Kluin, (Mon Oct 8, 4:01 pm)
[patch 06/12] Fix ppp_mppe kernel stack usage., Greg KH, (Mon Oct 8, 2:06 pm)
[patch 05/12] libata: update drive blacklists, Greg KH, (Mon Oct 8, 2:06 pm)