From mboxrd@z Thu Jan 1 00:00:00 1970 From: "ira.weiny" Subject: Re: [BUG] IB/hfi1: might sleep under spinlock in hfi1_ioctl() Date: Fri, 30 Oct 2015 19:58:18 -0400 Message-ID: <20151030235817.GA13800@phlsvsds.ph.intel.com> References: <1446240749-5003-1-git-send-email-khoroshilov@ispras.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1446240749-5003-1-git-send-email-khoroshilov-ufN2psIa012HXe+LvDLADg@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Alexey Khoroshilov Cc: Mike Marciniszyn , Doug Ledford , Sean Hefty , Hal Rosenstock , Greg Kroah-Hartman , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, ldv-project-tpLiQldItUH5n4uC9ZG1Ww@public.gmane.org List-Id: linux-rdma@vger.kernel.org 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. Thanks, Ira -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753722AbbJ3X6Y (ORCPT ); Fri, 30 Oct 2015 19:58:24 -0400 Received: from mga01.intel.com ([192.55.52.88]:51600 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751848AbbJ3X6W (ORCPT ); Fri, 30 Oct 2015 19:58:22 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,221,1444719600"; d="scan'208";a="675402945" Date: Fri, 30 Oct 2015 19:58:18 -0400 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: <20151030235817.GA13800@phlsvsds.ph.intel.com> References: <1446240749-5003-1-git-send-email-khoroshilov@ispras.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446240749-5003-1-git-send-email-khoroshilov@ispras.ru> User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, Ira