Skip to content

Commit 4ba27f3

Browse files
committed
818* dtrace.c: dtrace_probe: When checking for Xen probes with
interrupts disabled, be careful of deref of null ptr.
1 parent 6198526 commit 4ba27f3

4 files changed

Lines changed: 14 additions & 7 deletions

File tree

.release

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
date=Wed Mar 6 22:49:59 GMT 2013
2-
release=dtrace-20130306
3-
build=449
1+
date=Wed Mar 6 23:25:18 GMT 2013
2+
release=dtrace-20130306a
3+
build=450

archive.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
NAME=dtrace
22
MAJ_VERSION=1
3-
MIN_VERSION=0145
3+
MIN_VERSION=0146
44
EXCLUDE="*.ko *.o .git"
55
EXCLUDE_DIRS="build-"
6-
#date Sun Aug 19 17:57:46 BST 2012
6+
#date Wed Mar 6 22:51:14 GMT 2013

driver/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ ifdef BUILD_i386
6363
dtracedrv-objs += ../libgcc.a
6464
endif
6565
ifdef BUILD_ARM
66-
dtracedrv-objs += divmod64.o ../libgcc.a
66+
dtracedrv-objs += arm_divmod64.o
6767
endif
6868

6969
obj-m := dtracedrv.o

driver/dtrace.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6262,6 +6262,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
62626262
void __dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
62636263
uintptr_t arg2, uintptr_t arg3, uintptr_t arg4);
62646264
int cpu;
6265+
cpu_core_t *cpup;
62656266

62666267
/***********************************************/
62676268
/* Allow us to disable dtrace as soon as we */
@@ -6283,7 +6284,13 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
62836284
/* dtrace_int[13]_handler. */
62846285
/***********************************************/
62856286
cpu = cpu_get_id();
6286-
if (cpu_get_this()->cpuc_regs->r_rfl & X86_EFLAGS_IF) {
6287+
6288+
/***********************************************/
6289+
/* cpuc_regs may be null until we get the */
6290+
/* first probe. Silly me. */
6291+
/***********************************************/
6292+
cpup = cpu_get_this();
6293+
if (cpup && cpup->cpuc_regs && cpup->cpuc_regs->r_rfl & X86_EFLAGS_IF) {
62876294
if (dtrace_safe) {
62886295
cnt_probe_safe++;
62896296
return;

0 commit comments

Comments
 (0)