Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1163677ybp; Fri, 11 Oct 2019 09:53:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtaetKmv9IwyA9kYfXv+xY4aqZ95+mU7Us4YLuFrE1ynYIMiQZ5j0h/waYX/yWTlKqWtO4 X-Received: by 2002:a17:906:6087:: with SMTP id t7mr14957922ejj.58.1570812791609; Fri, 11 Oct 2019 09:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570812791; cv=none; d=google.com; s=arc-20160816; b=bIAlIqUSgo+UMXOQ12syHCbEhT1rsDGhCqTp3iIfvtQ2cUbqdia9kHrH6UPiJIptgO FrCUvlrcJB4Q8VofIP09c1qioDVnOQOujRMafMNtC+BmxCl4xsudgs5yGXBjUfOFbyaK LJ9dVqIsURoudbeChSSe+AGl/FuKN9PXJtoKx7P986bq0FKg5UxNg5PEqDH0aNWBtu4V rxeN4ExgmpJCUuEr3P8Ff8WIUpnoUiZZj6HT8yodsKkbaYTduaX1HKA3v7qew/sxXqyM IiRKtHGcIr1mPdFzrnbA972oTuhYdFuy/xP8Z6CvKgqnL+bcjdXDQJ3Rrkv6Q544TgsC B//Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ik7esxKqQ0mCGJAgwQWKpkG5b7ss9ViVqj809ayACJg=; b=jJWLiZmSYxXvWTftitjf4poXLcy8ghJqman0EDy5fECb9Q/qiH2tVuSG5k/Z9Ux+5a kAvHok8Qj5yaezwNmx6SI9ig0ncp8HL/9U3t52JqWfgwy6CDPyelgX0JAhhoXX73kS7P 8HOt+bsIqI51uEvzg6FA08ELsRT8Yau9mOAF4z0869KmvrfJ/lLRUXewvqb++NmYIL7W 8VLzDi4VnNOz9WzNllR1pLHCnuNIlT3iq4Uc0d2ufgJpq0kPllvSI/5n87/H11Oxf6fS xmOFRjLeTy0fJtugNxJV/6b+dQJ9M1vy+3CWd9QwA+YHNQRwrbyaMwHqMLmNuzeAdEjp DRkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ftuaXNGd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y47si6449414edd.236.2019.10.11.09.52.48; Fri, 11 Oct 2019 09:53:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ftuaXNGd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728473AbfJKQwT (ORCPT + 99 others); Fri, 11 Oct 2019 12:52:19 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:42720 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728355AbfJKQwS (ORCPT ); Fri, 11 Oct 2019 12:52:18 -0400 Received: by mail-qt1-f195.google.com with SMTP id w14so14767217qto.9 for ; Fri, 11 Oct 2019 09:52:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ik7esxKqQ0mCGJAgwQWKpkG5b7ss9ViVqj809ayACJg=; b=ftuaXNGdkFZBYx2lEqoYHGXjsPV4yrnzEH1Eljs7OEMLXdjJcSZShneEp9z7v6gYXJ FTazdMvRU09ypUwEjIA4dXstaMHCQSawNuSFPJwo0UdsrlsYHIrOY2ixo6NpH0i786wk o08eK8Cx7i141+ldh59j4eOD2sLEZUHcm7B6Oj8zBRXVRm31fnvCxG8JzbIbfyXT8orx pYGR8VeIdH+Nhh7js5RK/Has0rORGjTZ0VhhmKkVlLDEpX9zGvhsHM9Y3/zBQp/7Qw5g 4uxICTkCEQsaz9hesFafMfNL11KLnNB9ASVXnru0BpBuNP04uVOI2Sr5d7sEugHh1m8E /0jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ik7esxKqQ0mCGJAgwQWKpkG5b7ss9ViVqj809ayACJg=; b=f1pQFNiJBzIbhFgsCf/LaxUE9RP1+Ks/ODQrCzwC5MsNeGOaxdNYTSNX8vkErZHX1m KouM+q1aTiNwpkcL5nKbczMZtv9dhBNc42t1upCFVlAQRiS3nKFnHAcPGoIzGF1y1K5m aZUPzS92TKaBTDMOFzw/Jyhs1aZ8m56ilAWLXzdZaF1xmLAnUBKLqxag+2/lE8rqTre7 4Q0V2+HotCbedGUlbRB4+wzhP/Hp1FXKRit8G1EIVcUkbIyrCmvvNXaD8s6EFXSEeK3w hji2W8RaJE6TnFYuGYF0BaGMMO21Llcdno7RLvA2E1r/RiA1hsAO1POlop/fd9A4/KJj Vvng== X-Gm-Message-State: APjAAAWuxVXmk7b4qwWdyF4JF8e4yN1axAU78nu+zevvYWjEpFNLoF1r bh3fT/tuC9GvxjfqwTZQmFg= X-Received: by 2002:ac8:36f4:: with SMTP id b49mr17831196qtc.31.1570812737374; Fri, 11 Oct 2019 09:52:17 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::3741]) by smtp.gmail.com with ESMTPSA id q6sm3932678qkj.108.2019.10.11.09.52.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Oct 2019 09:52:16 -0700 (PDT) Date: Fri, 11 Oct 2019 09:52:13 -0700 From: Tejun Heo To: Oleg Nesterov Cc: linux-kernel@vger.kernel.org, Roman Gushchin , Richard Purdie , Bruce Ashfield Subject: Re: [PATCH] cgroup: freezer: call cgroup_enter_frozen() with preemption disabled in ptrace_stop() Message-ID: <20191011165213.GB18794@devbig004.ftw2.facebook.com> References: <20191009150230.GB12511@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191009150230.GB12511@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 09, 2019 at 05:02:30PM +0200, Oleg Nesterov wrote: > ptrace_stop() does preempt_enable_no_resched() to avoid the preemption, > but after that cgroup_enter_frozen() does spin_lock/unlock and this adds > another preemption point. > > Reported-and-tested-by: Bruce Ashfield > Fixes: 76f969e8948d ("cgroup: cgroup v2 freezer") > Cc: stable@vger.kernel.org # v5.2+ > Signed-off-by: Oleg Nesterov Applied to cgroup/for-5.4-fixes. Thanks. -- tejun