Received: by 10.223.164.202 with SMTP id h10csp4398974wrb; Mon, 20 Nov 2017 15:00:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMYaRQAsbtSvalioLWNfIc/k0RWAM0KedcdqUYIbTpJ5dAD6SBnYwKgq41pblMmLcaQjHLTu X-Received: by 10.84.237.9 with SMTP id s9mr15039637plk.417.1511218835372; Mon, 20 Nov 2017 15:00:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511218835; cv=none; d=google.com; s=arc-20160816; b=BtafxnuUJXv5wocjlJisshZYzdehegqxPpc3PGewhgGSzIM/PGKEBGsnhp3yZEms/b I5R2CnvtGugtNKK2UY7hYSV9uEvHnUV01IctPVyOTXF/x6vzPojSJb4CatsvEd0ncI4A gamakGPc1/80ff/e4ZJsg5EPgFZJ25aZqHItUPcXFOIqYz92ZjtMTZtON+PahLNRkjEi fdOCQBb2zgSS+xQBiscQqO2egqFBbkspObkLncaUovaXKPkAdTZu/7fGnizfv6jBuzul Pvt9uY5sFRN0xHrxVAbrNT3USSoPqXHC7Ta4aidX3lvCbhVs1+tBOy6XrW3Nu1Nqrt53 /iSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=DT4sqOyvRYpcD7JbB/TIzPDBE1ef/XUFd0mVkSw+2ok=; b=AlMPzucy8KlYRTiepEbsBNCT6za8eHlJMY3WGIxzvRw8tiLJhh9HAaZS5lWk9lS8Oo +EJGlFLE8PmBVzYs8lgsOsBGIsYlYdHOhqC+bPLmKXMT4Lgdlv0EvGnHMFY2rJt+Ddfy HzgGXkiFRpImoVWDts9T+0yNOBcOidoJsQvMKXLOsbDVxm6gSycAlS3D/bvW3zevH06n oKOsT5hTRBqtYlHYnimEncCDQ9U958Ux28oxMlifvRbdWTIWkIhmDipR1BsoDqVTzNys XD1cTSPtFQeW/U3Kk0OyTixGT/0R29wpsa6zsv+Kdt7Hyivn4Vge98IePCk9k+NdgOnK 4anQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=EcxvshCL; dkim=pass header.i=@codeaurora.org header.s=default header.b=EcxvshCL; 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 d9si8988940pgp.487.2017.11.20.15.00.25; Mon, 20 Nov 2017 15:00:35 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=EcxvshCL; dkim=pass header.i=@codeaurora.org header.s=default header.b=EcxvshCL; 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 S1751676AbdKTW7i (ORCPT + 68 others); Mon, 20 Nov 2017 17:59:38 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:41966 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751159AbdKTW7g (ORCPT ); Mon, 20 Nov 2017 17:59:36 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E6EB860600; Mon, 20 Nov 2017 22:59:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511218775; bh=xIkOf203skZ4XmdbgGUayRw8gszjVXCunwUZwvwqcH4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=EcxvshCL1xYY+CHO0dx+QKOnSexoPiIMomCdpCYKo9TON4YlpN8NbF8CBkRjc6bgZ qJ8ztZgscwkOImVM9HNaPrhAvwAbIRZ7BahVOoQ29OQbns7tyHqWtRv/yOlO7I69WS zEbnC0JFcVnh0Oira/YpeTIY5NsCKR5nuJIQCSUc= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.86.152] (unknown [98.122.176.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: awallis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 99FD86024A; Mon, 20 Nov 2017 22:59:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511218775; bh=xIkOf203skZ4XmdbgGUayRw8gszjVXCunwUZwvwqcH4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=EcxvshCL1xYY+CHO0dx+QKOnSexoPiIMomCdpCYKo9TON4YlpN8NbF8CBkRjc6bgZ qJ8ztZgscwkOImVM9HNaPrhAvwAbIRZ7BahVOoQ29OQbns7tyHqWtRv/yOlO7I69WS zEbnC0JFcVnh0Oira/YpeTIY5NsCKR5nuJIQCSUc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 99FD86024A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=awallis@codeaurora.org Subject: Re: [PATCH] Revert "async: simplify lowest_in_progress()" To: Rasmus Villemoes , Tejun Heo , Arjan van de Ven Cc: stable@vger.kernel.org, Lai Jiangshan , linux-kernel@vger.kernel.org References: <20171120225147.3880-1-linux@rasmusvillemoes.dk> From: Adam Wallis Message-ID: <0c3b980a-7360-4698-80d9-5f58c608850a@codeaurora.org> Date: Mon, 20 Nov 2017 17:59:33 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171120225147.3880-1-linux@rasmusvillemoes.dk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/20/2017 5:51 PM, Rasmus Villemoes wrote: > This reverts commit 92266d6ef60c2381c980c6cdcb2a5c1667b36b49, which > was simply wrong: In the case where domain is NULL, we now use the > wrong offsetof() in the list_first_entry macro, so we don't actually > fetch the ->cookie value, but rather the eight bytes located > sizeof(struct list_head) further into the struct async_entry. > > On 64 bit, that's the data member, while on 32 bit, we get a u64 built > from func and data in some order. > > I think the bug happens to be harmless in practice: It obviously only > affects callers which pass a NULL domain, and AFAICT the only such > caller is > > async_synchronize_full() -> > async_synchronize_full_domain(NULL) -> > async_synchronize_cookie_domain(ASYNC_COOKIE_MAX, NULL) > > and the ASYNC_COOKIE_MAX means that in practice we end up waiting for > the async_global_pending list to be empty - but it would break if > somebody happened to pass (void*)-1 as the data element to > async_schedule, and of course also if somebody ever does a > async_synchronize_cookie_domain(, NULL) with a "finite" cookie value. > > Cc: stable@vger.kernel.org # 3.10+ Recommend adding "Fixes" notation here referencing the original broken commit. > Signed-off-by: Rasmus Villemoes > --- [..] -- Adam Wallis Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. From 1584627435569609252@xxx Mon Nov 20 22:54:46 +0000 2017 X-GM-THRID: 1584627435569609252 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread