Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp286843ybp; Tue, 8 Oct 2019 18:09:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwe3MIlip33H7AW+G1Zd9mlsf95V8peBZxOXLY387Y7M+5IXqF7RvsaSS52xu/VgbfzFYx4 X-Received: by 2002:aa7:c2d7:: with SMTP id m23mr790932edp.206.1570583377961; Tue, 08 Oct 2019 18:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570583377; cv=none; d=google.com; s=arc-20160816; b=raNI5kmmFEpdqwAemMuY1To459j3KhJ9nvG4qUjqnb/Y4PFW2Sjdlo8Z+UMTjZWfSf mDePZZEKw29jgFDeXu0mvwfu8022p2grcGY4Vcab+HsAO2ZzlbgAG+YEJFmH9zKs0d6D fJXhCTvKL2Z1VmHxqL017Uo5Q11F50g8WWt+Eh8XTBfKVjfOMhikCb5mTQyQ4NBGJZ95 n1dSS1Lsb0GFRMnZeo7RPfzFhjPAAlSinq5I09C1qgB81UvP9cjSjZbe95zsfAgD+n9f 9ZZjElhYJSX7b65sLJvi5FJx3Ofi62hIZKqAMx2n+MJwr6enAX9wVK2aBq8YA/zzJ4SK ke3g== 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; bh=nEHS6t2va1PmWulVyaVEHE4CMExwwa79MiZeZlO8kPY=; b=pcf9PUvKzeh6kvu9u64csWQdAFN0q65t29OXO+KIGbA9fnopaGVv9yMqJx7q9M1PvW Paq0wr6OVEw1NbUcJ26ptT0Y55UQzPUGLY5SghuHpeEBL/PLjLCo/514FocHd4hCNGZA EN4OJOf/iRZIhdS7dvWX6rTV3hKXCxSt1Rr9Q8zsdGFs44Ai4AGb45v8OfZ9XtT62rhl eHXm0mZ83B5hsInWqLA3fTT6WrKQ3d4noIdAp1IPW7+8nKSYKcvcfNEpLSf2nWCc9K0u 9m2lKV/HaZJsAkTCzct7+1A+aa+2fmGREODSAsNyCdAkjt1KMVSwD6cFTZl+k0hM9JG+ M6OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=RZxu1lpR; dkim=pass header.i=@codeaurora.org header.s=default header.b=RZxu1lpR; 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 p39si452860eda.416.2019.10.08.18.09.13; Tue, 08 Oct 2019 18:09:37 -0700 (PDT) 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=RZxu1lpR; dkim=pass header.i=@codeaurora.org header.s=default header.b=RZxu1lpR; 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 S1730104AbfJIBIs (ORCPT + 99 others); Tue, 8 Oct 2019 21:08:48 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55174 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729601AbfJIBIs (ORCPT ); Tue, 8 Oct 2019 21:08:48 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id BD627609D1; Wed, 9 Oct 2019 01:08:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1570583327; bh=bYjOELDTmiw0q27UcfMSd3+dbrYeqDhUhvNkC3AoPGo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=RZxu1lpRTYgTHOKizSOgdIt5xErmBAcmksKhD+IDtMptn2YwUlK7a0cjsTtdbSfgQ zMW7ft6xpVyiCqCQo++x0xOy6vWHs9AT2XnF1THdJwujfcdQSIo+LBvx/ZXBhuyOih UHN/3iEUg6B+yhbNacVVZAn1LPMeJr0tRq8qnNow= 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.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.142.6] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: clew@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D5BC960709; Wed, 9 Oct 2019 01:08:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1570583327; bh=bYjOELDTmiw0q27UcfMSd3+dbrYeqDhUhvNkC3AoPGo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=RZxu1lpRTYgTHOKizSOgdIt5xErmBAcmksKhD+IDtMptn2YwUlK7a0cjsTtdbSfgQ zMW7ft6xpVyiCqCQo++x0xOy6vWHs9AT2XnF1THdJwujfcdQSIo+LBvx/ZXBhuyOih UHN/3iEUg6B+yhbNacVVZAn1LPMeJr0tRq8qnNow= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D5BC960709 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=clew@codeaurora.org Subject: Re: [PATCH v2 5/6] rpmsg: glink: Don't send pending rx_done during remove To: Bjorn Andersson , Ohad Ben-Cohen Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20191004222702.8632-1-bjorn.andersson@linaro.org> <20191004222702.8632-6-bjorn.andersson@linaro.org> From: Chris Lew Message-ID: <3e4a7fe5-fc7a-b7d5-19bf-7fb8a26d8e55@codeaurora.org> Date: Tue, 8 Oct 2019 18:08:46 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191004222702.8632-6-bjorn.andersson@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed 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 10/4/2019 3:27 PM, Bjorn Andersson wrote: > Attempting to transmit rx_done messages after the GLINK instance is > being torn down will cause use after free and memory leaks. So cancel > the intent_work and free up the pending intents. > > With this there are no concurrent accessors of the channel left during > qcom_glink_native_remove() and there is therefor no need to hold the > spinlock during this operation - which would prohibit the use of > cancel_work_sync() in the release function. So remove this. > > Fixes: 1d2ea36eead9 ("rpmsg: glink: Add rx done command") > Cc: stable@vger.kernel.org > Tested-by: Srinivas Kandagatla > Signed-off-by: Bjorn Andersson > --- Acked-By: Chris Lew -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project