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>] [day] [month] [year] [list]
Message-Id: <20230504065906.46574-1-luhongfei@vivo.com>
Date:   Thu,  4 May 2023 14:59:06 +0800
From:   luhongfei <luhongfei@...o.com>
To:     Jens Axboe <axboe@...nel.dk>,
        Pavel Begunkov <asml.silence@...il.com>,
        io-uring@...r.kernel.org (open list:IO_URING),
        linux-kernel@...r.kernel.org (open list)
Cc:     opensource.kernel@...o.com, luhongfei <luhongfei@...o.com>
Subject: [PATCH] Subject: io_uring: Remove the check of data->free_work and data->do_work in io_wq_create

Remove the check of data->free_work and data->do_work in io_wq_create
io_wq_create is only called in io_init_wq_offload, which has already
initialized free_work and do_work to io_wq_free_work and io_wq_submit_work
respectively, so there is no need to detect whether free_work and
do_work are null pointers in io_wq_create.

Signed-off-by: luhongfei <luhongfei@...o.com>
---
 io_uring/io-wq.c | 2 --
 1 file changed, 2 deletions(-)
 mode change 100644 => 100755 io_uring/io-wq.c

diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c
index f81c0a7136a5..b978a058ea51
--- a/io_uring/io-wq.c
+++ b/io_uring/io-wq.c
@@ -1143,8 +1143,6 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
 	int ret, node, i;
 	struct io_wq *wq;
 
-	if (WARN_ON_ONCE(!data->free_work || !data->do_work))
-		return ERR_PTR(-EINVAL);
 	if (WARN_ON_ONCE(!bounded))
 		return ERR_PTR(-EINVAL);
 
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ