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: <54e2f5a5-9593-85f8-e00a-8638de5bbc60@intel.com>
Date:   Wed, 8 Sep 2021 09:43:08 -0700
From:   Dave Jiang <dave.jiang@...el.com>
To:     Bixuan Cui <cuibixuan@...wei.com>, linux-kernel@...r.kernel.org,
        dmaengine@...r.kernel.org
Cc:     vkoul@...nel.org, john.wanghui@...wei.com
Subject: Re: [PATCH -next] dmaengine: idxd: Use list_move_tail instead of
 list_del/list_add_tail


On 9/8/2021 2:28 AM, Bixuan Cui wrote:
> Using list_move_tail() instead of list_del() + list_add_tail()
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Bixuan Cui <cuibixuan@...wei.com>

Thanks!

Acked-by: Dave Jiang <dave.jiang@...el.com>


> ---
>   drivers/dma/idxd/irq.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/dma/idxd/irq.c b/drivers/dma/idxd/irq.c
> index ca88fa7a328e..79fcfc4883e4 100644
> --- a/drivers/dma/idxd/irq.c
> +++ b/drivers/dma/idxd/irq.c
> @@ -221,8 +221,7 @@ static void irq_process_work_list(struct idxd_irq_entry *irq_entry)
>   
>   	list_for_each_entry_safe(desc, n, &irq_entry->work_list, list) {
>   		if (desc->completion->status) {
> -			list_del(&desc->list);
> -			list_add_tail(&desc->list, &flist);
> +			list_move_tail(&desc->list, &flist);
>   		}
>   	}
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ