1. 07 Aug, 2014 2 commits
    • Max Filippov's avatar
      xtensa: add fixup for double exception raised in window overflow · ca839666
      Max Filippov authored
      commit 17290231 upstream.
      
      There are two FIXMEs in the double exception handler 'for the extremely
      unlikely case'. This case gets hit by gcc during kernel build once in
      a few hours, resulting in an unrecoverable exception condition.
      
      Provide missing fixup routine to handle this case. Double exception
      literals now need 8 more bytes, add them to the linker script.
      
      Also replace bbsi instructions with bbsi.l as we're branching depending
      on 8th and 7th LSB-based bits of exception address.
      
      This may be tested by adding the explicit DTLB invalidation to window
      overflow handlers, like the following:
      
          --- a/arch/xtensa/kernel/vectors.S
          +++ b/arch/xtensa/kernel/vectors.S
          @@ -592,6 +592,14 @@ ENDPROC(_WindowUnderflow4)
           ENTRY_ALIGN64(_WindowOverflow8)
      
          	s32e	a0, a9, -16
          +	bbsi.l	a9, 31, 1f
          +	rsr	a0, ccount
          +	bbsi.l	a0, 4, 1f
          +	pdtlb	a0, a9
          +	idtlb	a0
          +	movi	a0, 9
          +	idtlb	a0
          +1:
          	l32e    a0, a1, -12
          	s32e    a2, a9,  -8
          	s32e    a1, a9, -12
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      ca839666
    • Mikulas Patocka's avatar
      slab_common: fix the check for duplicate slab names · 77edf2fa
      Mikulas Patocka authored
      commit 69461747 upstream.
      
      The patch 3e374919 is supposed to fix the
      problem where kmem_cache_create incorrectly reports duplicate cache name
      and fails. The problem is described in the header of that patch.
      
      However, the patch doesn't really fix the problem because of these
      reasons:
      
      * the logic to test for debugging is reversed. It was intended to perform
        the check only if slub debugging is enabled (which implies that caches
        with the same parameters are not merged). Therefore, there should be
        #if !defined(CONFIG_SLUB) || defined(CONFIG_SLUB_DEBUG_ON)
        The current code has the condition reversed and performs the test if
        debugging is disabled.
      
      * slub debugging may be enabled or disabled based on kernel command line,
        CONFIG_SLUB_DEBUG_ON is just the default settings. Therefore the test
        based on definition of CONFIG_SLUB_DEBUG_ON is unreliable.
      
      This patch fixes the problem by removing the test
      "!defined(CONFIG_SLUB_DEBUG_ON)". Therefore, duplicate names are never
      checked if the SLUB allocator is used.
      
      Note to stable kernel maintainers: when backporint this patch, please
      backport also the patch 3e374919.
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Acked-by: default avatarChristoph Lameter <cl@linux.com>
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      77edf2fa
  2. 06 Aug, 2014 38 commits