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] [day] [month] [year] [list]
Message-ID: <0A8AB856-E7D0-4383-BC16-8029BC354C27@nutanix.com>
Date: Fri, 7 Mar 2025 20:54:56 +0000
From: Harshit Agarwal <harshit@...anix.com>
To: Juri Lelli <juri.lelli@...hat.com>
CC: Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Vincent Guittot
	<vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Valentin
 Schneider <vschneid@...hat.com>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        Jon Kohler <jon@...anix.com>,
        Gauri
 Patwardhan <gauri.patwardhan@...anix.com>,
        Rahul Chunduru
	<rahul.chunduru@...anix.com>,
        Will Ton <william.ton@...anix.com>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH v3] sched/rt: Fix race in push_rt_task



> On Mar 5, 2025, at 2:43 AM, Juri Lelli <juri.lelli@...hat.com> wrote:
> 
> 
>> Another one is dl_task_offline_migration which gets the task from
>> dl_task_timer which in turn gets it from sched_dl_entity.
>> I haven’t gone through the deadline code thoroughly but I think this race
>> shouldn’t exist for the offline task (2nd) case. If that is true then the fix
>> could be to check in push_dl_task if the task returned by find_lock_later_rq
>> is still at the head of the queue or not.
> 
> I believe that won't work as dl_task_offline_migration() gets called in
> case the replenishment timer for a task fires (to unthrottle it) and it
> finds the old rq the task was running on has been offlined in the
> meantime. The task is still throttled at this point and so it is not
> enqueued in the dl_rq nor in the pushable task list/tree, so the check
> you are adding won't work I am afraid. Maybe we can use dl_se->dl_throttled
> to differentiate this different case.
> 

Thanks Juri. I sent the fix please take a look:
https://lore.kernel.org/lkml/20250307204255.60640-1-harshit@nutanix.com/
Instead of changing find_lock_later_rq, I added the handling in the
caller i.e. push_dl_task since that’s the one affected by the race.
I think we don’t need to handle the other case at all
as the race is not applicable for offline migration case. Let me know
if this sounds fine or if I am missing something.

Regards,
Harshit

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ