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-next>] [day] [month] [year] [list]
Message-ID: <f7ac4874-9c6c-4f41-653b-b5a664bfc843@canonical.com>
Date:   Thu, 8 Oct 2020 19:23:55 +0100
From:   Colin Ian King <colin.king@...onical.com>
To:     Jens Axboe <axboe@...nel.dk>
Cc:     Alexander Viro <viro@...iv.linux.org.uk>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        io-uring@...r.kernel.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: re: io_uring: process task work in io_uring_register()

Hi,

Static analysis with Coverity has detected a "dead-code" issue with the
following commit:

commit af9c1a44f8dee7a958e07977f24ba40e3c770987
Author: Jens Axboe <axboe@...nel.dk>
Date:   Thu Sep 24 13:32:18 2020 -0600

    io_uring: process task work in io_uring_register()

The analysis is as follows:

9513                do {
9514                        ret =
wait_for_completion_interruptible(&ctx->ref_comp);

cond_const: Condition ret, taking false branch. Now the value of ret is
equal to 0.

9515                        if (!ret)
9516                                break;
9517                        if (io_run_task_work_sig() > 0)
9518                                continue;
9519                } while (1);
9520
9521                mutex_lock(&ctx->uring_lock);
9522

const: At condition ret, the value of ret must be equal to 0.
dead_error_condition: The condition ret cannot be true.

9523                if (ret) {

Logically dead code (DEADCODE)
dead_error_begin: Execution cannot reach this statement:

9524                        percpu_ref_resurrect(&ctx->refs);
9525                        ret = -EINTR;
9526                        goto out_quiesce;
9527                }
9528        }
9529

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ