diff options
author | Ricardo M. Correia <[email protected]> | 2009-07-14 15:24:59 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2009-07-14 15:24:59 -0700 |
commit | ac95d0974bb36000b979f5b2dd404638ea87baf7 (patch) | |
tree | 127970a01da8d6ad0a9a40604c6f2edbdd2b04d5 /include/sys/debug.h | |
parent | e004f04c8b110ee598baa6b86148c8148d737a44 (diff) |
Fixed NULL dereference by tcd_for_each() when the kmalloc() call in module/spl/spl-debug.c:1163 returns NULL.
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'include/sys/debug.h')
-rw-r--r-- | include/sys/debug.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/debug.h b/include/sys/debug.h index 1ea1520de..f19231b90 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -173,7 +173,7 @@ union trace_data_union { extern union trace_data_union (*trace_data[TCD_TYPE_MAX])[NR_CPUS]; #define tcd_for_each(tcd, i, j) \ - for (i = 0; i < TCD_TYPE_MAX; i++) \ + for (i = 0; i < TCD_TYPE_MAX && trace_data[i]; i++) \ for (j = 0, ((tcd) = &(*trace_data[i])[j].tcd); \ j < num_possible_cpus(); j++, (tcd) = &(*trace_data[i])[j].tcd) |