Received: by 10.213.65.68 with SMTP id h4csp3547019imn; Tue, 3 Apr 2018 06:55:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx49QSnnogsZucz7meHs8NJFn5NUaSKdhHd844Hx8BbZpBtrGhBLmUpjHwY9RfljWiDYA403K X-Received: by 2002:a17:902:5242:: with SMTP id z60-v6mr5986722plh.223.1522763735565; Tue, 03 Apr 2018 06:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522763735; cv=none; d=google.com; s=arc-20160816; b=Umu1v/1A8NEkrT94+RrxlTR+cj2uNno4DfvpdSzxamEb8nx+Ei1EcgB3NbY1MSbys0 1JuLzsYsnsKioc5u+Op5BATCFz5jJ4CNwQjOiulkKjY5U1hmneHd5fbQRTA+HKPHIpSo fnE3NVyXe5EPvj0CPkmhs/sHwl/370UzNZBBdeLL1gzZRIF3bUkMq3dkVqATDqbUVxR9 oWPHLL6F5FMlWc/bpAAkNjePPi7NVFifqbfs/feHDkFxNYBxL8w0uSmvcsK7N+lFt8D6 rcEqHPaXLj0dkii0NFn3ShBuzM85sW3Pvww+gUIDe9NqnsMoNyzhwmu9HFjGqwEMHX2O xVFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization:arc-authentication-results; bh=KIPoee5HLZYP1X4SkK0k/a/H/Ad4kw1151LckqbKCNc=; b=nkJxrdxvv7Q7sNEH9fOjYIb9+qmetujMfB40GM9+QCoCh9hff91mq3ZeBmlL40NnAR 5tZC+5sam/HZI99ksZJlZjGhR4LUPAQUws81Fqqp5k7a7rclyVlxWweoEuyvXyHBY0+H 7uH2Rp/AIOAd4V1862Ebdu+KPuNA/KhUo+rPH1iDcImda7B5NVf6BHxIgKeuXEtNHxaU tWCi27Z0W1KeIu+X2J+Qj3mSjrDTO2baMWOEJMj5fvUF4Ko0d4HyMY81ksegO66rXCsU 8GcY8PUnkChzuG1kItMP/UDM4s9dX5yA6jr5iZhZbg5qFkp6El96qM8bNc/D1ux/Qbbo t4fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v205si1984160pgb.774.2018.04.03.06.55.20; Tue, 03 Apr 2018 06:55:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751352AbeDCNwi convert rfc822-to-8bit (ORCPT + 99 others); Tue, 3 Apr 2018 09:52:38 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:60228 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750777AbeDCNwh (ORCPT ); Tue, 3 Apr 2018 09:52:37 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 83D728424D; Tue, 3 Apr 2018 13:52:36 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-59.rdu2.redhat.com [10.10.120.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id D07792024CA1; Tue, 3 Apr 2018 13:52:33 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20180403133543.GA26653@andrea> References: <20180403133543.GA26653@andrea> <1522600912-6208-2-git-send-email-andrea.parri@amarulasolutions.com> <1522600912-6208-1-git-send-email-andrea.parri@amarulasolutions.com> <29562.1522759749@warthog.procyon.org.uk> To: Andrea Parri Cc: dhowells@redhat.com, paulmck@linux.vnet.ibm.com, Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, Andrea Parri , Alan Stern , Will Deacon , Boqun Feng , Nicholas Piggin , Jade Alglave , Luc Maranget , Akira Yokosawa Subject: Re: [PATCH v2 1/3] locking: Document the semantics of spin_is_locked() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13190.1522763553.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Tue, 03 Apr 2018 14:52:33 +0100 Message-ID: <13191.1522763553@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 03 Apr 2018 13:52:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 03 Apr 2018 13:52:36 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dhowells@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrea Parri wrote: > > It's more complicated than that. This function is dangerous and should be > > used with extreme care. In the case where CONFIG_SMP=n the value is locked > > one way or the other and it might be the wrong way. > > You mean "unlocked"? (aka, return 0) No, I mean "fixed", sorry. We've had problems stemming from this before on UP systems. David