Re: [PATCH v2] gpiolib-acpi: Duplicate con_id string when adding it to the crs lookup list

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

 



On Mon, Apr 25, 2016 at 04:21:39PM +0300, Mika Westerberg wrote:
> On Mon, Apr 25, 2016 at 04:01:19PM +0300, ville.syrjala@xxxxxxxxxxxxxxx wrote:
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > 
> > Calling gpiod_get() from a module and then unloading the module leads to an
> > oops due to acpi_can_fallback_to_crs() storing the pointer to the passed
> > 'con_id' string onto acpi_crs_lookup_list. The next guy to come along will then
> > try to access the string but the memory may now be gone with the module.
> > Make a copy of the passed string instead, and store the copy on the list.
> >
> 
> [...]
> 
> > 
> > v2: Make the copied con_id const
> > 
> > Cc: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> > Cc: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
> 
> Acked-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>

Reviewed-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>

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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]