Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933495AbZJGNNR (ORCPT ); Wed, 7 Oct 2009 09:13:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933429AbZJGNNQ (ORCPT ); Wed, 7 Oct 2009 09:13:16 -0400 Received: from smtp.ispras.ru ([83.149.198.201]:42778 "EHLO smtp.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933311AbZJGNNP (ORCPT ); Wed, 7 Oct 2009 09:13:15 -0400 From: Alexander Strakh Organization: ISP RAS To: Jiri Slaby , Linux Kernlel Mailing List Subject: [BUG] isicom.c sleeping function called from invalid context Date: Wed, 7 Oct 2009 17:15:14 +0000 User-Agent: KMail/1.10.3 (Linux/2.6.27.29-0.1-default; KDE/4.1.3; x86_64; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910071715.14853.strakh@ispras.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 949 Lines: 26 KERNEL_VERSION: 2.6.31 DESCRIBE: Driver drivers/char/isicom.c might sleep in atomic context, because it calls tty_port_xmit_buf under spin_lock. ./drivers/char/isicom.c: 1307 static void isicom_hangup(struct tty_struct *tty) 1308 { ... 1315 spin_lock_irqsave(&port->card->card_lock, flags); 1316 isicom_shutdown_port(port); ... Path to might_sleep macro from isicom_hangup: 1. isicom_hangup calls spin_lock_irqsave (drivers/char/isicom.c:1315) and then calls isicom_shutdown_port. 2. isiscom_shutdown_port calls tty_port_free_xmit_buf at drivers/char/isicom.c:906 3. tty_port_free_xmit_buf calls mutex_lock at srivers/char/tty_port:48 Found by Linux Driver Verification Project. -- 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/