Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5698077imu; Wed, 30 Jan 2019 01:59:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN7b1QoKtznh4Rz/Ia24oDA9q9gVtPJhaSQ155FVScw9dodhSQ3PgpDnJc8XzypYFbReBnTG X-Received: by 2002:a17:902:b20e:: with SMTP id t14mr29822077plr.128.1548842376799; Wed, 30 Jan 2019 01:59:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548842376; cv=none; d=google.com; s=arc-20160816; b=PRMTo5Vd+dOLBYVL87evBwJNiTpcCWtAuvCSBcA06knpLDs4O3CG9IZO6AjkvsvxR7 lvIaJa3N3DBy0w88JGviXbr0hqnBhELIgjhX61faXgDFtgu8hG7AGGx1F0oqemZmAKty 84HzriQCQ2RVtF9hLXE9Ae1QRgycsuVHJzt1XWzQBbNuHR7jALeyQv40gISfiU624jPt 0MkAmFlv13uFSuohjOEiYCegH3vnojFPABxOS1JI3vUSzNEYcomhoBd5dESuY0IiwFCp b4UDAYO5TJZN64QGswp05vcPbA0ru7dm0Bt6/XnzhYYifb14utwYpxo9+cA8/tqHglSM vKFw== 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=fO9lml+l22jOIyAkjdHX9mgdNk63cVEuzFUCTmyVOGY=; b=wswSNCc1h7okBCg4iWbXENtrTXkykeXp9RW6ntNQk8oZ1xXlhOmOidxzZaQRfg1k2V H40qn2gFesfLey51mok48nhwAHakRACo0k6XVgidr+SyXZKuwRCbAADvMW+2de+ubFTU g3Vu2zgTcdSU+6RD3BZDkbo9dygbpDzOqTi03Vr1e+ZpEOFj/U1qlwNp7A29nfAD3t0P w+2H1UJWmdDFAB8MoYCxCGC9aR8Oh430YgD4Llc5Ks0LuqBs9oip6/V+wixgks5wtn1Q ko55v8wpdpd7cWJVq79bS5tidVn3vNi/uhyQlyh4nVqVwfobsCkDDYqIrPbmhH9O6Fjw RgKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FgZnM72Z; 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 r29si894123pga.477.2019.01.30.01.59.21; Wed, 30 Jan 2019 01:59:36 -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=FgZnM72Z; 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 S1729665AbfA3J7K (ORCPT + 99 others); Wed, 30 Jan 2019 04:59:10 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:41500 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726406AbfA3J7J (ORCPT ); Wed, 30 Jan 2019 04:59:09 -0500 Received: by mail-lj1-f195.google.com with SMTP id k15-v6so20140300ljc.8 for ; Wed, 30 Jan 2019 01:59:08 -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=fO9lml+l22jOIyAkjdHX9mgdNk63cVEuzFUCTmyVOGY=; b=FgZnM72ZgZjEW0ORM0btMd9MaPOSZrwy4G9BeQws0rUHuJHemFIVbE0ZCoZpaoosFw N3PdCNT6kXYw8DLArD26ROZeZzX8+8jjnLe36XfsiwPdVYaU43zXcTbDoeiwCN+mqekZ zsoH+T/bie3kWtmE8bXeQ2qFizuDognaAGSBbIlF5jIr4yvCiyJNi5O0iEa6OXD864pj BpkiZ0YjlrSKJQbkgDtZBfRpE+Ti0E2FKogNXGRbdJ+XauSFmM8wamMDzXg6IiWxAQg2 S+Sq6rxtBEO6tnO7W5lo0N1bX0uEQxNNNyjyTB1Ey2rgMaID4CY2GUA+/xaXoy8YJvrH vAxg== 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=fO9lml+l22jOIyAkjdHX9mgdNk63cVEuzFUCTmyVOGY=; b=YzVujh0A0GDdbMxinmrhiEFW+ers5FHx2Jdmmz4G6Xszg57VwspP1rgtlFo0R73BsA ibULt2AVjea60+ohd06yhsBLjFnUSLP2CwJJNy+mJPIeCyTVHoUtDu5arHWKahgyxvM7 x3L4RttwvWHAuHf6otKMjl7G/M11f95ou0IpWdCGZCz19To/j73eChHKN68D8gXSuTpS rheX4O7rT7DDDUOvivL50AEuCIXGdpNENU4LN/HNMEE+Nmq/yNwY7MO8OwaO7OGY3Pg3 RuMJqAWxfNOsg579y0m8YinuaaKEd5dF53cSyUpNZqV/JVuE42xNMkV1r47hM8Tqanb0 YDQg== X-Gm-Message-State: AJcUukcC01+skE0l8xPzbpYLT3sFkO4vSSE3AN14cKVc4zKZ9UKQsYbS xtnq6tF9WCNjdN1cPRAT9G8wnCWG40onViPHKXw= X-Received: by 2002:a2e:5854:: with SMTP id x20-v6mr23772381ljd.31.1548842347483; Wed, 30 Jan 2019 01:59:07 -0800 (PST) MIME-Version: 1.0 References: <20190111150834.GA2744@jordon-HP-15-Notebook-PC> In-Reply-To: From: Souptick Joarder Date: Wed, 30 Jan 2019 15:28:55 +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 25, 2019 at 11:55 AM Souptick Joarder wrote: > > 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 ? 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 > >