Commit a3f152be authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Andrei Vagin

unix: Fix nil dereference in find_queuer_for

When walking over unix sockets make sure the
queuer is present before accessing it.

https://jira.sw.ru/browse/PSBM-82796Reported-by: 's avatarVitaly Ostrosablin <vostrosablin@virtuozzo.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@virtuozzo.com>
Reviewed-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
parent 0284e70f
...@@ -848,7 +848,7 @@ static struct unix_sk_info *find_queuer_for(int id) ...@@ -848,7 +848,7 @@ static struct unix_sk_info *find_queuer_for(int id)
struct unix_sk_info *ui; struct unix_sk_info *ui;
list_for_each_entry(ui, &unix_sockets, list) { list_for_each_entry(ui, &unix_sockets, list) {
if (ui->queuer->ue->id == id) if (ui->queuer && ui->queuer->ue->id == id)
return ui; return ui;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment