All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <Conor.Dooley@microchip.com>
Cc: <Daire.McNamara@microchip.com>, <broonie@kernel.org>,
	<linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>
Subject: Re: [PATCH -next 2/2] spi: microchip-core: switch to use devm_spi_alloc_master()
Date: Wed, 13 Jul 2022 10:14:06 +0800	[thread overview]
Message-ID: <35cfbaa3-d21a-f75c-7f89-3624e7b43f33@huawei.com> (raw)
In-Reply-To: <687d4652-c231-bfa5-f76f-ac826ab1fe98@microchip.com>


On 2022/7/13 4:50, Conor.Dooley@microchip.com wrote:
> On 12/07/2022 15:03, Conor.Dooley@microchip.com wrote:
>> On 12/07/2022 14:53, Yang Yingliang wrote:
>>> [Some people who received this message don't often get email from yangyingliang@huawei.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>>>
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> Switch to use devm_spi_alloc_master() to simpify error path.
>> Hey Yang,
>> Thanks for trying to fix my mistakes!
>>
>> Forgive my innocence here, but why is it okay to remove the
>> spi_master_put() in remove() but not the one in the error path of
>> the probe function?
>>
>> If the devm_add_action_or_reset() in devm_spi_register_controller()
>> fails won't the same thing apply to the probe error path?
>>
>> IOW, I think this patch needs a fixes tag too b/c it also fixes a
>> refcount underflow. Please correct me if I am misunderstanding.
> Ahh, I just saw your revert of 59ebbe40fb51 ("spi: simplify
> devm_spi register_controller"). With that, this makes a lot more
> sense.
>
>> One other comment below.
> This comment still applies for this patch. dev_err_probe would be
> nice.
OK.

Thanks,
Yang
>
> Thanks,
> Conor.

WARNING: multiple messages have this Message-ID (diff)
From: Yang Yingliang <yangyingliang@huawei.com>
To: <Conor.Dooley@microchip.com>
Cc: <Daire.McNamara@microchip.com>, <broonie@kernel.org>,
	<linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>
Subject: Re: [PATCH -next 2/2] spi: microchip-core: switch to use devm_spi_alloc_master()
Date: Wed, 13 Jul 2022 10:14:06 +0800	[thread overview]
Message-ID: <35cfbaa3-d21a-f75c-7f89-3624e7b43f33@huawei.com> (raw)
In-Reply-To: <687d4652-c231-bfa5-f76f-ac826ab1fe98@microchip.com>


On 2022/7/13 4:50, Conor.Dooley@microchip.com wrote:
> On 12/07/2022 15:03, Conor.Dooley@microchip.com wrote:
>> On 12/07/2022 14:53, Yang Yingliang wrote:
>>> [Some people who received this message don't often get email from yangyingliang@huawei.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>>>
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> Switch to use devm_spi_alloc_master() to simpify error path.
>> Hey Yang,
>> Thanks for trying to fix my mistakes!
>>
>> Forgive my innocence here, but why is it okay to remove the
>> spi_master_put() in remove() but not the one in the error path of
>> the probe function?
>>
>> If the devm_add_action_or_reset() in devm_spi_register_controller()
>> fails won't the same thing apply to the probe error path?
>>
>> IOW, I think this patch needs a fixes tag too b/c it also fixes a
>> refcount underflow. Please correct me if I am misunderstanding.
> Ahh, I just saw your revert of 59ebbe40fb51 ("spi: simplify
> devm_spi register_controller"). With that, this makes a lot more
> sense.
>
>> One other comment below.
> This comment still applies for this patch. dev_err_probe would be
> nice.
OK.

Thanks,
Yang
>
> Thanks,
> Conor.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2022-07-13  2:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12 13:53 [PATCH -next 1/2] spi: microchip-core: fix UAF in mchp_corespi_remove() Yang Yingliang
2022-07-12 13:53 ` Yang Yingliang
2022-07-12 13:53 ` [PATCH -next 2/2] spi: microchip-core: switch to use devm_spi_alloc_master() Yang Yingliang
2022-07-12 13:53   ` Yang Yingliang
2022-07-12 14:03   ` Conor.Dooley
2022-07-12 14:03     ` Conor.Dooley
2022-07-12 20:50     ` Conor.Dooley
2022-07-12 20:50       ` Conor.Dooley
2022-07-13  2:14       ` Yang Yingliang [this message]
2022-07-13  2:14         ` Yang Yingliang
2022-07-12 20:52 ` [PATCH -next 1/2] spi: microchip-core: fix UAF in mchp_corespi_remove() Conor.Dooley
2022-07-12 20:52   ` Conor.Dooley

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=35cfbaa3-d21a-f75c-7f89-3624e7b43f33@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=Conor.Dooley@microchip.com \
    --cc=Daire.McNamara@microchip.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-spi@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.