lkml.org 
[lkml]   [2020]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/4] alarmtimer: Unregister wakeup source when module get fails
Hi,

On Thu, Jan 9, 2020 at 7:59 AM Stephen Boyd <swboyd@chromium.org> wrote:
>
> The alarmtimer_rtc_add_device() function creates a wakeup source and
> then tries to grab a module reference. If that fails we return early
> with a -1, but forget to remove the wakeup source. Cleanup this exit
> path so we don't leave a dangling wakeup source allocated and named
> 'alarmtimer' that will conflict with another RTC device that may be
> registered.
>
> Fixes: 51218298a25e ("alarmtimer: Ensure RTC module is not unloaded")
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
> kernel/time/alarmtimer.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

\
 
 \ /
  Last update: 2020-01-15 04:41    [W:0.402 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site