Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp115600imu; Thu, 24 Jan 2019 22:27:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN4xJrwrKtoD+VQRF8ThYoj2D4OcK2Z+G8iw3BieZwJrCiG+CDshqadNSmnmm8v+mDIs+qtG X-Received: by 2002:a62:7dcb:: with SMTP id y194mr9748086pfc.113.1548397674814; Thu, 24 Jan 2019 22:27:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548397674; cv=none; d=google.com; s=arc-20160816; b=Gq3Re3KTw4FqmthG8DyP23OwhMX1pVY5+zo7df0GyKiwJohbB5EIEIIqbXGfnB5Hki Rp8rZ7vGP3oPWpjndv05HGfobnH3AZ4OToqz9Srwdb7cy+i6W0lsPNEApkP/LTc9x0c+ NtHLpzG/WcRBcaO5kJnFRKWckdjcUrU6BAUXYhiyIoAjVpuC3GIZnl5D8n/waO+T5N4c sD0i46W+tNtuwQ2GYjOFclktmZ9uAuz/ww+R2f/PqOjBvIPmf0iuW/zsVtJdlcp6XXfB pK4iHIvtNy0M6KcSl4AzwmNgdVavrOZqEbFNqRfZD6mpcDp6WTNaBCgaAxIjah9ah4vM fMYg== 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=aWkGNsj9H+PPXdmDM8jphreLemaKpKVhG6fjRtFnO8Q=; b=LKr7M/bQqh/n7R9hnp2IvM3G1207IQQUk6/9KxQXf4/cgOSrXz7nwwT3/V+DBUCbBI 5W+azmiU9+Dgq3F0OPvhhgXqMMKpdH86rSNMaRtYBLlZkW30DKotkfdNj4hVLwoa1v61 i+uSxPKNpciMRWTWSYKFN83+20KNWuUYqy9JhjNz6WzjxLhgrkz02lmBLF2oNnM2XJED yYENepkZ0AqiKCb9T1NerOO6T8KnitKC85X0e5J9fLZV+bDMRx9PuKz74plg2qH0xhH6 I4z3YxhCX07Ns04Q5GnWo6KHabLFKdSzUn+x8WWbLJGlD7TUagL1n/tmI59rnYLtrHUw Ajrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YupNbHs7; 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 t10si24927164plh.307.2019.01.24.22.27.25; Thu, 24 Jan 2019 22:27:54 -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=YupNbHs7; 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 S1727246AbfAYGZR (ORCPT + 99 others); Fri, 25 Jan 2019 01:25:17 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:45609 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbfAYGZR (ORCPT ); Fri, 25 Jan 2019 01:25:17 -0500 Received: by mail-lf1-f67.google.com with SMTP id b20so6101417lfa.12 for ; Thu, 24 Jan 2019 22:25:15 -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=aWkGNsj9H+PPXdmDM8jphreLemaKpKVhG6fjRtFnO8Q=; b=YupNbHs7iQOuXsIbeTOXEVnZWfkYovxF20NQ9awvZDPy3o8iS3gw202JHD+bqIdggi UC14YfN4ZrjI7wuEC4DsSOrSczpv/7Y3Wf4HmgUgvtwNLvJKceDaTs8OI5dH73FH9cQD LY6TE4NtmLMKmcOTYdiuV4C8EDCAetO1QZCN9xqdK/xdCRgoQ6YoFfk4NseNKYsX3tLi Qc0/b7DsS7n+1jljKTJNoyZYK+mwbbZMW5CEsPWDVwNh7AN1d5Ycmr9yKEvU94TgPNyk JdQSXkO376pFgoEgPwv5M9iT0TLyDJytBSp3tnVR7+XNKX8CyRS3SRRnWZJuLkvJ1pKJ fUgw== 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=aWkGNsj9H+PPXdmDM8jphreLemaKpKVhG6fjRtFnO8Q=; b=bkvpVEsf1rykPccNnVu2spax88OMiZIqK8xYCxBg5bUKvcfOHrG59dXvewoV+uvB8j 7mZuvnhrX7Gz/P64hrQ9ImqcSk91CKt+r/N3GIilSocy7azVD+lJr9WoqWVBe25W4/HA 0gtFP9NDliheZVGg5mpEs0YXjk88UIKd+HGeEH8ZsRAQBC6Tt7X4mJWInMeZnSytPZm0 p9aQ6p8qgyY16ZOwHet9yht5i6CeXKO7LCn8otjd59ahlCGhSNRJ5HZXVTwnh5SekNVG YUK+HVRIpEQz2zTxoMWZ1950KWEgXlcrRhQqWxdvVxx0k/JVlakHrDmAoFmYfO9z04Bv R+WQ== X-Gm-Message-State: AJcUukdfPDYwgiP1cmc4gnHIhVQxDo2ElARdroHZ5tnYJbYSEgvZ3lSt BCdZrYbI+rTD6WJy+4bwVVuHkMiwnCBdgEKR1ic= X-Received: by 2002:a19:7dc2:: with SMTP id y185mr7847121lfc.27.1548397514916; Thu, 24 Jan 2019 22:25:14 -0800 (PST) MIME-Version: 1.0 References: <20190111150834.GA2744@jordon-HP-15-Notebook-PC> In-Reply-To: <20190111150834.GA2744@jordon-HP-15-Notebook-PC> From: Souptick Joarder Date: Fri, 25 Jan 2019 11:55:03 +0530 Message-ID: Subject: Re: [PATCH 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 On Fri, Jan 11, 2019 at 8:34 PM 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 Any comment on 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 >