projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4989d9
)
iwlwifi: Fix null pointer referencing in iwl_dbgfs_rx_queue_read.
author
Dor Shaish
<
[email protected]
>
Tue, 1 Jun 2010 07:04:08 +0000
(
00:04
-0700)
committer
Reinette Chatre
<
[email protected]
>
Mon, 14 Jun 2010 17:59:25 +0000
(10:59 -0700)
Test for null pointer prior to access.
Print "Not Allocated" if null pointer.
Signed-off-by: Dor Shaish <
[email protected]
>
Signed-off-by: Emmanuel Grumbach <
[email protected]
>
Signed-off-by: Reinette Chatre <
[email protected]
>
drivers/net/wireless/iwlwifi/iwl-debugfs.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index d9f21bb9d75d58ef8f74cf8b6068f2481b0fd160..cee3d12eb383bfd4b001e749252c0ed69653fe2d 100644
(file)
--- a/
drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/
drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@
-1018,8
+1018,13
@@
static ssize_t iwl_dbgfs_rx_queue_read(struct file *file,
rxq->write);
pos += scnprintf(buf + pos, bufsz - pos, "free_count: %u\n",
rxq->free_count);
- pos += scnprintf(buf + pos, bufsz - pos, "closed_rb_num: %u\n",
+ if (rxq->rb_stts) {
+ pos += scnprintf(buf + pos, bufsz - pos, "closed_rb_num: %u\n",
le16_to_cpu(rxq->rb_stts->closed_rb_num) & 0x0FFF);
+ } else {
+ pos += scnprintf(buf + pos, bufsz - pos,
+ "closed_rb_num: Not Allocated\n");
+ }
return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
}