Skip to content
  1. Aug 04, 2012
    • Anton Vorontsov's avatar
      pstore/ram: Mark ramoops_pstore_write_buf() as notrace · 24203036
      Anton Vorontsov authored
      
      
      write_buf() should be marked as notrace, otherwise it is prone to
      recursion.
      
      Though, yet the issue is never triggered in real life, because we run
      inside the function tracer, where ftrace does its own recurse protection.
      
      But it's still no good, plus soon we might switch to our own tracer ops,
      and then the issue will be fatal. So, let's fix it.
      
      Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
      24203036
    • Randy Dunlap's avatar
      pstore/ram: Fix printk format warning · 0427193b
      Randy Dunlap authored
      
      
      Fix printk format warning (on i386) in pstore:
      
      fs/pstore/ram.c:409:3: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'size_t'
      
      Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
      0427193b
    • Anton Vorontsov's avatar
      pstore/ram: Fix possible NULL dereference · a384f641
      Anton Vorontsov authored
      
      
      We can dereference 'cxt->cprz' if console and dump logging are disabled
      (which is unlikely, but still possible to do). This patch fixes the issue
      by changing the code so that we don't dereference przs at all, we can
      just calculate bufsize from console_size and record_size values.
      
      Plus, while at it, the patch improves the buffer size calculation.
      
      After Kay's printk rework, we know the optimal buffer size for console
      logging -- it is LOG_LINE_MAX (defined privately in printk.c). Previously,
      if only console logging was enabled, we would allocate unnecessary large
      buffer in pstore, while we only need LOG_LINE_MAX. (Pstore console logging
      is still capable of handling buffers > LOG_LINE_MAX, it will just do
      multiple calls to psinfo->write).
      
      Note that I don't export the constant, since we will do even a better
      thing soon: we will switch console logging to a new write_buf API, which
      will eliminate the need for the additional buffer; and so we won't need
      the constant.
      
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      a384f641
  2. Aug 02, 2012
    • Sage Weil's avatar
      ceph: simplify+fix atomic_open · 5ef50c3b
      Sage Weil authored
      
      
      The initial ->atomic_open op was carried over from the old intent code,
      which was incomplete and didn't really work.  Replace it with a fresh
      method.  In particular:
      
       * always attempt to do an atomic open+lookup, both for the create case
         and for lookups of existing files.
       * fix symlink handling by returning 1 to the VFS so that we can follow
         the link to its destination. This fixes a longstanding ceph bug (#2392).
      
      Signed-off-by: default avatarSage Weil <sage@inktank.com>
      5ef50c3b
  3. Aug 01, 2012
  4. Jul 31, 2012
Loading