Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754129AbXJHUBV (ORCPT ); Mon, 8 Oct 2007 16:01:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752102AbXJHUBO (ORCPT ); Mon, 8 Oct 2007 16:01:14 -0400 Received: from smtp-out1.tiscali.nl ([195.241.79.176]:54424 "EHLO smtp-out1.tiscali.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752084AbXJHUBN (ORCPT ); Mon, 8 Oct 2007 16:01:13 -0400 Message-ID: <470A8C7D.70303@tiscali.nl> Date: Mon, 08 Oct 2007 22:01:01 +0200 From: Roel Kluin <12o3l@tiscali.nl> User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Greg KH CC: linux-kernel@vger.kernel.org, stable@kernel.org, Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Trond Myklebust Subject: Re: [patch 08/12] NLM: Fix a circular lock dependency in lockd References: <20071008180406.052382073@mini.kroah.org> <20071008180629.GI7627@kroah.com> In-Reply-To: <20071008180629.GI7627@kroah.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 926 Lines: 26 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? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/