Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754754Ab1F2UBx (ORCPT ); Wed, 29 Jun 2011 16:01:53 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:56693 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752500Ab1F2UBu (ORCPT ); Wed, 29 Jun 2011 16:01:50 -0400 X-Authority-Analysis: v=1.1 cv=PfPQ8rIoTcZsncbPZjVSZ7K0hy8Zc4hmL68r4VPNpKE= c=1 sm=0 a=yGV206oZUtoA:10 a=5SG0PmZfjMsA:10 a=Q9fys5e9bTEA:10 a=OPBmh+XkhLl+Enan7BmTLg==:17 a=gqQug379R1SxBP82P7cA:9 a=te3QK_OmJNrgwhZJ5k8A:7 a=PUjeQqilurYA:10 a=OPBmh+XkhLl+Enan7BmTLg==:117 X-Cloudmark-Score: 0 X-Originating-IP: 67.242.120.143 Subject: Re: [PATCH] plist: add mutex to the blessed lock type for plists From: Steven Rostedt To: Dima Zavin Cc: linux-kernel@vger.kernel.org, Lai Jiangshan , Thomas Gleixner In-Reply-To: <1309376033-32005-1-git-send-email-dima@android.com> References: <1309376033-32005-1-git-send-email-dima@android.com> Content-Type: text/plain; charset="ISO-8859-15" Date: Wed, 29 Jun 2011 16:01:48 -0400 Message-ID: <1309377708.26417.41.camel@gandalf.stny.rr.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1148 Lines: 35 On Wed, 2011-06-29 at 12:33 -0700, Dima Zavin wrote: > +#include > #include > #include > > @@ -56,11 +57,14 @@ static void plist_check_list(struct list_head *top) > > static void plist_check_head(struct plist_head *head) > { > - WARN_ON(head != &test_head && !head->rawlock && !head->spinlock); > + WARN_ON(head != &test_head && !head->rawlock && !head->spinlock && > + !head->mutex); > if (head->rawlock) > WARN_ON_SMP(!raw_spin_is_locked(head->rawlock)); > if (head->spinlock) > WARN_ON_SMP(!spin_is_locked(head->spinlock)); > + if (head->mutex) > + WARN_ON_SMP(!mutex_is_locked(head->mutex)); Spin locks are NOPs on SMP, but mutexes are not. Are you sure you want this as WARN_ON_SMP()? -- Steve > if (!plist_head_empty(head)) > plist_check_list(&plist_first(head)->prio_list); > plist_check_list(&head->node_list); -- 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/