Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp2651691ima; Sun, 3 Feb 2019 04:12:39 -0800 (PST) X-Google-Smtp-Source: ALg8bN60ZOcsCRgV+WHIpCjw88CYk5ed2Ckr8ZEx+7uJ2ewB0pfK5rJg/Qukk1MANAFhYq+Ojqiz X-Received: by 2002:a62:5c41:: with SMTP id q62mr47956381pfb.171.1549195959499; Sun, 03 Feb 2019 04:12:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549195959; cv=none; d=google.com; s=arc-20160816; b=I6MltKaO8Md2hsX5EEKVVp4s231Wf5QoCxokHZPUV9mG161mmBkVQiqiD786ZgE1KH fNmHTyuRsoTmO/bzRv4L1OLCn9MT1mIX9b+TtLbTIXZnlTsxq62URmjAZX2Jt9NDs/Qc BMqP8PHuPSY9E4mWq9aLn0B9+4L5avexkAI+A6iZbpiwyjsJ/X7d6G1f2tYwOiySLAR7 gxrrLeiA7foYLPHFwdWWryg4PNxF8PDIW/pDBePPLJ+ykuOdQQp3JqbX5aAf5O1bnkyk uB9Xm3a4TnNWzub6DcgezYrGOJDEZyp91Rhc+3InsykeZeEOtx0kgwhW4rKXHCVdul+b e8FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8SrF1ldydTiBZNiCjzZif0i3Yfeug4ftFhfixRtZHpw=; b=fYwS8modLNEZl8d4h++SHui6KRP2bqJ0vF0Mfm+v+zl3hziBSN3SXYzQaaTTpWT83s b+JYVihe5WQBXCytoMHPZg4Me3JJmUrSX+9ob5S+k7sO2lu4vwn28w5qPgWG/k0k63h1 W4fpn19Bs8cz5iz75hcmKzDRkoYHdO7XZbnyNFsNgdZHBk3LhPs3mV+fVITwAZyKhoHE HhwMcJ+HvHgjaa+44xuThhgDNJU6fWt+pElMPjoK+JyaPN4VH4Efk3u1BdQCs0BPDkSc cT4BimDosvgTfBrz/FWt/fwAvK/R0Eyz/EYn05mtFZlMVr4Sx7AgivYb4LkeO8qLRobI of/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pJsGlez9; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bg7si12808022plb.149.2019.02.03.04.12.23; Sun, 03 Feb 2019 04:12:39 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pJsGlez9; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727794AbfBCMLD (ORCPT + 99 others); Sun, 3 Feb 2019 07:11:03 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:37827 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727646AbfBCMLC (ORCPT ); Sun, 3 Feb 2019 07:11:02 -0500 Received: by mail-lj1-f193.google.com with SMTP id t18-v6so9436865ljd.4 for ; Sun, 03 Feb 2019 04:11:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8SrF1ldydTiBZNiCjzZif0i3Yfeug4ftFhfixRtZHpw=; b=pJsGlez92rrWhCVjLzcirAg32UfgdzZmz3h7IHlwSMeHDraTB7Az+ntFTMkWHQT8N2 vhuMi+jS1XIhIbR3VzbVgsxBQJI1didJosDf31B6hngRyB8PS53CxxYR/Rc5tc/g+EYC zJW8XqZe9g+X3OJiIUGV76zTpSaLQ3B+WeQIaHaQcNJHwOIq5HAbUnaog2y1NXfRrOlb btsjOSK1MNVgF/sYbuPDBRUk7whc5WI3p+6ho8cI6vTN0WddJ0eogXaxBMwINDFHl6pM pkS10Z9mC82aOkfkX6hczwBIxYVrdI8c+OqCSfWf1Gfh4lE8hHKYtOqfYbtQNFaJkPbA jflw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8SrF1ldydTiBZNiCjzZif0i3Yfeug4ftFhfixRtZHpw=; b=LRRL8EIMVS+Ve6wNqzAZUuLOcsgnKeddgcTbhVv2w+vzApUXkr+551vHIirE3BinaC MF8QEd/87v5jS24uiEuhSc5a5VWdt3AT0E/kAMS8LxkRGQmtXCJPwXOJ8RL/8mjvyyZJ qQl6j88KZ7BcQYkGySrc16BDDSvWD5/1H9mm+Dhf2/fSPnVp1yiVNoUqXdYNHd/H9K5l zFe35OqFkKxz9n33yM4Qzmeub6S0ldEF1Woymhd4rnPWf/puJyLl/Ucj5nHoe6xMfIBs gfXIS+AJhRZVKrR4hlFIHDlHSa+Z0S488usbLc3pCNJMawfDlpbVAeZzBZHuMenH2/cF JvGw== X-Gm-Message-State: AJcUukcjDQCbbP/axZk0LzOs4fryz6aGWIPRXIc2N9XNZh0Oe3ymopfc FnN2lzBlFVCI8QUsmJunb+piDnjbyhmtVl1zGIWRtA== X-Received: by 2002:a2e:5703:: with SMTP id l3-v6mr24761848ljb.106.1549195860175; Sun, 03 Feb 2019 04:11:00 -0800 (PST) MIME-Version: 1.0 References: <20190131030940.GA2305@jordon-HP-15-Notebook-PC> In-Reply-To: <20190131030940.GA2305@jordon-HP-15-Notebook-PC> From: Souptick Joarder Date: Sun, 3 Feb 2019 17:40:51 +0530 Message-ID: Subject: Re: [PATCHv2 3/9] drivers/firewire/core-iso.c: Convert to use vm_insert_range_buggy To: Andrew Morton , Matthew Wilcox , Michal Hocko , stefanr@s5r6.in-berlin.de, Russell King - ARM Linux , robin.murphy@arm.com Cc: linux-kernel@vger.kernel.org, Linux-MM , linux-arm-kernel@lists.infradead.org, linux1394-devel@lists.sourceforge.net 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 Hi Stefanr, On Thu, Jan 31, 2019 at 8:35 AM Souptick Joarder wrote: > > Convert to use vm_insert_range_buggy to map range of kernel memory > to user vma. > > This driver has ignored vm_pgoff and mapped the entire pages. We > could later "fix" these drivers to behave according to the normal > vm_pgoff offsetting simply by removing the _buggy suffix on the > function name and if that causes regressions, it gives us an easy > way to revert. > > Signed-off-by: Souptick Joarder Can you please help to review this patch ? > --- > drivers/firewire/core-iso.c | 15 ++------------- > 1 file changed, 2 insertions(+), 13 deletions(-) > > diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c > index 35e784c..99a6582 100644 > --- a/drivers/firewire/core-iso.c > +++ b/drivers/firewire/core-iso.c > @@ -107,19 +107,8 @@ int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card, > int fw_iso_buffer_map_vma(struct fw_iso_buffer *buffer, > struct vm_area_struct *vma) > { > - unsigned long uaddr; > - int i, err; > - > - uaddr = vma->vm_start; > - for (i = 0; i < buffer->page_count; i++) { > - err = vm_insert_page(vma, uaddr, buffer->pages[i]); > - if (err) > - return err; > - > - uaddr += PAGE_SIZE; > - } > - > - return 0; > + return vm_insert_range_buggy(vma, buffer->pages, > + buffer->page_count); > } > > void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer, > -- > 1.9.1 >