Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3279457lfo; Mon, 23 May 2022 00:33:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy/XvCeUYio9sUzUpPncp5AMx00bbHYCVE2DomBEDEXgo2PfCdAULXh6Bet8E5kSM/jTTh X-Received: by 2002:a05:6a00:228d:b0:510:7594:a73c with SMTP id f13-20020a056a00228d00b005107594a73cmr22524976pfe.17.1653291225637; Mon, 23 May 2022 00:33:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653291225; cv=none; d=google.com; s=arc-20160816; b=EIXEoP0USJxnplJD496YFAwuhqdVOyeolZbnHMq3ZTU1wUATW5RRgWUgFLb3AxSx5Y lMxaBM55m9rMzYpltlvzOkTFxiaGHY99rMKVF5+anTGp668Iuzjh2IlhuM2QEson795e LDw4Gseiw0VTmIjH2U5RN57FO2Jc8yMO9A/SwoDdQ3sJOO7p8b3f15fBoan7RcHqCmyA H8oMZg4VCDcH1KVwso168FNQF5kWkej2xC4ZbFg+btcPkREf6us9RcKKyJzyllzMFjS2 VqIcD1Uowg64ruzyydkPVEyeZrYZVJfoqhgbEzU4iumHRNQ+/DdK728IeWspkyppeHDC oZ/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=aqNtYvddiLy2ygh2SjbKqfaXDPheE4dlzQ6Zh4XokqQ=; b=kIcUmEqUHh6cakB2h0sVzLL3SCPZP47kx5m1mXd9C3dF/F7Crhz7bDNrPrS1Ztp1Z4 6jf3yZBIh1xplGEXujYq0qL5ttc98by9D5Wrqj+syx5GrNf+unQMcThEERhrdUe7uLdT BaXBjg6JhTu0Z/zacd0IwdKcIOmr1DNv3G9XitW1/wjkklcvdU+JXXoVYgSQO47QhU0Y B1m18YgF0sZeEhgxiFo0Ffzyus9b1EUa4rjFRkWEU18GEP8bEf3OvbB0YOpWiAqkFBII Ey//X5rWbZKXueLzWhIXDCsNu67sOehntVaUaKxvoMxG4wVR2c3ErbmklJQKO3pszZKY g16w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t53dm2KO; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j27-20020a633c1b000000b003f62544cf02si10242188pga.743.2022.05.23.00.33.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 00:33:45 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t53dm2KO; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 16A3E17996A; Sun, 22 May 2022 23:44:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244583AbiEVKzb (ORCPT + 99 others); Sun, 22 May 2022 06:55:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230323AbiEVKz2 (ORCPT ); Sun, 22 May 2022 06:55:28 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29DAD3150B; Sun, 22 May 2022 03:55:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 8E001CE0AF7; Sun, 22 May 2022 10:55:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3416BC385B8; Sun, 22 May 2022 10:55:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653216924; bh=00JNBNcr+cGzsBq2sFO3y7dWzCheWZhTHY+EBkeomVk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=t53dm2KOLkTKIn5b63f3DeECq/um6j0sh8r11KBUBN/Z4CPEMSufugF61UBPVL7Tw vWK+vP/Tlt5Lqj5c72KlmtjgoeGQlCpMiL6I563RgAokmGapDDG9MhEf0VzlXvVr/k N5XddCLcowa1S1fSq4N5MfMmHec9DGADkaY3ViVY47POTB9jV+vrjfYCk9QhJKhc5Q zrhDcpQ1HDSbfQdhQVqBCQEl8C9oR02VjzQmVGBFXSS5h9H0DKSocs0A6KNAlRVuYA qCzQw+gh9sZgv8HZ+CRE8syl1Oh4PnundXXeCtvuQ5FRkI+ciy8vR4d4sGBddZnp45 MVJA9gektztNA== Date: Sun, 22 May 2022 12:04:09 +0100 From: Jonathan Cameron To: Lars-Peter Clausen Cc: Vincent Whitchurch , kernel@axis.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: trigger: sysfs: fix use-after-free on remove Message-ID: <20220522120409.5e169a8e@jic23-huawei> In-Reply-To: References: <20220519091925.1053897-1-vincent.whitchurch@axis.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 May 2022 11:58:03 +0200 Lars-Peter Clausen wrote: > On 5/19/22 11:19, Vincent Whitchurch wrote: > > [...] > > > > > > Fixes: e64e7d5c8c86e ("iio:trigger:sysfs Move out of staging.") > > Signed-off-by: Vincent Whitchurch > > Thanks for the patch! > > Strictly speaking the Fixes: should be > > f38bc926d022 ("staging:iio:sysfs-trigger: Use irq_work to properly > active trigger") > > > Reviewed-by: Lars-Peter Clausen I've changed the fixes tag and applied to the fixes-togreg branch of iio.git. Thanks, Jonathan > > > --- > > drivers/iio/trigger/iio-trig-sysfs.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/iio/trigger/iio-trig-sysfs.c b/drivers/iio/trigger/iio-trig-sysfs.c > > index 2a4b75897910..3d911c24b265 100644 > > --- a/drivers/iio/trigger/iio-trig-sysfs.c > > +++ b/drivers/iio/trigger/iio-trig-sysfs.c > > @@ -191,6 +191,7 @@ static int iio_sysfs_trigger_remove(int id) > > } > > > > iio_trigger_unregister(t->trig); > > + irq_work_sync(&t->work); > > iio_trigger_free(t->trig); > > > > list_del(&t->l); > >