Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp311486ybg; Wed, 3 Jun 2020 01:12:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFkAHDxjnQYDFXU4RbiKajEJGe3babbBfwudREB9SvJ6DjRRIfnI1myJCqwIDZ7Md8ZBbY X-Received: by 2002:a50:f7c4:: with SMTP id i4mr30348575edn.306.1591171967978; Wed, 03 Jun 2020 01:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591171967; cv=none; d=google.com; s=arc-20160816; b=mBuVGSxjuZXYxqx/IkL3DLQZavhRcFuMxxvzplTPurrEYMj0WQ3u8MSUJFugvuMRmY adXzN2j+Y5g2wI0FgHf/C0C8OOz4MMR3C7B1CFDSrPAoq9a8MiguKr0PzaX1ex4c64yf a0az/i8ZgQRp1nc4RJLPvS3cJHwBwczaxKsUcgJXroUPzM1stX/TPpfFA5O2eTujbDJh wU8Jp63HEbQN3AlIy8T22Nb2G3kDw4NbwH+j7vrba2YF5P/blkcNE7oq9xz3IsPxb/6P 3DSmW2r/umlt5alU/6zNkKrYAiSMHPedW7JN1wiYKwDNcApjUMwS3IrPcyW/0zm4YOZG P9mQ== 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; bh=exjY5F38xBj7W77X1iVTGRUpxAtJ9Z1C8EFW3T5Fo9E=; b=HtbW8OhlTIoMiAU+KopfoS7/BiS7hdleBM5XnBnMvlwnjXwNDvfIbWGTKklgSy610j ZGqCbRRf8oFEsxRCVnJunCJkdp01OGbCHbP8bQtabDJYvwXBdH927epG0WrctpVNoWK0 HL98WBD6XcQVGtW40eL9Vb2xzo50ELiUYXANAQ/p4bwwWIlG4Hft9chFlJrEeaie3bnG XOR9/+iSX/VKyb/x8jdSI+WVwj5ECvnl4F/l3AF8cVHqGy8m0VZxAQy+6u/f5moasL6H VP0ETR6D97T8jm+oh4tNUmm1stQPsPWy0gpoQRuDd7pWBfV179BDy3Bg0ZTIFM4Lnxxt UQew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do10si952293ejc.671.2020.06.03.01.12.25; Wed, 03 Jun 2020 01:12:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725943AbgFCIKa (ORCPT + 99 others); Wed, 3 Jun 2020 04:10:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:51416 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725817AbgFCIKa (ORCPT ); Wed, 3 Jun 2020 04:10:30 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6A628AC37; Wed, 3 Jun 2020 08:10:31 +0000 (UTC) Date: Wed, 3 Jun 2020 10:10:26 +0200 From: Petr Mladek To: Sumit Garg Cc: daniel.thompson@linaro.org, kgdb-bugreport@lists.sourceforge.net, jason.wessel@windriver.com, dianders@chromium.org, sergey.senozhatsky@gmail.com, gregkh@linuxfoundation.org, jslaby@suse.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 3/4] kdb: Make kdb_printf() console handling more robust Message-ID: <20200603081025.GC14855@linux-b0ei> References: <1591168935-6382-1-git-send-email-sumit.garg@linaro.org> <1591168935-6382-4-git-send-email-sumit.garg@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1591168935-6382-4-git-send-email-sumit.garg@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2020-06-03 12:52:14, Sumit Garg wrote: > While rounding up CPUs via NMIs, its possible that a rounded up CPU > maybe holding a console port lock leading to kgdb master CPU stuck in > a deadlock during invocation of console write operations. A similar > deadlock could also be possible while using synchronous breakpoints. > > So in order to avoid such a deadlock, set oops_in_progress to encourage > the console drivers to disregard their internal spin locks: in the > current calling context the risk of deadlock is a bigger problem than > risks due to re-entering the console driver. We operate directly on > oops_in_progress rather than using bust_spinlocks() because the calls > bust_spinlocks() makes on exit are not appropriate for this calling > context. > > Suggested-by: Petr Mladek I think that this was actually suggested by Sergey. > Signed-off-by: Sumit Garg > Reviewed-by: Douglas Anderson Otherwise, it looks good. With updated suggested by: Reviewed-by: Petr Mladek Best Regards, Petr