Re: [PATCH] serial: of-serial: zero-out struct of_serial_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/06/2014 10:33 AM, Greg KH wrote:
> On Tue, Nov 04, 2014 at 10:23:49AM -0800, Florian Fainelli wrote:
>> On 10/30/2014 02:55 PM, Arnd Bergmann wrote:
>>> On Thursday 30 October 2014 14:18:33 Florian Fainelli wrote:
>>>> of_platform_serial_probe() invokes of_platform_serial_setup() with a
>>>> kmalloc'd struct of_serial_info cookie, which is not much of a problem
>>>> for most of the struct of_serial_info fields we access but info->clk.
>>>>
>>>> On platforms which do not provide a clock phandle for their UART nodes
>>>> but do provide a 'clock-frequency' property, we basically leave the
>>>> info->clk variable uninitialized, and this craps out during
>>>> suspend/resume with oopses, crashes or warnings in the clock code.
>>>>
>>>> Fix this by using kzalloc() which also zeroes-out the structure and
>>>> provides an initialized info->clk member set to NULL.
>>>>
>>>> Fixes: 2dea53bf57783 ("serial: of-serial: add PM suspend/resume support")
>>>> Fixes: e34b9c94b6e8d ("[POWERPC] of_serial: add port type checking")
>>>> Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
>>>>
>>>
>>> I thought I'd acked this patch before, maybe someone else sent the same
>>> one. This is definitely required, so
>>>
>>> Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
>>>
>>
>> Thanks, so who's taking that patch? Let me know if I need to resubmit
>> targeting a specific tree.
> 
> Someone else sent this before you did, and I took that version instead,
> sorry.

Not a problem, my message contained much more explanations, but the end
result is the same.

Thanks!
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux