Received: by 10.213.65.68 with SMTP id h4csp245817imn; Fri, 23 Mar 2018 03:50:01 -0700 (PDT) X-Google-Smtp-Source: AG47ELtdVlYF4zdA3meNHzx5Zo6aI8rCzRvT0t26fjp+nAxkRV7SERF5VwX+emXdHKPUjb8tIZCs X-Received: by 2002:a17:902:96a:: with SMTP id 97-v6mr28798982plm.183.1521802201660; Fri, 23 Mar 2018 03:50:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521802201; cv=none; d=google.com; s=arc-20160816; b=qy47Vr5MH860COaWwO30dslBtIvYvXSSipvdJPYCDP8Y76QdwUkUBlUlASiCQB8FQP MMzuQH9jpr7AJw5UpQPoWMPZv2/i0mJ04epcz/Sgsrb9PfQaeBgaYqCouxfeEUf2So55 sU9WiOFB2pRYq6sm1mD11D1DIyAxEsT1KxqrEj2B4XS+iVgJEkr2cbXRYJvY+9RQE9GU BXrMYrRAp/sYUcMj6ccS1Z90niCEndKUY+Aa77ksvHNGuvlN5TAJ5fR++qQ/v+KEsZtR f820ECEHWOwiZX0HomkX/qMAnAh6Mjy4IJWFxn+7fkz4OB7XXr8jTkgY8k2QF7FmGOli T3wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=MCdq3R031MJof8VkxQnKEtXyOx2sgmhFWPubTkz/vCw=; b=VPb5ziUvnKLUl0oFeYRI+dPmOnbQAzWhosrhHgrw3Jhq9EUPNsqlB+KMIbxvxrHzeN 2BvgBsXU3TfOUULIUT4CBLsySM1qdmGbGnC/mckpM9PmULj99leCUVbBedop8YLRa4B4 qfsRvAtAmuTbl0t3UKbBG+9CMKyzaroX3LlUg6cSpAxPSNjLOSQqLxEOiTdtKqTfS4uV XjQ5AfqAUlcIuodzHY392TwsvKa1iu/J+88YdaDHJttP7yzGdt/hsKpU4ubHY64kyPWt MULHMY/PZPrBA734kuE+294JIuQbgnICCwnsr5SKxCiOAFqdynMpYJVJZne1roTfqfJz U6ZQ== 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 d186si5865951pgc.81.2018.03.23.03.49.47; Fri, 23 Mar 2018 03:50:01 -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 S933415AbeCWKPJ (ORCPT + 99 others); Fri, 23 Mar 2018 06:15:09 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45472 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933400AbeCWKPD (ORCPT ); Fri, 23 Mar 2018 06:15:03 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 262C3119C; Fri, 23 Mar 2018 10:15:02 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maor Gottlieb , Leon Romanovsky , Doug Ledford , Sasha Levin Subject: [PATCH 4.4 35/97] IB/mlx4: Change vma from shared to private Date: Fri, 23 Mar 2018 10:54:22 +0100 Message-Id: <20180323094159.639962651@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094157.535925724@linuxfoundation.org> References: <20180323094157.535925724@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Maor Gottlieb [ Upstream commit ca37a664a8e4e9988b220988ceb4d79e3316f195 ] Anonymous VMA (->vm_ops == NULL) cannot be shared, otherwise it would lead to SIGBUS. Remove the shared flags from the vma after we change it to be anonymous. This is easily reproduced by doing modprobe -r while running a user-space application such as raw_ethernet_bw. Fixes: ae184ddeca5db ('IB/mlx4_ib: Disassociate support') Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/mlx4/main.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -1055,6 +1055,8 @@ static void mlx4_ib_disassociate_ucontex BUG_ON(1); } + context->hw_bar_info[i].vma->vm_flags &= + ~(VM_SHARED | VM_MAYSHARE); /* context going to be destroyed, should not access ops any more */ context->hw_bar_info[i].vma->vm_ops = NULL; }