Date: Wed, 22 Jan 2020 15:51:24 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r356987 - stable/11/sys/compat/linuxkpi/common/src Message-ID: <202001221551.00MFpOni082623@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Wed Jan 22 15:51:24 2020 New Revision: 356987 URL: https://svnweb.freebsd.org/changeset/base/356987 Log: MFC r356760: Handle a NULL thread pointer in linux_close_file(). PR: 242913 Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Wed Jan 22 15:06:59 2020 (r356986) +++ stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Wed Jan 22 15:51:24 2020 (r356987) @@ -1502,6 +1502,9 @@ linux_file_close(struct file *file, struct thread *td) KASSERT(file_count(filp) == 0, ("File refcount(%d) is not zero", file_count(filp))); + if (td == NULL) + td = curthread; + error = 0; filp->f_flags = file->f_flag; linux_set_current(td);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001221551.00MFpOni082623>