Module Name:    src
Committed By:   jakllsch
Date:           Sun Nov 15 22:56:24 UTC 2015

Modified Files:
        src/sys/external/bsd/drm2/linux: linux_work.c

Log Message:
Avoid NULL dereference in linux_worker_intr() in WORK_DELAYED_CANCELLED case.

Potentially fixes PR#49560.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm2/linux/linux_work.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/linux/linux_work.c
diff -u src/sys/external/bsd/drm2/linux/linux_work.c:1.11 src/sys/external/bsd/drm2/linux/linux_work.c:1.12
--- src/sys/external/bsd/drm2/linux/linux_work.c:1.11	Sat Oct 17 15:57:32 2015
+++ src/sys/external/bsd/drm2/linux/linux_work.c	Sun Nov 15 22:56:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_work.c,v 1.11 2015/10/17 15:57:32 jmcneill Exp $	*/
+/*	$NetBSD: linux_work.c,v 1.12 2015/11/15 22:56:24 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.11 2015/10/17 15:57:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.12 2015/11/15 22:56:24 jakllsch Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -850,7 +850,7 @@ linux_worker_intr(void *arg)
 	}
 
 	/* Either way, the callout is done.  */
-	TAILQ_REMOVE(&dw->work.w_wq->wq_delayed, dw, dw_entry);
+	TAILQ_REMOVE(&wq->wq_delayed, dw, dw_entry);
 	callout_destroy(&dw->dw_callout);
 
 	mutex_exit(&wq->wq_lock);

Reply via email to