lkml.org 
[lkml]   [2015]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] kernel/resource: Invalid memory access in __release_resource
Hello

On Mon, Apr 20, 2015 at 10:36 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:

>> > From reading drivers/base/platform.c, it looks like the intent is
>> > that platform device users would use these interfaces:
>>
>> I can take a look to modify OF to use insert_resource(), but I still
>> think that no matter what, we should add this extra check, like the
>> propossed patch or maybe with a BUG_ON()....
>
> I think it would be nicer to make OF use platform_device_add_resources()
> and platform_device_add() because then there's less duplication of code.
> But Grant might have had a reason for avoiding that.
>
> Bjorn

I think I am going to make two patches, one modifying OF as you
suggest, and another one
adding a BUG_ON to release_resource. Then you can decide to apply one
or two with the feedback from Grant

I have no hardware to test it right now, but tomorrow morning I can
test the patches and send them.


Thanks!
--
Ricardo Ribalda


\
 
 \ /
  Last update: 2015-04-20 23:21    [W:0.036 / U:14.880 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site