From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4317AC4332F for ; Fri, 21 Oct 2022 01:22:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BCB0C8E0003; Thu, 20 Oct 2022 21:22:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B7B088E0001; Thu, 20 Oct 2022 21:22:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A6AED8E0003; Thu, 20 Oct 2022 21:22:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9936E8E0001 for ; Thu, 20 Oct 2022 21:22:20 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 6EF601C633F for ; Fri, 21 Oct 2022 01:22:20 +0000 (UTC) X-FDA: 80043206040.13.789608A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf07.hostedemail.com (Postfix) with ESMTP id 07AB340033 for ; Fri, 21 Oct 2022 01:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666315339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=26/1wx3sTPstBaBhkT8PKMNM7SbmIMCHT4MScRzd8Fo=; b=hRJpWAQ0lOnN0EBri3XkIh01+9shZAdlgK01EoqqE7amJmDe3U/tq6Q2bk+aBYk80+No3J THpXVQZ5LRelTlqOQJRHgtM7I5bkOV5/oEgdzNsBeWNhcbERGldnI7SpgkX560yOQ71ssA xaYY7leB9AUdhcn74V6lsJ6jgipmG5M= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-146-8FAL97uqNDiWba6a9NrXiw-1; Thu, 20 Oct 2022 21:22:15 -0400 X-MC-Unique: 8FAL97uqNDiWba6a9NrXiw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4224829AB409; Fri, 21 Oct 2022 01:22:15 +0000 (UTC) Received: from [10.22.17.11] (unknown [10.22.17.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id C79BB40C98EC; Fri, 21 Oct 2022 01:22:14 +0000 (UTC) Message-ID: Date: Thu, 20 Oct 2022 21:22:14 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH] mm/kmemleak: Prevent soft lockup in kmemleak_scan()'s object iteration loops Content-Language: en-US To: Andrew Morton Cc: Catalin Marinas , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song References: <20221020175619.366317-1-longman@redhat.com> <20221020175823.d7aa5cfeefd8673429f42081@linux-foundation.org> From: Waiman Long In-Reply-To: <20221020175823.d7aa5cfeefd8673429f42081@linux-foundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666315340; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=26/1wx3sTPstBaBhkT8PKMNM7SbmIMCHT4MScRzd8Fo=; b=KJEE7Y7GP/OU0LnsSQQYxCx1CXq5Vgax2qoZNvsys78fyKZC/hXCicvBl5w2oOS5yJbvg3 vxmriSUz0ZmiwGW/SeNiLQBCOBgibGrXaGrisSmdZ6k5+WbMkNtA02AWeW1++uNJMUcZiE 3gkqI2HzVegu2JmPBsyGv7WSdjSZ1Xc= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hRJpWAQ0; spf=pass (imf07.hostedemail.com: domain of longman@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=longman@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666315340; a=rsa-sha256; cv=none; b=OljIMHwNUrpCf/xQF4RW+8FjagEjPOtqCTSOgj1fczF44VnnXqkuZCnPB2rCA6UMwezZZ4 his7UjdISMjS6PX2vDxZ0DwjOOHWBylgtcX+DrRJ5aW6Dlo18DU+xj6Qt+N+iTihdTJGJ3 k3gijOMyN7+V8c8NZTPJw5c/isYZQgw= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 07AB340033 X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hRJpWAQ0; spf=pass (imf07.hostedemail.com: domain of longman@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=longman@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Stat-Signature: za7zcnn1gqdcouyxf6dxbt135fm6cza9 X-HE-Tag: 1666315339-649789 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 10/20/22 20:58, Andrew Morton wrote: > On Thu, 20 Oct 2022 13:56:19 -0400 Waiman Long wrote: > >> Commit 6edda04ccc7c ("mm/kmemleak: prevent soft lockup in first object >> iteration loop of kmemleak_scan()") adds cond_resched() in the first >> object iteration loop of kmemleak_scan(). However, it turns that the >> 2nd objection iteration loop can still cause soft lockup to happen in >> some cases. So add a cond_resched() call in the 2nd and 3rd loops as >> well to prevent that and for completeness. >> > Seems reasonable, although not an object of beauty. > > We didn't include a Fixes: or cc:stable in 6edda04ccc7c, even though it > addresses softlockups. I think I'll add a cc:stable to this, with a > Fixes:6edda04ccc7c. So any kenrel which included 6edda04ccc7c will > hopefully add this as well. That sounds good to me. I consider commit 6edda04ccc7c incomplete and this patch complete it. Technically it can be considered a fix. Thanks, Longman