From nobody Fri Mar 11 16:42:47 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 B9AB01A1BDE8; Fri, 11 Mar 2022 16:42:47 +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 4KFWvC3ZwSz4clj; Fri, 11 Mar 2022 16:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647016967; 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=wmejaRphFx7nCfngwbeN4zJ40NRXqdwIuNyY3WyZGzk=; b=I10vf2QWUwk6h+9NIlDbnlYhsdbCPmfQKef2Mi87WGNG2R8NPrP0nM2obpWUe3T8N3/Tft 7S25SDLRdnB1wivSqJqhs+NaFuvh3eiK4uYuRMmG75ht5IxmaCtYBpxRBAIXnCpj9xzWYh oJ+KTvJmZmBw9rs7WqHDRnfDGhhh1X8Gnt2oKHi6W3rYDBvzxvJj/nhvO4S2lLyjMZ6Pah a2yhSnS2waRPfAl4IwS58FFJ/2KUuzJNXHSKevP0e9Eko7f5R684Z5FsDzyyX58g82QX4u W2DI/MBYUX6zhVy4khdjiKVv0MAZyQvoCuLatYZawOMvYoKTSLPwDhpEDieQ5w== 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 4E9911CC3D; Fri, 11 Mar 2022 16:42:47 +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 22BGglk3097062; Fri, 11 Mar 2022 16:42:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22BGglHu097061; Fri, 11 Mar 2022 16:42:47 GMT (envelope-from git) Date: Fri, 11 Mar 2022 16:42:47 GMT Message-Id: <202203111642.22BGglHu097061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: a23e475c48da - main - 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/main X-Git-Reftype: branch X-Git-Commit: a23e475c48da7a3751ffdc689be01d514ea2857c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647016967; 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=wmejaRphFx7nCfngwbeN4zJ40NRXqdwIuNyY3WyZGzk=; b=TUAibGDTDQ/mbN9um3B7xIfd9qbakHEblnnjo/Gam2k/Yn0poqTNj7kJgm2+SAYc58tkPW x0XyCQs366MkdmcISNRSI3Bzn8i8NymFCAYhzRhvD5mCz3ndFG5SvU6SZxrKakK9ynJNq0 DxM4VDmYlZouhlUzTQyFvi++jIFzxCgTu7s0HtGk7Gii7FegRVa/Rumz+qQGLXif6eu3I/ gXKZ8sRXJGXGx7dDdt/FdHDkW8XVkFFY8M9oJDTnhVX6WyaO4WN5QL0fbK01Y4ILMlLb4M LbVhe/9oPGvqZC/WNO6qd1tzoggN3RBbebzTRFXmPO+ns9ThsOhgF6WxwgsIdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647016967; a=rsa-sha256; cv=none; b=TlWe7U9IQF62orFX2Ze7tTCop4/NfAPViaQqrCcGGbD1BWhL/Yh6drg6wWHw/27hNfZj2j kYEhtRTdUNS3AsnPbGUgGubjxjaJTovJWU+W0pPjEgyT/D3S1cgadXA+GJFp2Xvym3YWt9 2WDFsGHCCKUfxoTPkfGfhFMFvvh8cGLWYNOg7iMq3eCQoX2stSuJ2PQOSxGPTiuKo+CcmU z6EiX9nu9PSMtxu4+mFtNUYVX88JfMbKxqfRWGRmDfhYn9kd889aHwffv2TxFWsANJNLW3 w78fDWE/BB1yCB4iwFcyeH6LOkInADm4RJlnns+VEZd6bL2GGW6NdlQgbDzqbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=a23e475c48da7a3751ffdc689be01d514ea2857c commit a23e475c48da7a3751ffdc689be01d514ea2857c Author: Hans Petter Selasky AuthorDate: 2022-03-11 16:39:44 +0000 Commit: Hans Petter Selasky CommitDate: 2022-03-11 16:41:33 +0000 lindebugfs: Make single_release() NULL safe. MFC after: 1 week Sponsored by: NVIDIA Networking --- 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);