Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: dma-debug: Fix check_unmap null pointer dereference
This commit is contained in:
commit
87bcfa3366
|
@ -156,9 +156,13 @@ static bool driver_filter(struct device *dev)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* driver filter on and initialized */
|
/* driver filter on and initialized */
|
||||||
if (current_driver && dev->driver == current_driver)
|
if (current_driver && dev && dev->driver == current_driver)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
/* driver filter on, but we can't filter on a NULL device... */
|
||||||
|
if (!dev)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (current_driver || !current_driver_name[0])
|
if (current_driver || !current_driver_name[0])
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -183,17 +187,17 @@ static bool driver_filter(struct device *dev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define err_printk(dev, entry, format, arg...) do { \
|
#define err_printk(dev, entry, format, arg...) do { \
|
||||||
error_count += 1; \
|
error_count += 1; \
|
||||||
if (driver_filter(dev) && \
|
if (driver_filter(dev) && \
|
||||||
(show_all_errors || show_num_errors > 0)) { \
|
(show_all_errors || show_num_errors > 0)) { \
|
||||||
WARN(1, "%s %s: " format, \
|
WARN(1, "%s %s: " format, \
|
||||||
dev_driver_string(dev), \
|
dev ? dev_driver_string(dev) : "NULL", \
|
||||||
dev_name(dev) , ## arg); \
|
dev ? dev_name(dev) : "NULL", ## arg); \
|
||||||
dump_entry_trace(entry); \
|
dump_entry_trace(entry); \
|
||||||
} \
|
} \
|
||||||
if (!show_all_errors && show_num_errors > 0) \
|
if (!show_all_errors && show_num_errors > 0) \
|
||||||
show_num_errors -= 1; \
|
show_num_errors -= 1; \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue