Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp88872pxv; Wed, 30 Jun 2021 00:18:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZMIPtAG3iDKVEjKy/AkX+WEkanX7Pdp4ME1BiawZT+fm4L/FTvSX7TlueB1pKr6YHW/n2 X-Received: by 2002:a6b:3119:: with SMTP id j25mr6664038ioa.64.1625037532710; Wed, 30 Jun 2021 00:18:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625037532; cv=none; d=google.com; s=arc-20160816; b=UR/6ZN4HR4sq/rKxqR1JJ81OgGCsgMzqpf4kPWz2tO6L2eeHDMyuwfo2Q65+W/wa1Q heYZX0KRfmMG2YdLEY46ngnSe/QfzC3lpf3C/K9cHPaGeNCf2x8xD0f6pL8Ae+0lNIdn O4ZzHlknFx2J1q5B36ucy9knZ63DL5tYEIUpZsKxFYhjfENojPnPqf+S5ekg3C1FiaM+ d5QVIlCLiNj5ZEL7vuHt9MubPURrYv0FRcwY/okslkFGAKZ2CXBA5SuEdV/k7M64jd/d 21Fh13tNhNLESnzlHzVYpvzEPLnaTAG+WwzPUbKXDfOiISHX4XAzBGmVdiwIJSpimo4X MDag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AmLWm8f1+xjYGNy9dtQzaNaqp/ZZfO73MYaUMsPh1Dg=; b=FoAeg/Qn8erIu4H6HBh+9NLKPablCy8BLsOu80QnWaFzN8nxLcGJWCRT96Y/3ROjbj 8crgLjwGJyny2svzITdVCgX5KVAuDQXxlFoAIg7f54hFpPRGJtRCnMHAdxfzT8xM9G9L My/1uI1Bxgfgy4pwEBvrnmvM10fSjnnxEUViMxVRZK7rdq3dHPSrBnIuNkrtVM1DbtUl I507l6wya0CEfvDGHQDaZ62Ka9TDpEHChi0/st1S6JZkaTRYeKSFl0/wPOxPVOkqY0uS MTeaIRMH4UO2c+r9032CwrwqkisGTpexuCZ0rRLYyfX8fO3TJLip3iwXhQCihnyHXYAV M9nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=F8b+pRoM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si6083337ill.15.2021.06.30.00.18.40; Wed, 30 Jun 2021 00:18:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=F8b+pRoM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232802AbhF3HUK (ORCPT + 99 others); Wed, 30 Jun 2021 03:20:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232705AbhF3HUK (ORCPT ); Wed, 30 Jun 2021 03:20:10 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDECFC061766; Wed, 30 Jun 2021 00:17:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=AmLWm8f1+xjYGNy9dtQzaNaqp/ZZfO73MYaUMsPh1Dg=; b=F8b+pRoMBgZQhdcjcephjDNsSI VA/3Xojz0o/TRMdjW+z7a/VKUfEThgnYdDQaUcXc4PejZicM3AxahMUxxLqkGboHXMP29hAd5ThOl Ut2N2h7kiLB3fYN9IkffojJT7nZ3varaq5I4oZyrJPNNx7pC7QEtI75+5oVoOgwTEjajRzSeKXdgZ ZeJB4jzuhqkMY/QmAvbpQR78Q60mh0OKr3Mm3QpU2Sj3nL/cJtuPLXgSvGhtFoQ4sgl0p94E3w6IS pBQfqFXCTEtDx91plZxAtTNyTIqBMPHiPdiWcMQhZFYvkmgv4XIBEGO6shDHjz2vX+YtN5EX5o59f HDi2xZWQ==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyUSb-0051uJ-FJ; Wed, 30 Jun 2021 07:16:48 +0000 Date: Wed, 30 Jun 2021 08:16:37 +0100 From: Christoph Hellwig To: Leon Romanovsky Cc: Christoph Hellwig , Doug Ledford , Jason Gunthorpe , Maor Gottlieb , Dennis Dalessandro , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Mike Marciniszyn , Yishai Hadas , Zhu Yanjun Subject: Re: [PATCH rdma-next v1 1/2] lib/scatterlist: Fix wrong update of orig_nents Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 30, 2021 at 10:02:11AM +0300, Leon Romanovsky wrote: > Another possible solution is to change __sg_alloc_table()/__sg_alloc_table_from_pages > to return total_nents and expect from the users to store it internally and pass > it later to the __sg_free_table(). > > Something like that. Yes, that sounds pretty reasonable.