Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1466605iog; Sat, 25 Jun 2022 10:03:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v1YazSNefOMhiertYP8jdUkTU20AjIno9kjfddo+kVvMCO0RPvNT8gjECRLPjnHNIWH45O X-Received: by 2002:a17:907:8a1d:b0:711:d86e:cc5 with SMTP id sc29-20020a1709078a1d00b00711d86e0cc5mr4784307ejc.237.1656176611993; Sat, 25 Jun 2022 10:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656176611; cv=none; d=google.com; s=arc-20160816; b=N0maqA3nX4dqQ2nQ/FH0sE/lQ6AsdjymOidUn0n6ZGw03Pc8WZZaRheJ+T9KQ4P4lP YUB4gG4xqabiJLreSDUhLBvxQFdT4uCKZwLpudNsw8SFBE2THK2N68GwFmiKR+FLeCpV wBrpgBCTO/em/NR9ntA3t/Un/Ws1/18aPMhHTCom67a7JcLgJSQY9SHnFTbq/iOGJ78B L488auRzzH0YFeCPcAIkFHQwPpbt7ErWHzL9dgmbtr6Wu6TtpvO+2ZAJUpUa8Ja1teJs itG6PfGfhQQotTqwCuSpcMLQwdxD2kKb1ZrmHFsQo6KlDbqjaAROKCHh171DUwGQpvF4 bz6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=5n9b9moDbqljRj9kvQX7qhYgh+0pii4Py2IK3zMO58Q=; b=YtBVrAKWc/5yJ1YHKoo7pGLnDhLmaX6NzyxjUkl2ullkKSeBZHEBYEM7piJrdDG0my 9wWEoSM/AscXJUcClX685DjdG8vn8PwwuZ4OHKmnyIM68Pd4hj4nyKXe4PznnWSG5xCj h6oF8M7rMtA33CPljzpGgOA+QrymDTQrKCoqJG1kv4IztIa33JA0Bs8RsQubx+ombGPS yI2w4DZKO5UXa68cO3BAwtCFk9kDqlbVwofBzC3dp+y/Ih7VD274YtWaqXMz0Zsh5hNX tsVMzwJVQo9Ukuh4S3lUu2XxUI32WSdai+41C7CpdgU5v7SSIJ9LBt/yCKBtHmEwhw1B CVqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=XzvRzakJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a17090663d100b00711c9e99bdbsi5723908ejk.258.2022.06.25.10.03.02; Sat, 25 Jun 2022 10:03:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=XzvRzakJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232989AbiFYQ7e (ORCPT + 99 others); Sat, 25 Jun 2022 12:59:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbiFYQ7d (ORCPT ); Sat, 25 Jun 2022 12:59:33 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 112DD1581E for ; Sat, 25 Jun 2022 09:59:32 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id x4so5250846pfq.2 for ; Sat, 25 Jun 2022 09:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=5n9b9moDbqljRj9kvQX7qhYgh+0pii4Py2IK3zMO58Q=; b=XzvRzakJXRYQZX8QkrA/Kx1xy/ONHkwgjIDx+O97k9TCTw5f/MOi0SXpPjcuyE+kxy 5hb86vs53b8scNOxGfcI7pI3IF0/LkYuST7RE8t5lBJKROuzRpYQMLotGwr2V6fdEbyA jIq8stNOA1QFaXrFSF3s8ZH6Oy62qavozYlLG/AWa9eC7tXL+JLyniRrLyeNDaCtR4bS zG4g2pt8irHqzlshE6jnj+Y0tnySEGeInGoB1Q5JiUBB0z7PEvhPzYsUoEfj0d7gFiBZ blZLwcbZqQdjSp11YdOv9fsXX4+9EWg87qn5ihiY4L+teS/INZnVhP9gou5ApPzQxR0j i7Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=5n9b9moDbqljRj9kvQX7qhYgh+0pii4Py2IK3zMO58Q=; b=hZ5lUOw3hZ+1X4QRXKB/GlYO/MN1YXVE0yneR9zWXKN6/2hZaZIreKGAY7oGWRP6G8 gWgFKQsf6ugvQE7x1hDHrwXwmPzb0KHVfIqmqS8O1tH557W9T/WuIY9EZZcZiv0ymSY/ D8Iecl8C3RlgJT+Kj4Mm6omgTBFTsxFXhzfdPoBAXw6HpYk+gATS/eRVKC7+xMhu4UIo b1A1LRMt/8xWLkEi+aPMfT4ut91NNCJ2Ba1ZqEZokzpuHMMOtSVXrOBW03s+VKcgtfd7 /fzdmg+TtdcJ3yTqRA/b7xiKCAvHSbA40GksXndm9EACeW0M1f6VjpjAUWA6NNb0/ict AJVw== X-Gm-Message-State: AJIora/WuHvEmJVAzccu+ayPSyKWKpdAqShJx/ysik3ERE/6VE4LSfO4 0+nBQRcE9fxQg4EtbQXktbjIqw== X-Received: by 2002:a63:6b08:0:b0:3fd:1b8e:3932 with SMTP id g8-20020a636b08000000b003fd1b8e3932mr4345566pgc.552.1656176371452; Sat, 25 Jun 2022 09:59:31 -0700 (PDT) Received: from [192.168.1.100] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id bu5-20020a056a00410500b0052521fd6caesm3835774pfb.111.2022.06.25.09.59.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Jun 2022 09:59:30 -0700 (PDT) Message-ID: Date: Sat, 25 Jun 2022 10:59:29 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] lib/sbitmap: Fix invalid loop in __sbitmap_queue_get_batch() Content-Language: en-US To: wuchi , mwilck@suse.com, andriy.shevchenko@linux.intel.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220605145835.26916-1-wuchi.zero@gmail.com> From: Jens Axboe In-Reply-To: <20220605145835.26916-1-wuchi.zero@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/5/22 8:58 AM, wuchi wrote: > 1. Getting next index before continue branch. > 2. Checking free bits when setting the target bits. Otherwise, > it may reuse the busying bits. Applied with: Fixes: 9672b0d43782 ("sbitmap: add __sbitmap_queue_get_batch()") added as well. -- Jens Axboe