1. 01 12月, 2009 3 次提交
    • M
      Alpha: Rearrange thread info flags fixing two regressions · 745dd240
      Michael Cree 提交于
      The removal of the TIF_NOTIFY_RESUME flag, commit a583f1b5
      "remove unused TIF_NOTIFY_RESUME flag," resulted in incorrect
      setting of the unaligned access control flags by the prctl syscall.
      
      The re-addition of the TIF_NOTIFY_RESUME flag, commit d0420c83
      "KEYS: Extend TIF_NOTIFY_RESUME to (almost) all architectures [try #6]"
      further caused problems, namely incorrect operands to assembler code
      as evidenced by:
      
      AS      arch/alpha/kernel/entry.o
      arch/alpha/kernel/entry.S: Assembler messages:
      arch/alpha/kernel/entry.S:326: Warning: operand out of range
      (0x0000000000000406 is not between 0x0000000000000000 and
      0x00000000000000ff)
      
      Both regressions fixed by (1) rearranging TIF_NOTIFY_RESUME flag to be
      in lower 8 bits of the thread info flags, and (2) making sure that
      ALPHA_UAC_SHIFT matches the rearrangement of the thread info flags.
      Signed-off-by: NMichael Cree <mcree@orcon.net.nz>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: David Howells <dhowells@redhat.com>,
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      745dd240
    • J
      arch/alpha/kernel: Add kmalloc NULL tests · cc9a2c83
      Julia Lawall 提交于
      Check that the result of kmalloc is not NULL before passing it to other
      functions.
      
      The semantic match that finds this problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @@
      expression *x;
      identifier f;
      constant char *C;
      @@
      
      x = \(kmalloc\|kcalloc\|kzalloc\)(...);
      ... when != x == NULL
          when != x != NULL
          when != (x || ...)
      (
      kfree(x)
      f(...,C,...,x,...)
      |
      *f(...,x,...)
      |
      *x->f
      )
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Richard Henderson <rth@twiddle.net>
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      cc9a2c83
    • J
      arch/alpha/kernel/sys_ruffian.c: Use DIV_ROUND_CLOSEST · 04d8a9db
      Julia Lawall 提交于
      The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
      but is perhaps more readable.
      
      The semantic patch that makes this change is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @haskernel@
      @@
      
      @depends on haskernel@
      expression x,__divisor;
      @@
      
      - (((x) + ((__divisor) / 2)) / (__divisor))
      + DIV_ROUND_CLOSEST(x,__divisor)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Richard Henderson <rth@twiddle.net>
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      04d8a9db
  2. 20 11月, 2009 9 次提交
  3. 19 11月, 2009 11 次提交
  4. 18 11月, 2009 17 次提交