Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753950AbdLMV7d (ORCPT ); Wed, 13 Dec 2017 16:59:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:55440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753215AbdLMV7a (ORCPT ); Wed, 13 Dec 2017 16:59:30 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0051218BC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Wed, 13 Dec 2017 15:59:25 -0600 From: Bjorn Helgaas To: Niklas Cassel Cc: linux-pci@vger.kernel.org, kishon@ti.com, Niklas Cassel , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/3] Fix find_first_zero_bit() usage Message-ID: <20171213215925.GJ30595@bhelgaas-glaptop.roam.corp.google.com> References: <20171212141634.5985-1-niklas.cassel@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171212141634.5985-1-niklas.cassel@axis.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1213 Lines: 32 On Tue, Dec 12, 2017 at 03:16:31PM +0100, Niklas Cassel wrote: > find_first_zero_bit()'s parameter 'size' is defined in bits, > not in bytes. > > Calling find_first_zero_bit() with the wrong size unit > will lead to insidious bugs. > > Fix all uses of find_first_zero_bit() called with > sizeof() as size argument in drivers/pci. > > Also had to fix broken error handling in pci_epc_epf_link() > in order to do proper error handling for find_first_zero_bit(). > > Niklas Cassel (3): > PCI: designware-ep: Fix find_first_zero_bit() usage > PCI: endpoint: Fix error handling in pci_epc_epf_link() > PCI: endpoint: Fix find_first_zero_bit() usage > > drivers/pci/dwc/pcie-designware-ep.c | 34 ++++++++++++++++++++++++++-------- > drivers/pci/dwc/pcie-designware.h | 8 ++++++-- > drivers/pci/endpoint/pci-ep-cfs.c | 13 ++++++++----- > 3 files changed, 40 insertions(+), 15 deletions(-) In the interest of making forward progress, I applied these to for-linus for v4.15. The issues apparently have been there since v4.12-rc1, but I guess this is proposed for for-linus because (a) it fixes insidious bugs and (b) the endpoint framework is relatively little-used yet so low-risk. Right? Bjorn