1. 24 7月, 2008 2 次提交
    • O
      posix-timers: fix posix_timer_event() vs dequeue_signal() race · ba661292
      Oleg Nesterov 提交于
      The bug was reported and analysed by Mark McLoughlin <markmc@redhat.com>,
      the patch is based on his and Roland's suggestions.
      
      posix_timer_event() always rewrites the pre-allocated siginfo before sending
      the signal. Most of the written info is the same all the time, but memset(0)
      is very wrong. If ->sigq is queued we can race with collect_signal() which
      can fail to find this siginfo looking at .si_signo, or copy_siginfo() can
      copy the wrong .si_code/si_tid/etc.
      
      In short, sys_timer_settime() can in fact stop the active timer, or the user
      can receive the siginfo with the wrong .si_xxx values.
      
      Move "memset(->info, 0)" from posix_timer_event() to alloc_posix_timer(),
      change send_sigqueue() to set .si_overrun = 0 when ->sigq is not queued.
      It would be nice to move the whole sigq->info initialization from send to
      create path, but this is not easy to do without uglifying timer_create()
      further.
      
      As Roland rightly pointed out, we need more cleanups/fixes here, see the
      "FIXME" comment in the patch. Hopefully this patch makes sense anyway, and
      it can mask the most bad implications.
      Reported-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Cc: Mark McLoughlin <markmc@redhat.com>
      Cc: Oliver Pinter <oliver.pntr@gmail.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: stable@kernel.org
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      
       kernel/posix-timers.c |   17 +++++++++++++----
       kernel/signal.c       |    1 +
       2 files changed, 14 insertions(+), 4 deletions(-)
      ba661292
    • O
      posix-timers: do_schedule_next_timer: fix the setting of ->si_overrun · 54da1174
      Oleg Nesterov 提交于
      do_schedule_next_timer() sets info->si_overrun = timr->it_overrun_last,
      this discards the already accumulated overruns.
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Cc: Mark McLoughlin <markmc@redhat.com>
      Cc: Oliver Pinter <oliver.pntr@gmail.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: stable@kernel.org
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      54da1174
  2. 25 5月, 2008 1 次提交
  3. 22 5月, 2008 34 次提交
  4. 21 5月, 2008 3 次提交
    • D
      sunhv: Fix locking in non-paged I/O case. · 3651751f
      David S. Miller 提交于
      This causes the lock to be taken twice, thus resulting in
      a deadlock.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3651751f
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 · 5cf11daf
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (21 commits)
        [CIFS] Remove debug statement
        Fix possible access to undefined memory region.
        [CIFS] Enable DFS support for Windows query path info
        [CIFS] Enable DFS support for Unix query path info
        [CIFS] add missing seq_printf to cifs_show_options for hard mount option
        [CIFS] add more complete mount options to cifs_show_options
        [CIFS] Add missing defines for DFS
        CIFSGetDFSRefer cleanup + dfs_referral_level_3 fixed to conform REFERRAL_V3 the MS-DFSC spec.
        Fixed DFS code to work with new 'build_path_from_dentry', that returns full path if share in the dfs, now.
        [CIFS] enable parsing for transport encryption mount parm
        [CIFS] Finishup DFS code
        [CIFS] BKL-removal: convert CIFS over to unlocked_ioctl
        [CIFS] suppress duplicate warning
        [CIFS] Fix paths when share is in DFS to include proper prefix
        add function to convert access flags to legacy open mode
        clarify return value of cifs_convert_flags()
        [CIFS] don't explicitly do a FindClose on rewind when directory search has ended
        [CIFS] cleanup old checkpatch warnings
        [CIFS] CIFSSMBPosixLock should return -EINVAL on error
        fix memory leak in CIFSFindNext
        ...
      5cf11daf
    • S
      [CIFS] Remove debug statement · 397d71dd
      Steve French 提交于
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      397d71dd