From owner-dev-commits-src-all@freebsd.org Wed Mar 10 10:05:04 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B4095AB8D1; Wed, 10 Mar 2021 10:05:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DwSPC34Vkz4nsl; Wed, 10 Mar 2021 10:05:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 12AA4nxN037623 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 10 Mar 2021 12:04:52 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 12AA4nxN037623 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 12AA4niK037622; Wed, 10 Mar 2021 12:04:49 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 10 Mar 2021 12:04:49 +0200 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d1cbe7908986 - main - Allocating the LinuxKPI current structure from an interrupt thread must be done using the M_NOWAIT flag after 1ae20f7c70ea . Message-ID: References: <202103100952.12A9qRKR040117@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202103100952.12A9qRKR040117@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4DwSPC34Vkz4nsl X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2021 10:05:04 -0000 On Wed, Mar 10, 2021 at 09:52:27AM +0000, Hans Petter Selasky wrote: > The branch main has been updated by hselasky: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d1cbe79089868226625c12ef49f51214d79aa427 > > commit d1cbe79089868226625c12ef49f51214d79aa427 > Author: Hans Petter Selasky > AuthorDate: 2021-03-10 09:50:01 +0000 > Commit: Hans Petter Selasky > CommitDate: 2021-03-10 09:51:04 +0000 > > Allocating the LinuxKPI current structure from an interrupt thread must be > done using the M_NOWAIT flag after 1ae20f7c70ea . > > MFC after: 1 week > Sponsored by: Mellanox Technologies // NVIDIA Networking > --- > sys/compat/linuxkpi/common/src/linux_compat.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c > index 2ad936311204..707c5e47512e 100644 > --- a/sys/compat/linuxkpi/common/src/linux_compat.c > +++ b/sys/compat/linuxkpi/common/src/linux_compat.c > @@ -2384,7 +2384,8 @@ linux_irq_handler(void *ent) > { > struct irq_ent *irqe; > > - linux_set_current(curthread); > + if (linux_set_current_flags(curthread, M_NOWAIT)) > + return; > > irqe = ent; > irqe->handler(irqe->irq, irqe->arg); This probably hangs machine instead of panicing. In low memory condition, you do not handle interrupt, which probably mean that the source is not silenced, and after EOI the same interrupt will be generated again.