Repository navigation
Commit 53fa103
sctp: fix some rhashtable functions using in sctp proc/diag
When rhashtable_walk_init return err, no release function should be
called, and when rhashtable_walk_start return err, we should only invoke
rhashtable_walk_exit to release the source.
But now when sctp_transport_walk_start return err, we just call
rhashtable_walk_stop/exit, and never care about if rhashtable_walk_init
or start return err, which is so bad.
We will fix it by calling rhashtable_walk_exit if rhashtable_walk_start
return err in sctp_transport_walk_start, and if sctp_transport_walk_start
return err, we do not need to call sctp_transport_walk_stop any more.
For sctp proc, we will use 'iter->start_fail' to decide if we will call
rhashtable_walk_stop/exit.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent b5e2f4e commit 53fa103
2 files changed
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
283 | 284 | | |
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
289 | 290 | | |
290 | | - | |
| 291 | + | |
| 292 | + | |
291 | 293 | | |
| 294 | + | |
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
| |||
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
| 303 | + | |
| 304 | + | |
300 | 305 | | |
301 | 306 | | |
302 | 307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4299 | 4299 | | |
4300 | 4300 | | |
4301 | 4301 | | |
| 4302 | + | |
| 4303 | + | |
| 4304 | + | |
| 4305 | + | |
4302 | 4306 | | |
4303 | | - | |
| 4307 | + | |
4304 | 4308 | | |
4305 | 4309 | | |
4306 | 4310 | | |
| |||
4389 | 4393 | | |
4390 | 4394 | | |
4391 | 4395 | | |
4392 | | - | |
4393 | 4396 | | |
| 4397 | + | |
4394 | 4398 | | |
4395 | | - | |
4396 | | - | |
| 4399 | + | |
| 4400 | + | |
| 4401 | + | |
4397 | 4402 | | |
4398 | 4403 | | |
4399 | 4404 | | |
| |||
4407 | 4412 | | |
4408 | 4413 | | |
4409 | 4414 | | |
4410 | | - | |
4411 | 4415 | | |
| 4416 | + | |
4412 | 4417 | | |
4413 | 4418 | | |
4414 | 4419 | | |
| |||
0 commit comments