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 <behlendorf1@llnl.gov>
This commit is contained in:
Ricardo M. Correia 2009-07-14 15:24:59 -07:00 committed by Brian Behlendorf
parent e004f04c8b
commit ac95d0974b
1 changed files with 1 additions and 1 deletions

View File

@ -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)