Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261402AbVCYGJ2 (ORCPT ); Fri, 25 Mar 2005 01:09:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261439AbVCYGJ0 (ORCPT ); Fri, 25 Mar 2005 01:09:26 -0500 Received: from digitalimplant.org ([64.62.235.95]:8147 "HELO digitalimplant.org") by vger.kernel.org with SMTP id S261402AbVCYFyz (ORCPT ); Fri, 25 Mar 2005 00:54:55 -0500 Date: Thu, 24 Mar 2005 21:54:48 -0800 (PST) From: Patrick Mochel X-X-Sender: mochel@monsoon.he.net To: linux-kernel@vger.kernel.org cc: greg@kroah.com Subject: [9/12] More Driver Model Locking Changes Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 859 Lines: 28 ChangeSet@1.2247, 2005-03-24 18:59:59-08:00, mochel@digitalimplant.org [klist] Don't reference NULL klist pointer in klist_remove(). Signed-off-by: Patrick Mochel diff -Nru a/lib/klist.c b/lib/klist.c --- a/lib/klist.c 2005-03-24 20:33:01 -08:00 +++ b/lib/klist.c 2005-03-24 20:33:01 -08:00 @@ -145,9 +145,10 @@ void klist_remove(struct klist_node * n) { - spin_lock(&n->n_klist->k_lock); + struct klist * k = n->n_klist; + spin_lock(&k->k_lock); klist_dec_and_del(n); - spin_unlock(&n->n_klist->k_lock); + spin_unlock(&k->k_lock); wait_for_completion(&n->n_removed); } - 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/