Re: [PATCH 2/4] Do not assume we found a module in addOption() in loader/modules.c

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

 



On 09/18/2009 10:58 PM, David Cantrell wrote:
> On Fri, 18 Sep 2009, Chris Lumens wrote:
> 
>>> Avoid SIGSEGV in addOption() in loader/modules.c.  Just because found
>>> does not equal 0 does not mean we found the module requested.
>>
>> Can you explain what's going on in this patch and function?  Got a bug
>> number?

> It's actually related to the first patch where I reduce the
> mlLoadModuleSet()
> call on s390x.  When mlLoadModuleSet() was called with floppy, pcspkr,
> etc on
> s390x, the console was getting a backtrace dumped and it fell in to
> addOption().
> 
> The assumption in addOption() is that the module is always found, which

Not that I would understand all the details of the existing code, but
readModuleOpts() seems to check with isValidModule() before calling
addOption() while doLoadModule() just calls addOption() unconditionally.
I guess your fix in addOption() would make it safe in all cases.

> isn't
> the case.  We can prevent that by only calling mlLoadModuleSet() with
> modules
> that exist on the platform, but in order to prevent these backtraces in the
> future, I figured it was worth fixing addOption() too.

+1


Steffen

Linux on System z Development

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Erich Baier
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux