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]
Date:   Wed, 26 Oct 2016 13:45:48 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Thomas Graf <tgraf@...g.ch>
Cc:     Phil Sutter <phil@....cc>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        linux-m68k <linux-m68k@...ts.linux-m68k.org>
Subject: Re: concurrent rhashtable test failure

Hi Thomas,

On Wed, Oct 26, 2016 at 11:51 AM, Thomas Graf <tgraf@...g.ch> wrote:
> On 10/24/16 at 02:11pm, Geert Uytterhoeven wrote:
>> On m68k/ARAnyM, test_rhashtable fails with:
>>
>>     Test failed: thread 0 returned: -4
>>
>> (-4 = -EINTR)
>
> The error is returned by kthread_stop(), I suspect we are running into
> this:
>
> static int kthread(void *_create)
> {
>         [...]
>         complete(done);
>         schedule();
>
>         ret = -EINTR;
>
>         if (!test_bit(KTHREAD_SHOULD_STOP, &self.flags)) {
>                 __kthread_parkme(&self);
>                 ret = threadfn(data);
>         }
>         /* we can't just return, we must preserve "self" on stack */
>         do_exit(ret);
> }

Looks reasonable. Adding a small delay like in the (whitespace-damaged)
patch below fixes the issue for me.

However, shouldn't the prestart_sem take care of making sure that
all threads have been started?

--- a/lib/test_rhashtable.c
+++ b/lib/test_rhashtable.c
@@ -13,6 +13,7 @@
  * Self Test
  **************************************************************************/

+#include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/jhash.h>
 #include <linux/kernel.h>
@@ -403,6 +404,7 @@ static int __init test_rht_init(void)
                pr_err("  down interruptible failed\n");
        for (i = 0; i < tcount; i++)
                up(&startup_sem);
+       msleep(1000);
        for (i = 0; i < tcount; i++) {
                if (IS_ERR(tdata[i].task))
                        continue;

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ