lkml.org 
[lkml]   [2022]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: md: fix missing check on list iterator
Date
On Fri, 1 Apr 2022 10:47:18 -0400, Mike Snitzer wrote:
> Did you acually hit a bug (invalid memory access)?
>
> I cannot see how given the checks prior to iterating m->priority_groups:
>
> if (!pgstr || (sscanf(pgstr, "%u%c", &pgnum, &dummy) != 1) || !pgnum ||
> !m->nr_priority_groups || (pgnum > m->nr_priority_groups)) {
> DMWARN("invalid PG number supplied to bypass_pg");
> return -EINVAL;
> }
>
> So I have _not_ taken your "fix".

Yes, you are correct. It has been checked before, thus not a bug and
no need to fix. And I have sent a PATCH v2 to use list iterator only
inside the loop, please check it. Thank you very much.

--
Xiaomeng Tong

\
 
 \ /
  Last update: 2022-04-03 05:57    [W:0.070 / U:2.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site