Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753861AbdFMVBz (ORCPT ); Tue, 13 Jun 2017 17:01:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55042 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752109AbdFMVBy (ORCPT ); Tue, 13 Jun 2017 17:01:54 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A2A5980C2A Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dledford@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A2A5980C2A Message-ID: <1497387712.7171.245.camel@redhat.com> Subject: Re: [PATCH V5] rxe: Fix a sleep-in-atomic bug in post_one_send From: Doug Ledford To: Jia-Ju Bai , monis@mellanox.com, sean.hefty@intel.com, hal.rosenstock@gmail.com, yuval.shaia@oracle.com Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 13 Jun 2017 17:01:52 -0400 In-Reply-To: <1496665420-8100-1-git-send-email-baijiaju1990@163.com> References: <1496665420-8100-1-git-send-email-baijiaju1990@163.com> Organization: Red Hat, Inc. Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 13 Jun 2017 21:01:53 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 661 Lines: 22 On Mon, 2017-06-05 at 20:23 +0800, Jia-Ju Bai wrote: > The driver may sleep under a spin lock, and the function call path > is: > post_one_send (acquire the lock by spin_lock_irqsave) >   init_send_wqe >     copy_from_user --> may sleep > > There is no flow that makes "qp->is_user" true, and copy_from_user > may > cause bug when a non-user pointer is used. So the lines of > copy_from_user > and check of "qp->is_user" are removed. > > Signed-off-by: Jia-Ju Bai Thanks, applied. -- Doug Ledford     GPG KeyID: B826A3330E572FDD     Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD