Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1296948pxu; Sat, 5 Dec 2020 10:33:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKGhoHupJOnEFaJ9j56mqhp9j6PHfjYXrDs87WhM3KaIYqXDijmQdB/Kl+1KrGL4MYp5r/ X-Received: by 2002:a50:fc96:: with SMTP id f22mr13661210edq.162.1607193195363; Sat, 05 Dec 2020 10:33:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607193195; cv=none; d=google.com; s=arc-20160816; b=TBb5SbkYJaMyAqrsbOn4oHqyQsIoUSJT8UZoqdrDP7oZ0VR9Tt+EnQ61VFsWjKJYni phhB4IUwydxZwq3KvsmUgyQa8VP6e92N4ofzGBN04QUvN/IIGNAke9wo7ttBy29kt44c fpFNJQnRMPuXGyHFKeQFcYpP5psdPJRVGfsorhWdZ8Yii4FkbbnNKIcl7MaCUTZj8fbZ uTCCU9xpnIG/IBYKV3uapATM48/xXbS5VUFc3x85ECskJlMuF7uo6lFHDFaKnrpDYqzg Pa9aANAe7PUSG0iHf8s+ipXYRpiJexbVgl15L+9J85M40WIZBiP+gLJ25+wXWc+8SmhR v5dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Bv9wk8yqnhXSzalb7+P6wqMtnFis4MPai7fBi9ese8A=; b=F3LRCEtl6wZFeSuA3T7cLx7YGWu8ThYteBFFcLmyBC+nAld0R5om6A4MmrRpcvhE3w 7jnnjT6kQrJnKsU3JrBEhXpnwoztcog8kkoN8Pi3VNxDz4SN5bd3yzZDKQ10p7nLh1M9 Yby1g/3P7sG4yQTiUP1tHuCQcHDlQ+U6h3TQmg+eAf45gMZud7lb1tX0fMuGTL8ks5lX h5afWY7yHWPnuZDuGntDPpEB3O1y4jBFX2gnHb+fUamcQa1mC+SXqKBg/7bsTA1iN5pH u0ZgKfdUNd29jjuvHvFFenXRZAI9ys4AA+aaLJqzA2NCSBnKd4k9luMp0M2bxO3rW0AL 8bXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r23si3595671edy.237.2020.12.05.10.32.51; Sat, 05 Dec 2020 10:33:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730174AbgLESTy (ORCPT + 99 others); Sat, 5 Dec 2020 13:19:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728063AbgLERzH (ORCPT ); Sat, 5 Dec 2020 12:55:07 -0500 X-Greylist: delayed 492 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 05 Dec 2020 09:53:47 PST Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [IPv6:2a01:37:3000::53df:4ef0:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4242DC0613D1 for ; Sat, 5 Dec 2020 09:53:47 -0800 (PST) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 8B19D28005309; Sat, 5 Dec 2020 18:41:52 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 84F3590A8; Sat, 5 Dec 2020 18:42:07 +0100 (CET) Date: Sat, 5 Dec 2020 18:42:07 +0100 From: Lukas Wunner To: yangerkun , sashal@kernel.org, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, chenwenyong2@huawei.com, stable@vger.kernel.org, "zhangyi (F)" Subject: Re: Patch "spi: Fix controller unregister order" has been added to the 4.4-stable tree Message-ID: <20201205174207.GA4028@wunner.de> References: <20200616015646.AC54E2074D@mail.kernel.org> <8c7683cc-ca73-6883-8e45-613de68fa665@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8c7683cc-ca73-6883-8e45-613de68fa665@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 10, 2020 at 04:41:09PM +0800, yangerkun wrote: > ?? 2020/6/16 9:56, Sasha Levin ????: > > This is a note to let you know that I've just added the patch titled > > > > spi: Fix controller unregister order > > > > to the 4.4-stable tree which can be found at: [...] > > --- a/drivers/spi/spi.c > > +++ b/drivers/spi/spi.c > > @@ -1922,11 +1922,12 @@ void spi_unregister_master(struct spi_master *master) > > dev_err(&master->dev, "queue remove failed\n"); > > } > > + device_for_each_child(&master->dev, NULL, __unregister); > > + > > This is a wrong patch. We should move this line before > spi_destroy_queue, but we didn't. 4.9 stable exists this > problem too. Hi Sasha, Hi Greg, below please find a patch for the 4.9-stable tree to fix the backporting issue reported above. Thanks! -- >8 -- Subject: [PATCH] spi: Fix controller unregister order harder Commit c7e41e1caa71 sought to backport upstream commit 84855678add8 to the 4.9-stable tree but erroneously inserted a line at the wrong place. Fix it. Fixes: c7e41e1caa71 ("spi: Fix controller unregister order") Reported-by: yangerkun Signed-off-by: Lukas Wunner --- drivers/spi/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index c7c9ca3178ad..e0632ee1723b 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2070,13 +2070,13 @@ static int __unregister(struct device *dev, void *null) */ void spi_unregister_master(struct spi_master *master) { + device_for_each_child(&master->dev, NULL, __unregister); + if (master->queued) { if (spi_destroy_queue(master)) dev_err(&master->dev, "queue remove failed\n"); } - device_for_each_child(&master->dev, NULL, __unregister); - mutex_lock(&board_lock); list_del(&master->list); mutex_unlock(&board_lock); -- 2.29.2