lkml.org 
[lkml]   [2018]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 3/6] Uprobes: Support SDT markers having reference count (semaphore)
I need to read this (hopefully final) version carefully. I'll try to do
this before next Monday.

just one note,

On 08/09, Ravi Bangoria wrote:
>
> +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;
> +
> + list_for_each_safe(pos, q, &delayed_uprobe_list) {
> + du = list_entry(pos, struct delayed_uprobe, list);
> +
> + if (uprobe && mm && du->uprobe == uprobe && du->mm == mm)
> + delayed_uprobe_delete(du);
> + else if (!uprobe && du->mm == mm)
> + delayed_uprobe_delete(du);
> + else if (!mm && du->uprobe == uprobe)
> + delayed_uprobe_delete(du);
> + }

Sorry, I can't resist... this doesn't look very nice. How about

list_for_each_safe(pos, q, &delayed_uprobe_list) {
du = list_entry(pos, struct delayed_uprobe, list);

if (uprobe && du->uprobe != uprobe)
continue;
if (mm && du->mm != mm)
continue;

delayed_uprobe_delete();
}

I won't insist, this is cosmetic after all, but please consider this change
in case you will need to send v9.

Oleg.

\
 
 \ /
  Last update: 2018-08-09 16:39    [W:0.126 / U:1.740 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site