From nobody Thu Mar 17 10:00:19 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 116E31A1794C; Thu, 17 Mar 2022 10:00:20 +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 4KK2h34kWFz4Sr4; Thu, 17 Mar 2022 10:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647511219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zJeUZtTNY311PmGAsqQYWzGjpor/+7BwlAB5IwviNIE=; b=R2KnMOnmi3m3aM1tQQME8hGEqeGE0ozliBCsICGUeDK46xWESzo8N7b44GCF1EtXwAhmim p+TyeKEqsb9NkbE859KF92euI1MF6qWQj1jn65o9myRfZ/FeiD2S7Dmth/lesGFyKzzV47 zN5rku5yh+IEwIUjb5/vY/NV+RfGsnEqGGfBw44opqHSg2F8wAj7L/RLxpAT7oLpFSFIhD UwwnteswJSWoPCQ6qCyyclpaESGxQVHH03d+LtDSgfdVTym2vuQV1gL01dPCBhY5OSPkoC iIQG9FaGCN6mHcWGItVaX3/Fd58BHjkKtMMZKH7y8JhmkyaT1/0i+tPT3iZB2Q== 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 6EAE2475; Thu, 17 Mar 2022 10:00:19 +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 22HA0JEY089283; Thu, 17 Mar 2022 10:00:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22HA0JZ7089280; Thu, 17 Mar 2022 10:00:19 GMT (envelope-from git) Date: Thu, 17 Mar 2022 10:00:19 GMT Message-Id: <202203171000.22HA0JZ7089280@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: d67b2c96153f - stable/13 - lindebugfs: Make single_release() NULL safe. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org 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/13 X-Git-Reftype: branch X-Git-Commit: d67b2c96153fcef344648d907893b50e30817a38 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647511219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zJeUZtTNY311PmGAsqQYWzGjpor/+7BwlAB5IwviNIE=; b=lyE7ku+r1y9onUkuNKsG2O0DAGXZtc7BVqN/SjSiMrgxKA1VB2ECqBd/kkp6AcSLBoww9y pD81OnLfmnCIc8gjrCs0q+X09RBWqTVcvnb8Xds0KeaO5pVr3fWkl6z8CATO/QNczVnrHy 4Q1EExZK/84So1ahVO/ZRF4ZYmp8j6hi4e3XE0WZD/dPlu3cWHkjzU9GzuWNfPOld4GF23 82WaXf0nc0baNs9EyxYFJUGVQVES8Ej3h8o75X2ueVsiHj/4N9Lj7dmJYUUTssKSKMbCqc Delti+vSagPXV2IT9ML+8F4z7MMtpC2K3hHbqIEyslWZRUyZ3BeGuQlAOQj9YQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647511219; a=rsa-sha256; cv=none; b=t59UXA3BeSL6QYqYLoUyk9rBx+LW9V8d8Y8LFsmkH3Gud7yFW2sVOv5kqvEr49K2aq5Eku JzJvYEADOgbzf5t4QDOBOABon/FWBCdjXDJukw3ocHfFM82rmYveKSyTo9Re6TmDU/ap+/ j4KzCLvLP0XQ2LFa7MN+fnSy7qweo/c5OhazeMZMP05Pw+9bjPu0bSSYIhhLvk0o4eG208 KCI8KiFqNNTNN4dX5zECQyIT1Y2SSu/XTYM6rGAnUN38tzBEvduDH/0Qd2Nzz3Dl+/g+53 0EfQLp6fR1k/PhN4NHGqtonDiuMj5/7XhXCOOW8IEPcSu34B2isnUCgOJ9KQLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=d67b2c96153fcef344648d907893b50e30817a38 commit d67b2c96153fcef344648d907893b50e30817a38 Author: Hans Petter Selasky AuthorDate: 2022-03-11 16:39:44 +0000 Commit: Hans Petter Selasky CommitDate: 2022-03-17 09:55:12 +0000 lindebugfs: Make single_release() NULL safe. Sponsored by: NVIDIA Networking (cherry picked from commit a23e475c48da7a3751ffdc689be01d514ea2857c) --- sys/compat/linuxkpi/common/src/linux_seq_file.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_seq_file.c b/sys/compat/linuxkpi/common/src/linux_seq_file.c index 6f4f1a368c4a..ed23bf8d010f 100644 --- a/sys/compat/linuxkpi/common/src/linux_seq_file.c +++ b/sys/compat/linuxkpi/common/src/linux_seq_file.c @@ -147,9 +147,15 @@ seq_release(struct inode *inode __unused, struct linux_file *file) int single_release(struct vnode *v, struct linux_file *f) { - const struct seq_operations *op = ((struct seq_file *)f->private_data)->op; + const struct seq_operations *op; + struct seq_file *m; int rc; + /* be NULL safe */ + if ((m = f->private_data) == NULL) + return (0); + + op = m->op; rc = seq_release(v, f); free(__DECONST(void *, op), M_LSEQ); return (rc);