Date: Wed, 22 Jan 2020 00:30:27 +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-12@freebsd.org Subject: svn commit: r356953 - stable/12/sys/compat/linuxkpi/common/src Message-ID: <202001220030.00M0URvD016588@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001220030.00M0URvD016588>