Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752001AbbKKFxO (ORCPT ); Wed, 11 Nov 2015 00:53:14 -0500 Received: from mga09.intel.com ([134.134.136.24]:47002 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750728AbbKKFxM (ORCPT ); Wed, 11 Nov 2015 00:53:12 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,274,1444719600"; d="scan'208";a="833854879" Date: Wed, 11 Nov 2015 00:53:07 -0500 From: "ira.weiny" To: Alexey Khoroshilov Cc: Mike Marciniszyn , Doug Ledford , Sean Hefty , Hal Rosenstock , Greg Kroah-Hartman , linux-rdma@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: Re: [BUG] IB/hfi1: might sleep under spinlock in hfi1_ioctl() Message-ID: <20151111055305.GA9594@phlsvsds.ph.intel.com> References: <1446240749-5003-1-git-send-email-khoroshilov@ispras.ru> <20151030235817.GA13800@phlsvsds.ph.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151030235817.GA13800@phlsvsds.ph.intel.com> User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1178 Lines: 32 On Fri, Oct 30, 2015 at 07:58:18PM -0400, ira. weiny wrote: > On Sat, Oct 31, 2015 at 12:32:29AM +0300, Alexey Khoroshilov wrote: > > Hello, > > > > hfi1_ioctl() contains many calls to might sleep functions with > > dd->hfi1_snoop.snoop_lock spinlock held (for example, access_ok, > > copy_from_user, kzalloc(GFP_KERNEL), etc.). > > > > Should dd->hfi1_snoop.snoop_lock be acquired just before updating state? > > I believe you are correct. > > I am currently in the process of pushing fixes to the staging tree. > > We have a patch which fixes this queued up but it depends on at least one other > patch in my queue. > > I will do my best to get this submitted soon. I have just posted a series which addresses this problem as well as doing general clean up on hfi1_ioctl. The specific fix is contained in this patch. [PATCH 7/8] staging/rdma/hfi1: Reduce snoop locking scope in IOCTL handler. Thanks for the report, Ira -- 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/