Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp349709ybt; Wed, 17 Jun 2020 02:34:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCIKf/RrR2OlJ/IXr/s0vQaanDC0iTvxuNNgPvohFUcK88ZJBXjfpULCjPd4aGk7hlZv4T X-Received: by 2002:a50:8b44:: with SMTP id l62mr6558957edl.72.1592386447584; Wed, 17 Jun 2020 02:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592386447; cv=none; d=google.com; s=arc-20160816; b=VU+BWtJvFjvc0nr0VlbyeA+DMLfO1ZE4jnFRymKKx7lg9Eggnu8BRt+q0INRxGMlbC BI3JsikbdmpXtSTe6i7+OSXteowb6s/VxJFsB7E0p1r9aJffByq0VHMJjQusJiu6CKYu dpI5g2D0ze+ruX4VuI117cROicoksY0PAVycwKKvTzqSa66MVwAsMU2ht6OA4Y6p3SDo Sz0aXDCwHgB34/ZN+2VO+b6NnpQIAj6w7AziLe0tq7NjWnI5fH9LudWIL0GwNZwRq40r yQbhyzm5hP1qKhrxAgvXT8dgNn1f0Mbf2hNvjVXdLKlQnVb+UoHndjrVReCgw7vxiCh2 e4Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=cTmd5tX6YVYoIxY4tpUy+apEsuQqZLQPN2tP1qBmaWs=; b=1F3FbLfzA0rhD8gUfOmjuJ7hNeyNBIJqOgg1hJryWD6Xj7kO/JVv253BcsNFCvzbiU u/P/ByUXFsoJYAkJ71MOFGDGm1NMKjqomOUfJUIeVJp4FzB7DBnWDoZZFJw12c+Qp6LS X/a5FZEEEA0g4l9lRVuxg9mPmDVIM5rJCOMxO48BZZDwTngaXs4jY6tNL21bOWoPqBT5 74M+ARpT/KidEchHku0KZEcZtbde6K/W+qBwTMMSE/xxnmLWl6nUtc3qSjEl7WBSeA7T F9DdLuOtS1hJB0mwjCUKopxjsA0WeAQmru0uO1Okeb7NGHIx577oE0tMmzvMTcbncgOv m4sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UbutnNHT; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si12148159eji.721.2020.06.17.02.33.33; Wed, 17 Jun 2020 02:34:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UbutnNHT; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726275AbgFQJcg (ORCPT + 99 others); Wed, 17 Jun 2020 05:32:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725554AbgFQJcc (ORCPT ); Wed, 17 Jun 2020 05:32:32 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7375C06174E for ; Wed, 17 Jun 2020 02:32:29 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id mb16so1581792ejb.4 for ; Wed, 17 Jun 2020 02:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cTmd5tX6YVYoIxY4tpUy+apEsuQqZLQPN2tP1qBmaWs=; b=UbutnNHTQwhmHowciBnS6G2F8ot4diXcsL2QMDte9vC4ANIEyGGtivu1J6xAobtx0l LG6+/q0CKuQhAUeehhOYn/ssnfAkMft+pGrNKiUyMcadMPsNf6SHPWMIqtqEReKqauwA DBH5tL6/XGPuA+RqoWP6waLtpNQrn0YKnyJ5kAnkLAcT2G+540YKljKU7joTcoy6Zzds K8p1U8PR88QXqO67erDw6E11SM42uV1S9b2OIwPyXK8ILyYP81IIrXi3mBJOoiVX7ksp NoOewQ7GoqzZ40VrhkW9eU4r07QVk2amn6UFFZ6v07P2n9uwqktaBwI0sEkgCDEyfuPE XtLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cTmd5tX6YVYoIxY4tpUy+apEsuQqZLQPN2tP1qBmaWs=; b=Y4MMsFAhQ6OAlrKLjdtZLbi3R97iRYiiEuoEOQiIJpg2cRtjYB49ORZdC2rlHv3W+w SwJD8/7OWqjanws4q1NCRKmfL/BQW06gEjbPk9ufQowUmWSicF0JaN4CqRHRXPaFRCDP qRDrnxpt7sfyFJxzVuAV+0rUXh6oe0ZQQ5h9GmzRUBTwr9PgnvxC1vrzn7wezRkZkWAR jvtZp0BWtmeNVE8YXqln/jiFpxBL4nIjJpBIcDyO1MfVORoB1DX+K49m1cpn71zvLHZc X8tmqgoEyDxEhDNx1SMWjL2tMr+5Jtzn/B1smYPoYLZ0PDPfI4t/m33zCwAZE0i8cKXm S5ew== X-Gm-Message-State: AOAM531IQFdoi3tpSP7X2b8On0fMY8mTvTpdKQgrjz30o3vOKN4wre37 PQeORNfvtn69i7CkPvTRwZ72FA== X-Received: by 2002:a17:906:7693:: with SMTP id o19mr6318850ejm.295.1592386348039; Wed, 17 Jun 2020 02:32:28 -0700 (PDT) Received: from myrica ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id y12sm9380552edj.37.2020.06.17.02.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 02:32:27 -0700 (PDT) Date: Wed, 17 Jun 2020 11:32:17 +0200 From: Jean-Philippe Brucker To: Zhangfei Gao Cc: Greg Kroah-Hartman , Arnd Bergmann , Herbert Xu , kenneth-lee-2012@foxmail.com, Wangzhou , linux-accelerators@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, iommu@lists.linux-foundation.org Subject: Re: [PATCH] uacce: remove uacce_vma_fault Message-ID: <20200617093217.GD871763@myrica> References: <1592229357-1904-1-git-send-email-zhangfei.gao@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1592229357-1904-1-git-send-email-zhangfei.gao@linaro.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Jun 15, 2020 at 09:55:57PM +0800, Zhangfei Gao wrote: > Fix NULL pointer error if removing uacce's parent module during app's > running. SIGBUS is already reported by do_page_fault, so uacce_vma_fault > is not needed. If providing vma_fault, vmf->page has to be filled as well, > required by __do_fault. > > Reported-by: Jean-Philippe Brucker > Signed-off-by: Zhangfei Gao Reviewed-by: Jean-Philippe Brucker > --- > drivers/misc/uacce/uacce.c | 9 --------- > 1 file changed, 9 deletions(-) > > diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c > index 107028e..aa91f69 100644 > --- a/drivers/misc/uacce/uacce.c > +++ b/drivers/misc/uacce/uacce.c > @@ -179,14 +179,6 @@ static int uacce_fops_release(struct inode *inode, struct file *filep) > return 0; > } > > -static vm_fault_t uacce_vma_fault(struct vm_fault *vmf) > -{ > - if (vmf->flags & (FAULT_FLAG_MKWRITE | FAULT_FLAG_WRITE)) > - return VM_FAULT_SIGBUS; > - > - return 0; > -} > - > static void uacce_vma_close(struct vm_area_struct *vma) > { > struct uacce_queue *q = vma->vm_private_data; > @@ -199,7 +191,6 @@ static void uacce_vma_close(struct vm_area_struct *vma) > } > > static const struct vm_operations_struct uacce_vm_ops = { > - .fault = uacce_vma_fault, > .close = uacce_vma_close, > }; > > -- > 2.7.4 >