Commit 069504c
committed
nvme/{tree,fabrics}: do not crash when accessing disconnected controllers
When a controller is disconnected it will just clear the volatile attributes,
but remain part of the tree structure. So when traversing the tree one could
access a disconnected controller, but then c->name is NULL.
So fixup all places calling nvme_ctrl_get_name() to ensure that they don't
crash on an empty name.
Signed-off-by: Hannes Reinecke <[email protected]>1 parent d806d2e commit 069504c
2 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
1152 | 1159 | | |
1153 | 1160 | | |
1154 | 1161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
248 | 251 | | |
249 | 252 | | |
250 | 253 | | |
| |||
1815 | 1818 | | |
1816 | 1819 | | |
1817 | 1820 | | |
| 1821 | + | |
| 1822 | + | |
1818 | 1823 | | |
1819 | 1824 | | |
1820 | 1825 | | |
| |||
0 commit comments