Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp984264imm; Tue, 3 Jul 2018 03:34:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdPWzRDF3AYBO4tnfOn5jztsfrYQwuIxSZz+e9xtzUelh4MX9IUsuayk6cI8BMXbt1RiMa3 X-Received: by 2002:a17:902:8b86:: with SMTP id ay6-v6mr287419plb.295.1530614065889; Tue, 03 Jul 2018 03:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530614065; cv=none; d=google.com; s=arc-20160816; b=frA0PSgdm15tn49IqHOoTU5rbqWxK7RfEII4GNIsS4fvpkfJyqmDoIxsy+w1yfMUkf UC3EJO2f0YXaSuav0VETNi5xpSFOf3bNNLxVssQn1MvPWxpo9C0b6gOF9CF2BnPCnBNE sf1Yhk601qGSP2gtWxCoG9ONHtx7OxwfjtzwEqsek63nNxP7rZrL+zB9o+n9Xw+NF8cg /GCAhvHDyoTLWGm+Mdn7d5TWe0KNHz0ePHhzCe8Bfo7HfnQYVmBgiipJiqdkZifFQRXE bvkmW+E2nrX/wImYUkukJXOqQrJoO1IahZ/LGKjvotbAvO5gBEdxlKHWUQZRnD6H+jgb vQ2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=p9kgCCWdAP+1RgRGftkfXoA3gcHHPdUAj73KdeK9204=; b=OmplimqxtWqXOrhneP2GovZv5n3G5NenKOSVZv8BeZHpsbkSf1gWXCccAAaj4XhYYj P34cnfvLL/GCdy9p9y1AOXnoaEN6+7pRJW20WFt9zRBC5NqDQsxV1slzTFkfAXUHEfZj f5C5krVIGfvqNxJ4SxT2z7j1qgwgmL1eZdC5KpTwBW3dTBIhCuNSfFKxEGrMqbUj5h/J TP8eP02F3D/tTT6OL6e8DZ3PQPDWCyhC7bJe11fR1VDIGok2FIEQi3kpGh6M3EblmZK/ Rc1W6UnZTyE3kpICELsyyCQyGICvftPV9qYERifVih9tDEJq6xQ+CwH1MJSSFqERL6t2 f1qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FkdIozkY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5-v6si810546plx.517.2018.07.03.03.34.10; Tue, 03 Jul 2018 03:34:25 -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; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FkdIozkY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754758AbeGCKda (ORCPT + 99 others); Tue, 3 Jul 2018 06:33:30 -0400 Received: from mail-wr0-f171.google.com ([209.85.128.171]:42043 "EHLO mail-wr0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754665AbeGCKd3 (ORCPT ); Tue, 3 Jul 2018 06:33:29 -0400 Received: by mail-wr0-f171.google.com with SMTP id p1-v6so1417617wrs.9 for ; Tue, 03 Jul 2018 03:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=p9kgCCWdAP+1RgRGftkfXoA3gcHHPdUAj73KdeK9204=; b=FkdIozkY5+8603disN4C1NZ11XXrNUh62CJPrzZa70glEakXUnSvDj6mSW+EobjIZs fJq9LPqDgadAe7fqHYk0hjmOKuEQ/8O9Nzybu9XYLnzlVSMZIy3/WaIGkYWHG/OO71y9 rTEulGxs11B/CouWj0YwZ8/22zFqq0BgXur4g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=p9kgCCWdAP+1RgRGftkfXoA3gcHHPdUAj73KdeK9204=; b=MrnIvju5/CMKc315W6ocsRFQQ/yZR59uo5QwL+j2T0VEQHs7+xLDHn6cen3tqE2ZQv R/CGVzGCxLp3Z0UA/A/E68AbRbHFspV0/NfopZYC1GrQiJqXFJVnSZa7ZupVnG9rd00A DtJjPjcZWMth3/G9LtgjJ/EC1dIwE96//Mof2TdpaUQZ07dkTMYYDyPHxcok9gLYjIy7 8dctoTu/5HM3VXyM2pelMCiQAbHlk+fpp3SOipU4dsV8OZaQmnqB8n6IsorEbzUqWhAs K5s1rAymXmeXjQXiW3bQaar4QdzlBDLiB7rumUa6KZYsGXA0ZSxeSmv1jZ1lHcEr9DDY UAOQ== X-Gm-Message-State: APt69E10MZ8G3GYAJ1oUzvTkqxekFy5O4kI1n6WCiMdyZ8x5X/dq3f2Z 48pRho11JnIyaGlsnw9vc3qBNQ== X-Received: by 2002:adf:f342:: with SMTP id e2-v6mr22234415wrp.161.1530614007936; Tue, 03 Jul 2018 03:33:27 -0700 (PDT) Received: from andrea (85.100.broadband17.iol.cz. [109.80.100.85]) by smtp.gmail.com with ESMTPSA id n10-v6sm974092wrs.64.2018.07.03.03.33.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jul 2018 03:33:27 -0700 (PDT) Date: Tue, 3 Jul 2018 12:33:20 +0200 From: Andrea Parri To: Mark Rutland Cc: linux-kernel@vger.kernel.org, Boqun Feng , David Sterba , Ingo Molnar , Kees Cook , Peter Zijlstra , Will Deacon Subject: Re: [PATCH] refcount: always allow checked forms Message-ID: <20180703103320.GA17809@andrea> References: <20180703100102.16615-1-mark.rutland@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180703100102.16615-1-mark.rutland@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, a typo below: > /** > - * refcount_inc - increment a refcount > + * refcount_inc_checked - increment a refcount > * @r: the refcount to increment > * > * Similar to atomic_inc(), but will saturate at UINT_MAX and WARN. > @@ -148,14 +146,14 @@ EXPORT_SYMBOL(refcount_inc_not_zero); > * Will WARN if the refcount is 0, as this represents a possible use-after-free > * condition. > */ > -void refcount_inc(refcount_t *r) > +void refcount_inc_chcked(refcount_t *r) s/chcked/checked Andrea