From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752974AbaHKLu1 (ORCPT ); Mon, 11 Aug 2014 07:50:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15415 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752754AbaHKLuY (ORCPT ); Mon, 11 Aug 2014 07:50:24 -0400 Date: Mon, 11 Aug 2014 13:48:23 +0200 From: Oleg Nesterov To: Linus Torvalds Cc: Guenter Roeck , Kees Cook , "linux-kernel@vger.kernel.org" , Andy Lutomirski Subject: Re: Runtime trouble with commit dbd952127d (seccomp: introduce writer locking) Message-ID: <20140811114822.GA2122@redhat.com> References: <53E6CF2B.6090709@roeck-us.net> <20140810193308.GA31867@redhat.com> <53E7DB59.6020300@roeck-us.net> <53E7FDB5.4070607@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/10, Linus Torvalds wrote: > > So that should just be converted to assert_spin_is_locked(). I still think that lockdep_assert_held() is better. Unlike assert_spin_locked() it checks that this lock is held by us, and this is what we want in this case. Plus it depends on CONFIG_LOCKDEP, this is probably good too. Oleg.