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: <20230110163043.069c9aa4@kernel.org>
Date:   Tue, 10 Jan 2023 16:30:43 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     李哲 <sensor1010@....com>,
        Wei Wang <weiwan@...gle.com>, davem@...emloft.net,
        pabeni@...hat.com, bigeasy@...utronix.de, imagedong@...cent.com,
        kuniyu@...zon.com, petrm@...dia.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] net/dev.c : Remove redundant state settings after
 waking up

On Tue, 10 Jan 2023 10:29:20 +0100 Eric Dumazet wrote:
> > the task status has been set to TASK_RUNNING in shcedule(),
> > no need to set again here  
> 
> Changelog is rather confusing, this does not match the patch, which
> removes one set_current_state(TASK_INTERRUPTIBLE);
> 
> TASK_INTERRUPTIBLE != TASK_RUNNING
> 
> Patch itself looks okay (but has nothing to do with thread state after
> schedule()),
> you should have CC Wei Wang because she
> authored commit cb038357937e net: fix race between napi kthread mode
> and busy poll

AFAIU this is the semi-idiomatic way of handling wait loops.
It's not schedule() that may set the task state to TASK_RUNNING,
it's whoever wakes the process and makes the "wait condition" true.
In this case - test_bit(NAPI_STATE_SCHED, &napi->state)

I vote to not futz with this logic.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ