Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755516AbbHFL3X (ORCPT ); Thu, 6 Aug 2015 07:29:23 -0400 Received: from mail-qg0-f52.google.com ([209.85.192.52]:33799 "EHLO mail-qg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755057AbbHFL3V (ORCPT ); Thu, 6 Aug 2015 07:29:21 -0400 Message-ID: <55C3450E.8070107@hurleysoftware.com> Date: Thu, 06 Aug 2015 07:29:18 -0400 From: Peter Hurley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Johannes Thumshirn CC: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Andreas Werner Subject: Re: [PATCHv2 1/2] tty: serial: men_z135_uart.c: Fix race between IRQ and set_termios() References: <535885237699310100f3e6804b3677495634042e.1438844880.git.jthumshirn@suse.de> In-Reply-To: <535885237699310100f3e6804b3677495634042e.1438844880.git.jthumshirn@suse.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 844 Lines: 20 On 08/06/2015 03:16 AM, Johannes Thumshirn wrote: > Fix panic caused by a race between men_z135_intr() and men_z135_set_termios(). > > men_z135_intr() and men_z135_set_termios() both hold the struct uart_port::lock > spinlock, but men_z135_intr() does a spin_lock_irqsave() and > men_z135_set_termios() does a normal spin_lock(), which can lead to a deadlock > when an interrupt is called while the lock is being helt by > men_z135_set_termios(). > > This was discovered using a insmod, hardware looppback send/receive, rmmod > stress test. Reviewed-by: Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/