Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp308898ybp; Tue, 8 Oct 2019 18:36:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqx38LBovxtFYnSLIXXGzcYfEInlrpsixSFDJZAeNUYflMvPjKdg/W4qd0nfl+C6NCABEz7T X-Received: by 2002:a17:906:b24c:: with SMTP id ce12mr557858ejb.327.1570585019673; Tue, 08 Oct 2019 18:36:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570585019; cv=none; d=google.com; s=arc-20160816; b=AQgKZwo6XHwOMrZPZeAKLGBmGQdzUavDoDimBxJly1d2lER5HGkr/46YVqTVKVaham AE7g4EEMS4sb8Z/LSWqjx3uDomPmzCQd62029eaghsMq0uUnUuO3zPUqhLXokRURoCpP 06s/L0wFEt/aQ075J5okCRiG6TOL4Zh7ZQ5/IWfu9uf8HaCHnb3Y43tr4oc6eICiCPa7 FZiheIU+vSnuS7KdXiiX/G6LSEfAaCvc+ppMTjCJSEquINm2tbWGH4hx8x4FtxFPnAEl M2bvWf/ed15UPF4+QlIQB+Nu9kQMayoFi4gFhaDnbbq6ZPoBSt1Z7wxr1NRm3nFvF4Vw +qfA== 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:mime-version :message-id:date:subject:cc:to:from:dmarc-filter:dkim-signature :dkim-signature; bh=Io9s/gi2KyyLJ+TZ1VTAVfrz8tUYTZIc945c9qgNj2Y=; b=Bh6epA4/RMW5wJ+Yu09T+Ed/6Ps/DNJfdUr2gKzpXV1tH3ft5HVaWoxlwRHaS30XGq 3EmNpX4NDFydSOdrdSVKXGxZ2tPmT5euO4aJDAz4dwn+MVCLBkrPjdHh9Zpi//xwMHC3 e7gBGpXEWTzGnXPSQYO9Jallfsr+Tu28rUuHVkLk12VNj/gKWitTTvaXIrTJQiem+dHn DcjEnn2FGmoli1HxWndmxb7w+K/fjysnBfLcJ/o8GonXjASbYv4pw65u+pgRfAAQS3cd GjYqD1C+/kW3wdt4p1FwRPeA0BCdzf98sT/C1URO+BqxdHTj+eVqmt3VRymtEpg6jmft Nf/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=cFVPZm2b; dkim=pass header.i=@codeaurora.org header.s=default header.b=LmH1VBZ7; 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 z42si543019edz.23.2019.10.08.18.36.35; Tue, 08 Oct 2019 18:36:59 -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=cFVPZm2b; dkim=pass header.i=@codeaurora.org header.s=default header.b=LmH1VBZ7; 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 S1730150AbfJIBeR (ORCPT + 99 others); Tue, 8 Oct 2019 21:34:17 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33080 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729960AbfJIBeR (ORCPT ); Tue, 8 Oct 2019 21:34:17 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3C77560AA8; Wed, 9 Oct 2019 01:34:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1570584856; bh=vpnJ5VTuDJFZzi3cr22BrZa+dqZTexKUg9JTzEg91qM=; h=From:To:Cc:Subject:Date:From; b=cFVPZm2bzsjXnsEcbcEzueDAgtxqSKz84ADih27jwC9KuZO7m/07XEmHz8Ii78yDH wbupd730SlMzja1VjFsz22kwW3aho28c3e0ZTk1TE/ouhdmrzHCxI3lekhefwH1Xdm DtTD0+kfnLMpF1fnNHAiieEuvnTBjHuCLj6Qp1S8= 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 clew-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: clew@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 633FC60709; Wed, 9 Oct 2019 01:34:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1570584855; bh=vpnJ5VTuDJFZzi3cr22BrZa+dqZTexKUg9JTzEg91qM=; h=From:To:Cc:Subject:Date:From; b=LmH1VBZ7tdjiEKgqkiYWuAwaXuGH8sWUXjaffNkYVam7erXPTeZh9D8ol/24hoiiN k2tVvrAGBi+pHm5M2D0LSjy54GfIlMk5uztU3KL3obZaF0TDXoqqdCrLfsXqJQMfIp PbHAOvKmYlzINvhWxa9hcFUn0sjc5Xsf96GEqWHY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 633FC60709 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 From: Chris Lew To: bjorn.andersson@linaro.org, ohad@wizery.com Cc: aneela@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Lew Subject: [PATCH] rpmsg: glink: Remove channel decouple from rpdev release Date: Tue, 8 Oct 2019 18:33:45 -0700 Message-Id: <20191009013345.17192-1-clew@codeaurora.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If a channel is being rapidly restarted and the kobj release worker is busy, there is a chance the the rpdev_release function will run after the channel struct itself has been released. There should not be a need to decouple the channel from rpdev in the rpdev release since that should only happen from the channel close commands. Signed-off-by: Chris Lew --- drivers/rpmsg/qcom_glink_native.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 621f1afd4d6b..836a0bd99d11 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -1350,9 +1350,7 @@ static const struct rpmsg_endpoint_ops glink_endpoint_ops = { static void qcom_glink_rpdev_release(struct device *dev) { struct rpmsg_device *rpdev = to_rpmsg_device(dev); - struct glink_channel *channel = to_glink_channel(rpdev->ept); - channel->rpdev = NULL; kfree(rpdev); } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project