svn commit: r356953 - stable/12/sys/compat/linuxkpi/common/src
Mark Johnston
markj at FreeBSD.org
Wed Jan 22 00:30:27 UTC 2020
Author: markj
Date: Wed Jan 22 00:30:27 2020
New Revision: 356953
URL: https://svnweb.freebsd.org/changeset/base/356953
Log:
MFC r356760:
Handle a NULL thread pointer in linux_close_file().
PR: 242913
Modified:
stable/12/sys/compat/linuxkpi/common/src/linux_compat.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Tue Jan 21 22:28:16 2020 (r356952)
+++ stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Wed Jan 22 00:30:27 2020 (r356953)
@@ -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);
More information about the svn-src-stable
mailing list