From patchwork Mon Sep 15 13:22:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "eagle.rtlinux" X-Patchwork-Id: 4905371 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A77D09F2EC for ; Mon, 15 Sep 2014 13:21:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5EEFD20218 for ; Mon, 15 Sep 2014 13:23:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2413E201DE for ; Mon, 15 Sep 2014 13:23:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752224AbaIONXp (ORCPT ); Mon, 15 Sep 2014 09:23:45 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:63983 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752151AbaIONXo (ORCPT ); Mon, 15 Sep 2014 09:23:44 -0400 Received: by mail-pa0-f44.google.com with SMTP id kx10so6405889pab.17 for ; Mon, 15 Sep 2014 06:23:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=yNHVzZSLXsli8R+Lyi4rfTUv1slWg5dvQfAe4a6gU6w=; b=g3g3CGEh1N0mK1/UQ4E4Fua7RDx/y2wqnnxjEXLTunToXJtHMKblV2RcNhOcMs0UyM hYTm+D0tQmaLEO8Am+w7lG9KS0ON5/WwE+Fh1tVw66kC14d3xWls5QBt749QnppiFhnB Dq67KyX+tzdj2uwoGLPNsA5cYQGHCtMRudsVFktK5wr4s+leMbgyU1+rZtp67JL+48l/ s0xwyVbdA/w8prOc0EifkPLWuJn2YqbKzhmW6G6e3ZGE0AGWMyWQbQbRNBG4Fk5d7aXz kEmQqp3zn2XC6M/KDMp7fS3p+q0JmAkN68/SEvJWF3Ckxn6TxhispfpkrARTAPccKiB+ tVRg== X-Received: by 10.68.102.132 with SMTP id fo4mr39167080pbb.96.1410787424114; Mon, 15 Sep 2014 06:23:44 -0700 (PDT) Received: from [192.168.1.101] ([124.202.190.85]) by mx.google.com with ESMTPSA id hz1sm11419083pbb.75.2014.09.15.06.23.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Sep 2014 06:23:43 -0700 (PDT) Message-ID: <5416E80C.7010705@gmail.com> Date: Mon, 15 Sep 2014 21:22:20 +0800 From: "eagle.rtlinux" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: linux-kernel@vger.kernel.org CC: infinipath@intel.com, roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com, linux-rdma@vger.kernel.org, eagle.rtlinux@gmail.com Subject: [PATCH] Infiniband coding mistake fixed. Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP hello, The last parameter of get_user_pages should be a array of pointers to vmas corresponding to each page. Through this coding mistake can not cause some problem now, it is a potential time bomb. Signed-off-by: Yang Honggang --- drivers/infiniband/hw/qib/qib_user_pages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) } diff --git a/drivers/infiniband/hw/qib/qib_user_pages.c b/drivers/infiniband/hw/qib/qib_user_pages.c index 2bc1d2b..e93d459 100644 --- a/drivers/infiniband/hw/qib/qib_user_pages.c +++ b/drivers/infiniband/hw/qib/qib_user_pages.c @@ -69,7 +69,7 @@ static int __qib_get_user_pages(unsigned long start_page, size_t num_pages, ret = get_user_pages(current, current->mm, start_page + got * PAGE_SIZE, num_pages - got, 1, 1, - p + got, vma); + p + got, vma + got); if (ret < 0) goto bail_release;