Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1536023iob; Thu, 19 May 2022 08:35:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDL87tiQ3wUjtudvroFtyumcZRf+wukMbCUP0fAwc0i73Ki+B+BtitSoKJwYYwdnjmZwF1 X-Received: by 2002:a17:90b:4a8e:b0:1dc:b158:b0c5 with SMTP id lp14-20020a17090b4a8e00b001dcb158b0c5mr5748530pjb.189.1652974550673; Thu, 19 May 2022 08:35:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652974550; cv=none; d=google.com; s=arc-20160816; b=k6wTfBTzYdk9bLjaFsaxxEtn90+nhU65KBR08FjVOhOmCZAVTbilyywNlzI22TXzqc kEcEjLenc00Y7nNOj1cUlVm2TjpBQ0Q1qZq2yNJXaNReH45gE001IJwx1UsEd2+xPBFr n+oSnMI1BMWGpRXtEc9UG42gaJHDyHRVXp4Y4jMFLf0NfYdpJvb2ArsLNRGUii4rbpCF dZKC6H7pz7PRz8RjTuwsOB38lh2F7JKjFcWr4U6as9a4sHmqsxLls5ezdYzdBoJywtPo M0qP9vSSImQtv3x4xNGAdgsFP2UBk9lenRiKTy34H/qaDxH8H+Z1E/CMmSQgZZ7HBdlu Wf7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=sDvSwmy0bLm/bkmjH6GZeJZtaSz1EYheO2GvB9soUVc=; b=as0K13gluxOktLHqXHCLFr8Vy2yKD4p3DpMhr/FA80NOze/6onIRMAbKkLxlkkybQO 8clGOyvwDHBMrXO2qnOjwGmy9aOKrYCx/osFjUl5qWMtQ5gNlaVcU16Ammw0gG/oB2ar I+RyX1063btROcGAEO6M4cPel7S+j0ZDkBC5l4LRzr0Dyhk9VKJ2AnQBFlTXFeUHguhG p2noDNXQrR3K2zt9X/80toV5xgq++6aCJBfQK7TVxjvOo6Zfm2OWMbwvKofjnqAtXcKG gzaIOvfoa0lqNeNBAJGVSCt2mVkIek08a5kUXJEh5g+Je/qK8KPoOZE3rfoY6x9uxXq5 uzOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@metafoo.de header.s=default2002 header.b=T7G7yrs8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=metafoo.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 124-20020a621982000000b0050a7b4bf744si6074889pfz.128.2022.05.19.08.35.35; Thu, 19 May 2022 08:35:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@metafoo.de header.s=default2002 header.b=T7G7yrs8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=metafoo.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236425AbiESJ6L (ORCPT + 99 others); Thu, 19 May 2022 05:58:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236434AbiESJ6H (ORCPT ); Thu, 19 May 2022 05:58:07 -0400 Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 073499C2C4; Thu, 19 May 2022 02:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=sDvSwmy0bLm/bkmjH6GZeJZtaSz1EYheO2GvB9soUVc=; b=T7G7yrs8wan/jqyYwWtZwzna0+ nubVgz1bp5GWsrLPiqSnwKiqIppWOqytMCv45q4GtdzY10a74FVpTyvjhssK5F0sF5mAwenN1sfce fyCCPUVmfK+y7MOOVLQmcpuF0iOX7QCc/bAsL5D/kwi72GaEamjqHEK1eSVhEF4PMhF3orU6ZHDcr Tc8eMmCoAutOTcsLyriHBzbreSXT3axSmBKE6iEpKfluxiEzS78oyWNL66uZ7LRUZAf1D6iih3DGb fjT7GeBn2qkDvkv/gZSWOXF+ApAT1qgCJNzbUPLB36lZXJxXbInoQSvAMSn+hZuVXO7kD+dSr7GoZ xuaMEAJA==; Received: from sslproxy05.your-server.de ([78.46.172.2]) by www381.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1nrcux-000AXa-WF; Thu, 19 May 2022 11:58:04 +0200 Received: from [2001:a61:2ba3:7b01:9e5c:8eff:fe01:8578] by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrcux-000D36-Pf; Thu, 19 May 2022 11:58:03 +0200 Message-ID: Date: Thu, 19 May 2022 11:58:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] iio: trigger: sysfs: fix use-after-free on remove Content-Language: en-US To: Vincent Whitchurch , Jonathan Cameron Cc: kernel@axis.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220519091925.1053897-1-vincent.whitchurch@axis.com> From: Lars-Peter Clausen In-Reply-To: <20220519091925.1053897-1-vincent.whitchurch@axis.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.5/26546/Thu May 19 10:03:47 2022) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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 > --- > 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);