From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753005Ab2HCKDK (ORCPT ); Fri, 3 Aug 2012 06:03:10 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:42942 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752337Ab2HCKDH (ORCPT ); Fri, 3 Aug 2012 06:03:07 -0400 Date: Fri, 3 Aug 2012 11:03:06 +0100 From: Al Viro To: Fengguang Wu Cc: LKML Subject: Re: [signal:execve2] BUG: sleeping function called from sys_brk Message-ID: <20120803100305.GC23464@ZenIV.linux.org.uk> References: <20120803051412.GA10870@localhost> <20120803093028.GA16195@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120803093028.GA16195@localhost> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 03, 2012 at 05:30:28PM +0800, Fengguang Wu wrote: > Hi Al, > > > I got a boot warning on commit > > > > tree: git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal.git execve2 > > head: 1ade99215ed3c334a544b9e1773602ff0f0251ab > > commit: 1ade99215ed3c334a544b9e1773602ff0f0251ab [9/9] x86: switch to generic sys_execve and kernel_execve > > The same commit triggers other warnings (new config and dmesg attached): > > [ 18.315125] debug: unmapping init [mem 0x816b6000-0x81852fff] > [ 18.318178] BUG: sleeping function called from invalid context at /c/kernel-tests/src/stable/kernel/rwsem.c:47 > [ 18.318243] in_atomic(): 0, irqs_disabled(): 1, pid: 1, name: init > [ 18.318243] no locks held by init/1. > [ 18.318243] Pid: 1, comm: init Not tainted 3.5.0-01258-g1ade992 #182 > [ 18.318243] Call Trace: > [ 18.318243] [<8109e07d>] __might_sleep+0x13d/0x170 > [ 18.318243] [<813cea7c>] down_write+0x2c/0xd0 > [ 18.318243] [<81166ae9>] sys_brk+0x29/0x1f0 > [ 18.318243] [<813d22d0>] syscall_call+0x7/0xb Ow... I think I understand what happened here, and I really don't like the picture ;-/ Could you check if slapping regs->flags = X86_EFLAGS_IF; in process_32.c:start__thread() gets rid of that?