ksym_tracer: Report error when failed to re-register hbp
When access type is changed, the hw break point will be unregistered and then be registered again with new access type. But the registration may fail, in this case, -errno should be returned. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: "K.Prasad" <prasad@linux.vnet.ibm.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <4A52E314.7070004@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Родитель
011ed56853
Коммит
0d109c8f70
|
@ -302,13 +302,13 @@ static ssize_t ksym_trace_filter_write(struct file *file,
|
||||||
ret = count;
|
ret = count;
|
||||||
goto unlock_ret_path;
|
goto unlock_ret_path;
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
ret = count;
|
||||||
ksym_filter_entry_count--;
|
ksym_filter_entry_count--;
|
||||||
hlist_del_rcu(&(entry->ksym_hlist));
|
hlist_del_rcu(&(entry->ksym_hlist));
|
||||||
synchronize_rcu();
|
synchronize_rcu();
|
||||||
kfree(entry->ksym_hbp);
|
kfree(entry->ksym_hbp);
|
||||||
kfree(entry);
|
kfree(entry);
|
||||||
ret = count;
|
|
||||||
goto err_ret;
|
goto err_ret;
|
||||||
} else {
|
} else {
|
||||||
/* Check for malformed request: (4) */
|
/* Check for malformed request: (4) */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче