Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6649306imb; Sat, 9 Mar 2019 02:26:09 -0800 (PST) X-Google-Smtp-Source: APXvYqyA+AKyT+32UTBEeNa6DrvIKuw5jGrvDS0S/H+uWG7MDzEkGrU+LElCWge9o/ggNFWafi/t X-Received: by 2002:a63:d510:: with SMTP id c16mr4296750pgg.46.1552127169040; Sat, 09 Mar 2019 02:26:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552127169; cv=none; d=google.com; s=arc-20160816; b=oCAAYnPFOnftPmM1TiHQwBC+4QcRUnQ8xAWM/V273/BkYaCxBZrbNKx1lwytuuoqdB OxCyV5PuKNySfMAASTj1oaNfvmQ7RGyID8Ks2B+g3cfKbyDPMX4zb0BBA0xQCoiSFP5A meIfh4wmNvv6AIS5MEGV1o99+zw6xGV6focwxylx2hLCAedXXmW7Arov5uCiC/9GG7p8 USn5lY1YpUDOA3y9F2TiFgFDZZld/Wezloa6b+f0WvtyI28qAgnF7DF1wx/m7fQr3Upk LNjMSz7WjxgUlRR1X+kolFDhTZGEbVR1aX/l9QbiRBQDnGM2ovS3TiSkDs6KIESG4Yhr 9dLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gSsgWXFYalZQookWaCKR6wCk4xPTvnEbjw0C5FDjrdA=; b=S+AKKD5XLg9U11trrODri/ONR2TpjUlAqtOtb3gLGLG1L7m37/MzQBU5Y98QbQIcHE z795vmrgx+LdCpAj6EQRjf6nkFSjfAbw7Y/87EHMNGlO3Gn2mXNBmZr/fv6Rbw2T/NFu NTkwJyJjdmMHsf6LzNoC1KM8QH/o6TV+1CQGyC84AmWsI0R84jJQarf89FQE9ryYT6Qp 1xI/I9uA6P8NeCXVftjgCj5vvqqdRhVGSF+z0bud1iv6mgzDRRKHlp+CKgmbnAaHAp+A Mo4j370g45yIoIeLrAA4fl5GcQLDGrWZmzOw4aNqlN/u2NNKMW3mBcvsevbvssqg+VjE 5dTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rBhID84i; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b23si25447pfd.182.2019.03.09.02.25.30; Sat, 09 Mar 2019 02:26:09 -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=@gmail.com header.s=20161025 header.b=rBhID84i; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726268AbfCIKY5 (ORCPT + 99 others); Sat, 9 Mar 2019 05:24:57 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:41481 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725827AbfCIKY5 (ORCPT ); Sat, 9 Mar 2019 05:24:57 -0500 Received: by mail-lj1-f194.google.com with SMTP id z25so85977ljk.8; Sat, 09 Mar 2019 02:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gSsgWXFYalZQookWaCKR6wCk4xPTvnEbjw0C5FDjrdA=; b=rBhID84iEmt/6sYgGpv4ay5RAHMWfMuXiq5g6whFVjaeq3bDgVGQUFPuJbxqYBhuUP 0g3r0DGEVuOqsWKfP2UdYMsobqxnqzGEta3QG1vP4Kv5BQXBpRP6bVhSxw6nAm2Qw7xi 9Xt3+JMUwZDL6Cba/NJuY2R4b4SuRGATbQRWiEZZIrFetzHUNWzokhUD9s0cEveSwUAB Pw/Uueqv63l3U1Tkib3uwCDeK3Ok2FRWhoL8tlBlQVYVkbN+kaO/LPAAZYJZJdLXGP3H wYGyPeu6WfAbl9TGhOYBdp4C5BFMVmimEah4+1cXN+7pkFLKISDBqNLgb7G8wCIbwT3L Cg+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gSsgWXFYalZQookWaCKR6wCk4xPTvnEbjw0C5FDjrdA=; b=V4pJnjctAVMtj0DIfXHH6F/LdNJ5EgCZBr2v60Uy+HhYTYJdumNQ5XhYX264nXv867 KcT+T9bMn2xw2VtzCPx550LsvSoywr3RvWeizhylaYiEY3vrhMj4Jw0W+oINB0o9PGl7 IscrsdKElT6wtdVbVeZC5SzND2wByFpQsVB468cZirw33cnRb/WLCcWztJfHTe66yr8X P0kTUER48yzWm8c3aQPxnqkXFjRFaYt7DvrlLSgtIF24dmM7Oel+sID1qNJfiw2Z2eOB mVjVDRbVNfIwnhtnNR9Juqs1prKZFHwTkrI4F8Q5lGcKh5S+Qu1KfMmkTMqpqw9cPnho z2vw== X-Gm-Message-State: APjAAAUrLs37bWemr+y71PcjfzqNXlc+PxQee5F9spBLF30699sRiTW3 HJX8eF81Tw+Ot4cJJZt4/Oc= X-Received: by 2002:a2e:9b95:: with SMTP id z21mr3662250lji.155.1552127094701; Sat, 09 Mar 2019 02:24:54 -0800 (PST) Received: from localhost (89-64-59-159.dynamic.chello.pl. [89.64.59.159]) by smtp.gmail.com with ESMTPSA id l11sm20771lja.38.2019.03.09.02.24.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Mar 2019 02:24:54 -0800 (PST) Date: Sat, 9 Mar 2019 11:24:28 +0100 From: Tomasz Duszynski To: Sven Van Asbroeck Cc: Tomasz Duszynski , Jonathan Cameron , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, Linux Kernel Mailing List , Matt Ranostay Subject: Re: [PATCH v2] iio: proximity: as3935: fix use-after-free on device remove Message-ID: <20190309102427.GA3565@arch> References: <20190308175935.21904-1-TheSven73@gmail.com> <20190308202936.GA32641@arch> <20190308223249.GC32641@arch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 08, 2019 at 05:46:24PM -0500, Sven Van Asbroeck wrote: > On Fri, Mar 8, 2019 at 5:33 PM Tomasz Duszynski wrote: > > > > > > So perhaps that change deserves a separate patch because it smells like > > a code cleanup. > > Not really. This patch fixes the order in which resources are torn > down on release(). What I meant is that delayed work initialization could stay where it was. The reason you moved it is readability improvement so to me it is more of a cleanup hence I suggested a separate patch. Up to you. > You do this by fixing the order by which devm-resources are allocated > on probe(). > > So it's a fundamental use-after-free fix, and not really a cleanup. > But I'm happy to split into multiple patches if you want ?