linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Georgi Djakov <georgi.djakov@linaro.org>
To: Dmitry Osipenko <digetx@gmail.com>,
	robh+dt@kernel.org, linux-pm@vger.kernel.org
Cc: agross@kernel.org, bjorn.andersson@linaro.org,
	evgreen@chromium.org, daidavid1@codeaurora.org,
	vincent.guittot@linaro.org, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v10 2/3] interconnect: qcom: Add MSM8916 interconnect provider driver
Date: Wed, 13 Nov 2019 15:24:19 +0200	[thread overview]
Message-ID: <95eb0a55-d36b-b66e-ae64-18aa5baafff7@linaro.org> (raw)
In-Reply-To: <88315b5a-1354-acf9-d57d-b301fb78cfa4@gmail.com>

Hi Dmitry,

On 13.11.19 г. 15:03 ч., Dmitry Osipenko wrote:
> 30.10.2019 18:39, Georgi Djakov пишет:
>> Add driver for the Qualcomm interconnect buses found in MSM8916 based
>> platforms. The topology consists of three NoCs that are controlled by
>> a remote processor that collects the aggregated bandwidth for each
>> master-slave pairs.
>>
[..]
>> +static int qnoc_remove(struct platform_device *pdev)
>> +{
>> +	struct qcom_icc_provider *qp = platform_get_drvdata(pdev);
>> +	struct icc_provider *provider = &qp->provider;
>> +	struct icc_node *n;
>> +
>> +	list_for_each_entry(n, &provider->nodes, node_list) {
>> +		icc_node_del(n);
>> +		icc_node_destroy(n->id);
>> +	}
> 
> Hello Georgi,
> 
> While examining the interconnect API and current drivers' code, I
> noticed that everybody are copying this chunk of code which should crash
> kernel because removing node from a list during the traverse is allowed
> only when list_for_each_entry_safe() is used.

Nice catch. Thank you!

> Seems the IMX driver (which is under review now on the ML) is the only
> driver that does the removing procedure correctly.
> 
> Maybe it won't hurt to factor out the removal of provider's nodes into a
> common helper.
> 

Yes, this is a very good idea. Will do it.

Thanks,
Georgi

  reply	other threads:[~2019-11-13 13:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 15:39 [PATCH v10 0/3] Add MSM8916 interconnect provider driver Georgi Djakov
2019-10-30 15:39 ` [PATCH v10 1/3] dt-bindings: interconnect: Add Qualcomm MSM8916 DT bindings Georgi Djakov
2019-11-04 21:28   ` Rob Herring
2019-10-30 15:39 ` [PATCH v10 2/3] interconnect: qcom: Add MSM8916 interconnect provider driver Georgi Djakov
2019-11-13 13:03   ` Dmitry Osipenko
2019-11-13 13:24     ` Georgi Djakov [this message]
2019-10-30 15:39 ` [PATCH v10 3/3] arm64: dts: msm8916: Add interconnect provider DT nodes Georgi Djakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95eb0a55-d36b-b66e-ae64-18aa5baafff7@linaro.org \
    --to=georgi.djakov@linaro.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=daidavid1@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=digetx@gmail.com \
    --cc=evgreen@chromium.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).