1. 26 6月, 2015 2 次提交
    • S
      bitmap: remove explicit newline handling using scnprintf format string · 9cf79d11
      Sudeep Holla 提交于
      bitmap_print_to_pagebuf uses scnprintf to copy the cpumask/list to page
      buffer.  It handles the newline and trailing null character explicitly.
      
      It's unnecessary and also partially duplicated as scnprintf already adds
      trailing null character.  The newline can be passed through format
      string to scnprintf.  This patch does that simplification.
      
      However theoretically there's one behavior difference: when the buffer
      is too small, the original code would still output '\n' at the end while
      the new code(with this patch) would just continue to print the formatted
      string.  Since this function is dealing with only page buffers, it's
      highly unlikely to hit that corner case.
      
      This patch will help in auditing the users of bitmap_print_to_pagebuf to
      verify that the buffer passed is large enough and get rid of it
      completely by replacing them with direct scnprintf()
      
      [akpm@linux-foundation.org: tweak comment]
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      Suggested-by: NPawel Moll <Pawel.Moll@arm.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9cf79d11
    • C
      __bitmap_parselist: fix bug in empty string handling · 2528a8b8
      Chris Metcalf 提交于
      bitmap_parselist("", &mask, nmaskbits) will erroneously set bit zero in
      the mask.  The same bug is visible in cpumask_parselist() since it is
      layered on top of the bitmask code, e.g.  if you boot with "isolcpus=",
      you will actually end up with cpu zero isolated.
      
      The bug was introduced in commit 4b060420 ("bitmap, irq: add
      smp_affinity_list interface to /proc/irq") when bitmap_parselist() was
      generalized to support userspace as well as kernelspace.
      
      Fixes: 4b060420 ("bitmap, irq: add smp_affinity_list interface to /proc/irq")
      Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2528a8b8
  2. 17 4月, 2015 1 次提交
  3. 14 2月, 2015 12 次提交
  4. 13 2月, 2015 5 次提交
  5. 14 12月, 2014 1 次提交
  6. 08 11月, 2014 1 次提交
  7. 30 10月, 2014 1 次提交
  8. 09 9月, 2014 1 次提交
  9. 07 8月, 2014 16 次提交