From patchwork Fri Feb 22 12:36:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 2175971 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 83D023FCFC for ; Fri, 22 Feb 2013 12:41:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756705Ab3BVMlt (ORCPT ); Fri, 22 Feb 2013 07:41:49 -0500 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:48370 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756395Ab3BVMls (ORCPT ); Fri, 22 Feb 2013 07:41:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=BDDh6UtExIwGOs6VsEfsTArxGxzrEkO7bqxFRYqXosQ=; b=lnoBgaiI9sUh9d4vKPAJIPfiJTP58Gc/bIdXL4rYe0OPo0/VQHPZDyz0DX7S25SCzKSiYB08GZVEP1pOniRQFQdcFdtek8JctxyQItFHvJOOUbPqL0qWqBUJwWkxvsn2ALcstfybhuEkXNhvbsDbsOlGyAyTZbLDrmA3Eu8HikM=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:37152) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1U8rrj-0003T5-Fw; Fri, 22 Feb 2013 12:36:39 +0000 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1U8rri-00038c-8b; Fri, 22 Feb 2013 12:36:38 +0000 Date: Fri, 22 Feb 2013 12:36:37 +0000 From: Russell King - ARM Linux To: Paolo Pisati Cc: linux-arm , linux-omap Subject: Re: omap4: 3.8: IPV6 + PREEMPT_VOLUNTARY + !DEBUG_[SPINLOCK|MUTEXES] = BUG() Message-ID: <20130222123637.GA30923@n2100.arm.linux.org.uk> References: <20130221094819.GA4580@luxor.wired.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130221094819.GA4580@luxor.wired.org> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org On Thu, Feb 21, 2013 at 10:48:19AM +0100, Paolo Pisati wrote: > any idea how can i debug this? Please try this patch, and report back whether it solves your problem. Thanks. arch/arm/mm/alignment.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) Reported-by: Paolo Pisati Tested-by: Paolo Pisati --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index b820eda..db26e2e 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c @@ -749,7 +749,6 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) unsigned long instr = 0, instrptr; int (*handler)(unsigned long addr, unsigned long instr, struct pt_regs *regs); unsigned int type; - mm_segment_t fs; unsigned int fault; u16 tinstr = 0; int isize = 4; @@ -760,16 +759,15 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) instrptr = instruction_pointer(regs); - fs = get_fs(); - set_fs(KERNEL_DS); if (thumb_mode(regs)) { - fault = __get_user(tinstr, (u16 *)(instrptr & ~1)); + u16 *ptr = (u16 *)(instrptr & ~1); + fault = probe_kernel_address(ptr, tinstr); if (!fault) { if (cpu_architecture() >= CPU_ARCH_ARMv7 && IS_T32(tinstr)) { /* Thumb-2 32-bit */ u16 tinst2 = 0; - fault = __get_user(tinst2, (u16 *)(instrptr+2)); + fault = probe_kernel_address(ptr + 1, tinst2); instr = (tinstr << 16) | tinst2; thumb2_32b = 1; } else { @@ -778,8 +776,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) } } } else - fault = __get_user(instr, (u32 *)instrptr); - set_fs(fs); + fault = probe_kernel_address(instrptr, instr); if (fault) { type = TYPE_FAULT;