lkml.org 
[lkml]   [2006]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix idr locking in rtc class
On Mon, 26 Jun 2006 20:19:51 -0400
Sonny Rao <sonny@burdell.org> wrote:

thanks for spotting this.
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>

> We need to serialize access to the global rtc_idr even in this error path.
>
> Signed-off-by: Sonny Rao <sonny@burdell.org>
>
> --- linux-2.6.17/drivers/rtc/class.c~orig 2006-06-26 19:10:44.738511816 -0500
> +++ linux-2.6.17/drivers/rtc/class.c 2006-06-26 19:12:22.008724496 -0500
> @@ -93,7 +93,9 @@ exit_kfree:
> kfree(rtc);
>
> exit_idr:
> + mutex_lock(&idr_lock);
> idr_remove(&rtc_idr, id);
> + mutex_unlock(&idr_lock);
>
> exit:
> dev_err(dev, "rtc core: unable to register %s, err = %d\n",


--

Best regards,

Alessandro Zummo,
Tower Technologies - Turin, Italy

http://www.towertech.it

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-27 08:58    [W:0.037 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site