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] [day] [month] [year] [list]
Message-ID: <20090709212555.GA9861@redhat.com>
Date:	Thu, 9 Jul 2009 23:25:55 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	David Howells <dhowells@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, jmorris@...ei.org,
	roland@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rework/fix is_single_threaded()

On 07/09, David Howells wrote:
>
> Oleg Nesterov <oleg@...hat.com> wrote:
>
> > David, do you still dislike ->mmap_sem? I didn't see other objections,
> > and again, imho tasklist_lock is worse.
>
> My main objection to taking mmap_sem is that it restricts where the function
> can be used.  It can't, for example, be called by anyone holding a spinlock.

Yes, it is might_sleep().

> Furthermore, the more locks, the more chance of someone accidentally
> deadlocking something.

The current code is not lockless too, tasklist_lock is not free and
can lead too deadlocks as well.

Anyway. I agree it is better to avoid ->mmap_sem, I'll send the patch
in a minute. But I'd really like to do this in a separate patch, the
change is subtle and needs a changelog at least.

> But apart from that, go for it.

Great, thanks. Then I'll make the patch on top.

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