Re: Assertion fails in init_module.c on 32bits

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

 



On Wed, Jun 20, 2012 at 8:56 AM, Robert Milasan <rmilasan@xxxxxxx> wrote:
> On Wed, 20 Jun 2012 08:34:59 -0300
> Lucas De Marchi <lucas.demarchi@xxxxxxxxxxxxxx> wrote:
>
>> Hi Robert,
>>
>> please CC linux-modules@xxxxxxxxxxxxxxx so others can benefit from the
>> responses. I'm doing so now.
>>
>> On Wed, Jun 20, 2012 at 8:21 AM, Robert Milasan <rmilasan@xxxxxxx>
>> wrote:
>> > Hello, I'm trying now to build kmod 9 on 64 and 32 bits opensuse. On
>> > 64bits everything is fine, but on 32bits it fails in init_modules.c:
>> > 150:assert(mkdir_p(buf, 0755) >= 0);
>> >
>> > If I drop assert, all works. Do you have an idea why it fails?
>>
>> Does "make check" work for you after removing this assert? Some of the
>> tests that rely on being able to create dirs on testsuite's rootfs
>> should fail if you didn't create the dirs.
>>
>> On your 32 bits machine, is your testsuite/rootfs dir (or any of the
>> dirs below)  read-only?
>>
>> Lucas De Marchi
>
> If I drop assert(mkdir_p...) then all works. rootfs and the below dirs
> all have the rights "0755" so all good, but this issue doesn't happen
> on 64bits which is a bit strange for me. Maybe there is something wrong
> in mkdir.c -> mkdir_p function.

Maybe... gotta check this on a 32 bits machine.

>
> Anyway I've asked around and some people said that using assert on
> "mkdir_p" is kind of a bad idea, but I'm not a developer so I wouldn't
> know.

Yeah, except that this code path runs only on *testsuite*, i.e.  it's
part of the tests we make to check it's right, but it's not part of
libkmod, modprobe or depmod, etc that runs on production.

I put the assert because there are tests that depend on being able to
create dirs: among others, the "install command loop" test. If dir is
not created, it will fail nonetheless, but instead of saying it's
because of a failed dir creation it will create a fork bomb (yeah,
it's a loop of fork + exec). I preferred failing the test earlier than
having to killall modprobe later or wait for kernel's oom killer.


Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux