From owner-dev-commits-src-all@freebsd.org Tue Mar 23 11:47:34 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 D95F05ABB4E; Tue, 23 Mar 2021 11:47:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F4V3T0b9Nz4l0W; Tue, 23 Mar 2021 11:47:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1609920727; Tue, 23 Mar 2021 11:47:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12NBlVtG050851; Tue, 23 Mar 2021 11:47:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12NBlVhX050850; Tue, 23 Mar 2021 11:47:31 GMT (envelope-from git) Date: Tue, 23 Mar 2021 11:47:31 GMT Message-Id: <202103231147.12NBlVhX050850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: af3a80bcdd20 - stable/12 - MFC dfb33cb0ef48: Allocating the LinuxKPI current structure from a software interrupt thread must be done using the M_NOWAIT flag after 1ae20f7c70ea . MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: af3a80bcdd204aaf9e9b7642cf81e4dfdb5a789e Auto-Submitted: auto-generated 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: Tue, 23 Mar 2021 11:47:35 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=af3a80bcdd204aaf9e9b7642cf81e4dfdb5a789e commit af3a80bcdd204aaf9e9b7642cf81e4dfdb5a789e Author: Hans Petter Selasky AuthorDate: 2021-03-10 12:26:09 +0000 Commit: Hans Petter Selasky CommitDate: 2021-03-23 11:46:02 +0000 MFC dfb33cb0ef48: Allocating the LinuxKPI current structure from a software interrupt thread must be done using the M_NOWAIT flag after 1ae20f7c70ea . Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit dfb33cb0ef48084da84072244e8ca486dfcf3a96) --- sys/compat/linuxkpi/common/src/linux_compat.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index f120856dd23d..e758a5590bc9 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -1901,9 +1901,15 @@ linux_timer_callback_wrapper(void *context) { struct timer_list *timer; - linux_set_current(curthread); - timer = context; + + if (linux_set_current_flags(curthread, M_NOWAIT)) { + /* try again later */ + callout_reset(&timer->callout, 1, + &linux_timer_callback_wrapper, timer); + return; + } + timer->function(timer->data); }