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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 Mar 2011 15:36:02 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Matt Fleming <matt@...sole-pimps.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: __lock_task_sighand() and RCU

Hi Matt,

On 03/28, Matt Fleming wrote:
>
> I've been reading __lock_task_sighand() and I can't quite wrap my head
> around what the rcu_read_lock()/rcu_read_unlock() is protecting in
> there.

It protects ->sighand.

> Initially I assumed that it was protecting the 'tsk' argument,

No. the caller must have a reference.

> Then I wondered if it was protecting the sighand from being freed from
> under us while we're trying to lock it.

Yes,

> But sighands aren't freed via
> rcu,

it is ;)

> it's just a simple refcnt and kmem_cache_free()

Yes, but please note that sighand_cachep was created with
SLAB_DESTROY_BY_RCU.

Oleg.

--
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