Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4920291imu; Tue, 29 Jan 2019 09:40:18 -0800 (PST) X-Google-Smtp-Source: ALg8bN4t/NflnhNDIfOCjiX5GfORnBbtAN23vyEuvPvmwNlh/T313oLIeZfNifo/Wf8cMHwU9THS X-Received: by 2002:a62:9f1b:: with SMTP id g27mr26284224pfe.87.1548783618438; Tue, 29 Jan 2019 09:40:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548783618; cv=none; d=google.com; s=arc-20160816; b=zLB4qnUbuj6pYwiCWXhX+wMvclEpakYqIzNS0uP4dUplA9111L6lR/MN/bhyZo6dGS gJkSpQnv+qAv/S0LoXMbJxwmaiNcm2l+HyzxN/Hfny0bj0DmzwMKoJpS7JyuPf/Ufw+j 3fTIKHkH/NQETlT+0H9Gsd6YxTVhWC66B4uarS+5J7rcoQwlYcF8XWMH66+a/jHdTgD1 PKJ4PkYpjrSnNkYVvon3JlnxM0eVWx4vUPBg4/zxTHl/E9g1IZxbDEt1Rw6KdAab4cg8 6pVQmzC8lkWeVYMibfGfnL1ERF2ubQEWAzVHbn1j4WsyQX+YhXrVosHhAKn8hIv4eQUr uTug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=hXWSMQpTt6alsAW0/aVJDreR9D1lr/MlOsRGB4FVWTc=; b=n7ncHZkdEsET+1eJm/SBtwfW3jiIpNSduCcOrbq/tbjZliEgRjCluwZ8+01SBuKdkA sQTsvS5pg2VwvC6lFhb4qHztilw1aPAsROT56ZQnfA5cgj2SiUUNCxW0Jx4DO328Pzxt ir0o0duJZAHIwJLCLNN+KCaDQIPCsjPrSXAFan7DO1bgrMsf/GSEQqCDod45qxhKDdVR 54X3YfU6mrnPKXD3g2PC0EFu7rYtWfYfNifxcDOWwFxqlzbK31E3PoMfTF1rjWJpJ2/n Mf/3BORwoGFdhZYIrROQvRETLwyzW4F41qdk4IgeAmzZCMuiueLBqssu72B3SnyWY0/C HDmQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 10si2910999pgl.30.2019.01.29.09.40.01; Tue, 29 Jan 2019 09:40:18 -0800 (PST) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728253AbfA2Rh6 (ORCPT + 99 others); Tue, 29 Jan 2019 12:37:58 -0500 Received: from mga02.intel.com ([134.134.136.20]:2205 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727229AbfA2Rh6 (ORCPT ); Tue, 29 Jan 2019 12:37:58 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jan 2019 09:37:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,537,1539673200"; d="scan'208";a="113650759" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga008.jf.intel.com with ESMTP; 29 Jan 2019 09:37:56 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.65]) by IRSMSX154.ger.corp.intel.com ([169.254.12.253]) with mapi id 14.03.0415.000; Tue, 29 Jan 2019 17:37:55 +0000 From: "Reshetova, Elena" To: Dmitry Vyukov CC: Peter Zijlstra , LKML , Kees Cook , "Andrea Parri" Subject: RE: [PATCH] refcount_t: add ACQUIRE ordering on success for dec(sub)_and_test variants Thread-Topic: [PATCH] refcount_t: add ACQUIRE ordering on success for dec(sub)_and_test variants Thread-Index: AQHUtwJjl6FToBsL5EumdKDVAgvWOaXGR+kAgAA6+MA= Date: Tue, 29 Jan 2019 17:37:55 +0000 Message-ID: <2236FBA76BA1254E88B949DDB74E612BA4B99139@IRSMSX102.ger.corp.intel.com> References: <1548677377-22177-1-git-send-email-elena.reshetova@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWQwOTNmNWMtYWJlOS00YTdhLTg3MTEtMmRjNWIyM2I4YmQyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNDExUURSeXpNXC9QdUUzM2gzMUhNdGR5N3Y3eW1kUm5LckFWM2V1VDlEY0FrdFRsY25SVThwUG1jd2hiSUNqaFMifQ== x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kern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