[PATCH v8 3/6] Uprobes: Support SDT markers having reference count (semaphore)

From
Ravi Bangoria <hidden>
Date
2018-08-13 07:38:51
Also in
linux-mips, lkml
Reply to
Ravi Bangoria, 2018-08-13
Hi Song,

On 08/13/2018 11:17 AM, Ravi Bangoria wrote:
quoted
quoted
+
+static void delayed_uprobe_remove(struct uprobe *uprobe, struct mm_struct *mm)
+{
+       struct list_head *pos, *q;
+       struct delayed_uprobe *du;
+
+       if (!uprobe && !mm)
+               return;
And do we really need this check?

Yes. delayed_uprobe_remove(uprobe=NULL, mm=NULL) is an invalid case. If I remove
this check, code below (or more accurately code suggested by Oleg) will remove
all entries from delayed_uprobe_list. So I will keep this check but put a comment
above function.
Sorry, my bad. Please ignore above comment. Even though, it saves us
to unnecessary loop over entire delayed_uprobe_list when both uprobe
and mm are NULL, that case is not possible with current code. Also,
I'm not dereferencing any of them. So, IMHO it's fine to remove this
check.

Thanks,
Ravi
Thread (42 messages) 42 messages, 5 authors, last reply 2018-08-14
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help