Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp829817imm; Thu, 5 Jul 2018 09:34:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc7pCh2cXaw+uw6Osy1AxCd3/monj0oP27GD6CzBpyrsXJof7tBYPNZH5i46fUX/PrO2OCS X-Received: by 2002:a65:57c9:: with SMTP id q9-v6mr6409714pgr.128.1530808479274; Thu, 05 Jul 2018 09:34:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530808479; cv=none; d=google.com; s=arc-20160816; b=sHgey4XydTttc1dZ2urHpV0WZtQ/ZBAoG0FkwohQZWjOdUoAsG1qPmh1V8oAM+jTv0 YPY8LYxNLv3hYTTT6Ii3HVhG4WhLrB23Jb2ztyuyQ2MWQxwuADHebwChVtYtt2WE5SCO Kynj74H5Dc2gPguDicYDD6Y/UGw6Z40uwNM4VFxAN1klJmjRUKnWg9/dP8UeJgHiNiqh eh4gsu36VmZOC8xZF9556EBgrK/PaMRvCcJBJ4ovyahUidHOvdHxfOaZ70RiqtFFCnH1 dqO4Lhk77j2aQC6bRtfQLwroa+wVB+j6sAy7/D5G3azIU9dwwjWIc3sSf546yMcc5moH ipzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=SFR64oKW7U8cknkB1VPwlnVjpq4q9AbiRxul0VDIuSk=; b=SWr8zRaszPL1RFcvlX7eUQ04NYYxHHQrx27FP+f+SKbpqw0bzm5J1Wx6i5hNC8O5oi QbhCkhtHhWJBt927rOHoFr8Yf4E6dCEeb5zRcY0nurGq1k9quVwSICI7eoQep7X/0qvq MlRHvmeNs2Qy2Rf9CmBjgVRw4t4h3b3kLcj0lvDTMiiIoLNio8ZkjBcvAZI6xP7O3aVH nRiwmoDsB444aMxb2AfZYgBMWGvhCUhkcpVepu+2ezAY/EV0wkOroATg2dEqXKIFsXyB nAL/zmHIqKYtXsfvQCRV2x39IzojDJvZw+1mj96mrlfoRY4qG4uiYBzz4AI9SHRhPw/k q8PA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t12-v6si5539271pgp.565.2018.07.05.09.34.21; Thu, 05 Jul 2018 09:34:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754109AbeGEQdm (ORCPT + 99 others); Thu, 5 Jul 2018 12:33:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43352 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753804AbeGEQdl (ORCPT ); Thu, 5 Jul 2018 12:33:41 -0400 Received: from localhost (D57D388D.static.ziggozakelijk.nl [213.125.56.141]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 022C5CB2; Thu, 5 Jul 2018 16:33:40 +0000 (UTC) Date: Thu, 5 Jul 2018 18:33:38 +0200 From: Greg KH To: xiubli@redhat.com Cc: linux-kernel@vger.kernel.org, pkalever@redhat.com, pkarampu@redhat.com, atumball@redhat.com, sabose@redhat.com, mchristi@redhat.com Subject: Re: [PATCH 1/2] uio: change to use the mutex lock instead of the spin lock Message-ID: <20180705163338.GA14941@kroah.com> References: <1530808048-9494-1-git-send-email-xiubli@redhat.com> <1530808048-9494-2-git-send-email-xiubli@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1530808048-9494-2-git-send-email-xiubli@redhat.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 05, 2018 at 12:27:27PM -0400, xiubli@redhat.com wrote: > From: Xiubo Li > > We are hitting a regression with the following commit: > > commit a93e7b331568227500186a465fee3c2cb5dffd1f > Author: Hamish Martin > Date: Mon May 14 13:32:23 2018 +1200 > > uio: Prevent device destruction while fds are open > > The problem is the addition of spin_lock_irqsave in uio_write. This > leads to hitting uio_write -> copy_from_user -> _copy_from_user -> > might_fault and the logs filling up with sleeping warnings. > > I also noticed some uio drivers allocate memory, sleep, grab mutexes > from callouts like open() and release and uio is now doing > spin_lock_irqsave while calling them. > > Reported-by: Mike Christie > Signed-off-by: Xiubo Li > --- > drivers/uio/uio.c | 33 ++++++++++++++------------------- > include/linux/uio_driver.h | 2 +- > 2 files changed, 15 insertions(+), 20 deletions(-) Any specific reason you did not also cc: the author of the above patch to review this one? Please fix up and resend. greg k-h