lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091223145336.GB23721@bicker>
Date:	Wed, 23 Dec 2009 16:53:36 +0200
From:	Dan Carpenter <error27@...il.com>
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	Matt Mackall <mpm@...enic.com>, linux-kernel@...r.kernel.org
Subject: Re: double unlock in rng_dev_read()

On Wed, Dec 23, 2009 at 10:36:58PM +0800, Herbert Xu wrote:
> On Wed, Dec 23, 2009 at 03:15:52PM +0200, Dan Carpenter wrote:
> > It seems like we unlock rng_mutex twice (2.6.33-rc1).
> > 
> > drivers/char/hw_random/core.c
> >    151                  mutex_unlock(&rng_mutex);
> >    152
> >    153                  if (need_resched())
> >    154                          schedule_timeout_interruptible(1);
> >    155
> >    156                  if (signal_pending(current)) {
> >    157                          err = -ERESTARTSYS;
> >    158                          goto out;
> >    159                  }
> >    160          }
> >    161  out_unlock:
> >    162          mutex_unlock(&rng_mutex);
> 
> Hmm, are you sure you didn't mistake out for out_unlock? :)

No no.  I mean when size hits zero we are rng_mutex is unlocked.

regards,
dan carpenter

> -- 
> Visit Openswan at http://www.openswan.org/
> Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ