Skip to content
Snippets Groups Projects
Select Git revision
  • b0f5a8f32e8bbdaae1abb8abe2d3cbafaba57e08
  • master default
  • android-container
  • nanopc-t4
  • for-kernelci
  • WIP-syscall
  • v4.16-rc5
  • v4.16-rc4
  • v4.16-rc3
  • v4.16-rc2
  • v4.16-rc1
  • v4.15
  • v4.15-rc9
  • v4.15-rc8
  • v4.15-rc7
  • v4.15-rc6
  • v4.15-rc5
  • v4.15-rc4
  • v4.15-rc3
  • v4.15-rc2
  • v4.15-rc1
  • v4.14
  • v4.14-rc8
  • v4.14-rc7
  • v4.14-rc6
  • v4.14-rc5
26 results

kernel

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Vegard Nossum authored and Linus Torvalds committed
    This fixes a regression in commit 4d6501dc where I didn't notice
    that MIPS and OpenRISC were reinitialising p->{set,clear}_child_tid to
    NULL after our initialisation in copy_process().
    
    We can simply get rid of the arch-specific initialisation here since it
    is now always done in copy_process() before hitting copy_thread{,_tls}().
    
    Review notes:
    
     - As far as I can tell, copy_process() is the only user of
       copy_thread_tls(), which is the only caller of copy_thread() for
       architectures that don't implement copy_thread_tls().
    
     - After this patch, there is no arch-specific code touching
       p->set_child_tid or p->clear_child_tid whatsoever.
    
     - It may look like MIPS/OpenRISC wanted to always have these fields be
       NULL, but that's not true, as copy_process() would unconditionally
       set them again _after_ calling copy_thread_tls() before commit
       4d6501dc.
    
    Fixes: 4d6501dc ("kthread: Fix use-after-free if kthread fork fails")
    Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
    Tested-by: Guenter Roeck <linux@roeck-us.net> # MIPS only
    Acked-by: default avatarStafford Horne <shorne@gmail.com>
    Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: linux-mips@linux-mips.org
    Cc: Jonas Bonn <jonas@southpole.se>
    Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
    Cc: openrisc@lists.librecores.org
    Cc: Jamie Iles <jamie.iles@oracle.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b0f5a8f3
    History
    Name Last commit Last update
    ..