lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120814183454.GV25632@google.com>
Date:	Tue, 14 Aug 2012 11:34:54 -0700
From:	Tejun Heo <tj@...nel.org>
To:	Joonsoo Kim <js1304@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/6] workqueue: correct req_cpu in
 trace_workqueue_queue_work()

Hello,

On Wed, Aug 15, 2012 at 03:10:12AM +0900, Joonsoo Kim wrote:
> When we do tracing workqueue_queue_work(), it records requested cpu.
> But, if !(@wq->flag & WQ_UNBOUND) and @cpu is WORK_CPU_UNBOUND,
> requested cpu is changed as local cpu.
> In case of @wq->flag & WQ_UNBOUND, above change is not occured,
> therefore it is reasonable to correct it.
>
> Use temporary local variable for storing local cpu.
> 
> Signed-off-by: Joonsoo Kim <js1304@...il.com>
> 
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 49d8f4a..6a17ab0 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -1198,6 +1198,7 @@ static void __queue_work(unsigned int cpu, struct workqueue_struct *wq,
>  	struct cpu_workqueue_struct *cwq;
>  	struct list_head *worklist;
>  	unsigned int work_flags;
> +	unsigned int lcpu;

@lcpu in __queue_delayed_work() stands for "last cpu", which is kinda
weird here.  Maybe just add "unsigned int req_cpu = cpu" at the top of
the function and use it for the TP?

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ