Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp2093922rdb; Wed, 31 Jan 2024 20:47:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpatOzvkKIfTtU2Vq2LLvpFV6jLwuwdgyh5N+CKsd4DaX7/yT+Lz4YDtFzI9mtchegK+eJ X-Received: by 2002:a67:f24e:0:b0:46b:449e:7f5f with SMTP id y14-20020a67f24e000000b0046b449e7f5fmr2709000vsm.4.1706762848597; Wed, 31 Jan 2024 20:47:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706762848; cv=pass; d=google.com; s=arc-20160816; b=U14v9Htdholw2R+OCEfzbWHpQDTqrg7q+1k7Va68/h38t/rfDeKWSulc27GIsC5Os2 Otl47vCi8pTk6ITt4C61xHPWAyVlFCOKbpooILxC/hmtkZHk1OKZi4HgR2VrMg0SiZEA 5DFKvTfX92rq9C1fWGv/1apL26gThuPmcpUv74ECwfSKeFfdZU/C0bKX68TvrK9MoWmb PuFBTH0wVqYZm9PlJwROJYAbEhY5gAEWUG6GgKiQn5s3Ye45R0JeFb4XwFABI6h70xnn oyaifaQD0EwsVVqIvHvCwoocUEvhvkxh1vq3/31yfoMAGMglHFGM4xikbWadT6nM6C/W cFLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=W7TWKl/VSfhJACxSjxeRIx+nVpeMlx+zyRllwA5BNxk=; fh=ue+WjIPtOEjy5WBApWDL75YY16LTI6OAEBineQsAnZw=; b=C4uo4lQnMiy5piTwygmjAU4MXyQwwKYnfbEyViwPtrvcgxZAdLBhIWmjxnq4goskvw KAMconfcOD1JhIRwybc5QP/twMyhWnaCZMRB5f4iQqAnv2A9e6E+8tKmfCgh1qMmOiuQ j/I6dxxfUcBvWe50YYbE3+xg3oztnP5vzFo4bRuhijvUIs+mv9oDpX2Rc4+XikBFnAZz eTilkafhCgVBd+9CtODb2hRQLaKfSkHgrNP9+oBPAUvl2RpuXg83Wnwg2xae8nhB/j+E 2MNVvTOWw/sEyVyt0RPRGY/iifvYypmaoPXzgY1Ycg/vh4mKyXMpKps6KI9y2TUMiBPe Om0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-47626-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47626-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXafm9+FY1/SVTif+Es6uz3/kbWZmoO/McenEgM2ZTGA27IHF4NdcI42HkE6fyvtYcAB0TeVxNH/panpmbM4AGXLCy/pbAjy6jTd3Vsuw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id es20-20020a056214193400b0068c7c407d21si394552qvb.172.2024.01.31.20.47.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 20:47:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47626-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-47626-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47626-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D6DD51C2587E for ; Thu, 1 Feb 2024 04:45:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF23C3C070; Thu, 1 Feb 2024 04:45:26 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 014DA33CC6; Thu, 1 Feb 2024 04:45:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706762726; cv=none; b=Uib4kjKvFZF+7STbcT/G8I/QRm+5X3t9qn5yPfy6V/IOYcvED4uErivB8Yyd0ho5GYknG+SvLkc/B7ioo8bkiFSwzOvIODiGXIH/IX3cpyhUHVOCTls8KnmOqniLabKiOlQQBDdYsydh7L7wK5iZUmvjJQ1ePFYlw0l15QqjRqM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706762726; c=relaxed/simple; bh=/uEIaX0EFZlt3rhgTjhZlC75KcpuGmzm/ZLfFTjsxe0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ker63R92g7RSqW+ussWIMYPJE4iX9Pth6lXwiiVA9iksV84JKR19i7GsZCbfGvAaHxfikyVIiGbS5Kilze4SwzhmOA6HUgdUR8rHwKxULmkvfG052IG/ag85z8qWTB14GjubdRPZFcY4fzXujEZ8JJGFRwq1MaON2t/CCVZ819s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 73CEF68AFE; Thu, 1 Feb 2024 05:45:21 +0100 (CET) Date: Thu, 1 Feb 2024 05:45:21 +0100 From: Christoph Hellwig To: Greg Kroah-Hartman Cc: Chris Leech , Nilesh Javali , Christoph Hellwig , John Meneghini , Lee Duncan , Mike Christie , Hannes Reinecke , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, GR-QLogic-Storage-Upstream@marvell.com Subject: Re: [PATCH 2/2] cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT Message-ID: <20240201044521.GB14176@lst.de> References: <20240131191732.3247996-1-cleech@redhat.com> <20240131191732.3247996-3-cleech@redhat.com> <2024013125-unraveled-definite-7fc6@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2024013125-unraveled-definite-7fc6@gregkh> User-Agent: Mutt/1.5.17 (2007-11-01) On Wed, Jan 31, 2024 at 01:29:56PM -0800, Greg Kroah-Hartman wrote: > On Wed, Jan 31, 2024 at 11:17:32AM -0800, Chris Leech wrote: > > Use the UIO_MEM_DMA_COHERENT type to properly handle mmap for > > dma_alloc_coherent buffers. > > > > The cnic l2_ring and l2_buf mmaps have caused page refcount issues as > > the dma_alloc_coherent no longer provide __GFP_COMP allocation as per > > commit "dma-mapping: reject __GFP_COMP in dma_alloc_attrs". > > > > Fix this by having the uio device use dma_mmap_coherent. > > > > The bnx2 and bnx2x status block allocations are also dma_alloc_coherent, > > and should use dma_mmap_coherent. They don't allocate multiple pages, > > but this interface does not work correctly with an iommu enabled unless > > dma_mmap_coherent is used. > > > > Fixes: bb73955c0b1d ("cnic: don't pass bogus GFP_ flags to dma_alloc_coherent") > > This is really the commit that broke things? By adding this, are you > expecting anyone to backport this change to older kernels? Well, the driver has literally been broken since day 1. The above commit is what made people finally care as it also broke on more common setups. So I'm not sure the fixes tag is correct.