Re: [PATCH] ACPI: Fix potential NULL pointer dereference in acpi_processor_add()

From: Hanjun Guo
Date: Thu May 30 2013 - 23:59:43 EST


This is a multi-part message in MIME format.On 2013-5-31 6:25, Greg Kroah-Hartman wrote:
> On Thu, May 30, 2013 at 03:57:58PM +0200, Rafael J. Wysocki wrote:
>> On Thursday, May 30, 2013 10:29:54 AM Hanjun Guo wrote:
>>> On 2013-5-29 19:07, Martin Mokrejs wrote:
>>>> Hanjun Guo wrote:
>>>>> On 2013-5-29 7:30, Rafael J. Wysocki wrote:
>>>>>> On Thursday, May 23, 2013 08:44:26 PM Hanjun Guo wrote:
>>>>>>> In acpi_processor_add(), get_cpu_device() will return NULL sometimes,
>>>>>>> although the chances are small, I think it should be fixed.
>>>>>>>
>>>>>>> Signed-off-by: Hanjun Guo <hanjun.guo@xxxxxxxxxx>
>>>>>>
>>>>>> This patch isn't necessary any more after the changes queued up for 3.11
>>>>>> in the acpi-hotplug branch of the linux-pm.git tree.
>>>>>
>>>>> Ok, I noticed your patch set, just drop my patch.
>>>>
>>>> But shouldn't this go to stable at least? I checked linux-3.9.4
>>>> and it applies fine. Whether this is relevant for other stable
>>>> series I will leave up to somebody else. ;)
>>>
>>> Hi Rafeal,
>>>
>>> What's your opinion on Martin's suggestion?
>>
>> Well, this is kind of hard to say. We generally don't apply patches to -stable
>> that don't have mainline counterparts.
>>
>> Greg, I wonder what your opinion is?
>
> We do not apply patches to -stable that are not in Linus's tree, unless
> there is no problem in Linus's tree due to a major rewrite of the code,
> and it has been confirmed that the same problem isn't there.

Hi Rafael,

I found that the problem is still there in your acpi-hotplug tree, sorry for
I didn't noticed early. I made a patch for this again, I hope it will make
sense to you.

The patch is attached, based on your acpi-hotplug tree.

Thanks
Hanjun