Re: md: fix missing check on list iterator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux