mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alessandro Zummo <alessandro.zummo@towertech.it>
To: Sonny Rao <sonny@burdell.org>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH] fix idr locking in rtc class
Date: Tue, 27 Jun 2006 08:55:18 +0200	[thread overview]
Message-ID: <20060627085518.787bb831@inspiron> (raw)
In-Reply-To: <20060627001951.GA24726@kevlar.burdell.org>

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


      reply	other threads:[~2006-06-27  6:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-27  0:19 Sonny Rao
2006-06-27  6:55 ` Alessandro Zummo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060627085518.787bb831@inspiron \
    --to=alessandro.zummo@towertech.it \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sonny@burdell.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®