1. 06 Aug, 2008 9 commits
    • David Howells's avatar
      netfilter: xt_time: fix time's time_mt()'s use of do_div() · 1e692471
      David Howells authored
      [ Upstream commit 280763c0 ]
      
      Fix netfilter xt_time's time_mt()'s use of do_div() on an s64 by using
      div_s64() instead.
      
      This was introduced by patch ee4411a1
      ("[NETFILTER]: x_tables: add xt_time match").
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      CC: Oliver Pinter <oliver.pntr@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      1e692471
    • Peter Zijlstra's avatar
      Kprobe smoke test lockdep warning · 8a96da25
      Peter Zijlstra authored
      [ Upstream commit d54191b8 ]
      
      On Mon, 2008-04-21 at 18:54 -0400, Masami Hiramatsu wrote:
      > Thank you for reporting.
      >
      > Actually, kprobes tries to fixup thread's flags in post_kprobe_handler
      > (which is called from kprobe_exceptions_notify) by
      > trace_hardirqs_fixup_flags(pt_regs->flags). However, even the irq flag
      > is set in pt_regs->flags, true hardirq is still off until returning
      > from do_debug. Thus, lockdep assumes that hardirq is off without
      annotation.
      >
      > IMHO, one possible solution is that fixing hardirq flags right after
      > notify_die in do_debug instead of in post_kprobe_handler.
      
      My reply to BZ 10489:
      
      > [    2.707509] Kprobe smoke test started
      > [    2.709300] ------------[ cut here ]------------
      > [    2.709420] WARNING: at kernel/lockdep.c:2658 check_flags+0x4d/0x12c()
      > [    2.709541] Modules linked in:
      > [    2.709588] Pid: 1, comm: swapper Not tainted 2.6.25.jml.057 #1
      > [    2.709588]  [<c0126acc>] warn_on_slowpath+0x41/0x51
      > [    2.709588]  [<c010bafc>] ? save_stack_trace+0x1d/0x3b
      > [    2.709588]  [<c0140a83>] ? save_trace+0x37/0x89
      > [    2.709588]  [<c011987d>] ? kernel_map_pages+0x103/0x11c
      > [    2.709588]  [<c0109803>] ? native_sched_clock+0xca/0xea
      > [    2.709588]  [<c0142958>] ? mark_held_locks+0x41/0x5c
      > [    2.709588]  [<c0382580>] ? kprobe_exceptions_notify+0x322/0x3af
      > [    2.709588]  [<c0142aff>] ? trace_hardirqs_on+0xf1/0x119
      > [    2.709588]  [<c03825b3>] ? kprobe_exceptions_notify+0x355/0x3af
      > [    2.709588]  [<c0140823>] check_flags+0x4d/0x12c
      > [    2.709588]  [<c0143c9d>] lock_release+0x58/0x195
      > [    2.709588]  [<c038347c>] ? __atomic_notifier_call_chain+0x0/0x80
      > [    2.709588]  [<c03834d6>] __atomic_notifier_call_chain+0x5a/0x80
      > [    2.709588]  [<c0383508>] atomic_notifier_call_chain+0xc/0xe
      > [    2.709588]  [<c013b6d4>] notify_die+0x2d/0x2f
      > [    2.709588]  [<c038168a>] do_debug+0x67/0xfe
      > [    2.709588]  [<c0381287>] debug_stack_correct+0x27/0x30
      > [    2.709588]  [<c01564c0>] ? kprobe_target+0x1/0x34
      > [    2.709588]  [<c0156572>] ? init_test_probes+0x50/0x186
      > [    2.709588]  [<c04fae48>] init_kprobes+0x85/0x8c
      > [    2.709588]  [<c04e947b>] kernel_init+0x13d/0x298
      > [    2.709588]  [<c04e933e>] ? kernel_init+0x0/0x298
      > [    2.709588]  [<c04e933e>] ? kernel_init+0x0/0x298
      > [    2.709588]  [<c0105ef7>] kernel_thread_helper+0x7/0x10
      > [    2.709588]  =======================
      > [    2.709588] ---[ end trace 778e504de7e3b1e3 ]---
      > [    2.709588] possible reason: unannotated irqs-off.
      > [    2.709588] irq event stamp: 370065
      > [    2.709588] hardirqs last  enabled at (370065): [<c0382580>]
      kprobe_exceptions_notify+0x322/0x3af
      > [    2.709588] hardirqs last disabled at (370064): [<c0381bb7>]
      do_int3+0x1d/0x7d
      > [    2.709588] softirqs last  enabled at (370050): [<c012b464>]
      __do_softirq+0xfa/0x100
      > [    2.709588] softirqs last disabled at (370045): [<c0107438>]
      do_softirq+0x74/0xd9
      > [    2.714751] Kprobe smoke test passed successfully
      
      how I love this stuff...
      
      Ok, do_debug() is a trap, this can happen at any time regardless of the
      machine's IRQ state. So the first thing we do is fix up the IRQ state.
      Then we call this die notifier stuff; and return with messed up IRQ
      state... YAY.
      
      So, kprobes fudges it..
      
        notify_die(DIE_DEBUG)
          kprobe_exceptions_notify()
            post_kprobe_handler()
              modify regs->flags
              trace_hardirqs_fixup_flags(regs->flags);  <--- must be it
      
      So what's the use of modifying flags if they're not meant to take effect
      at some point.
      
      /me tries to reproduce issue; enable kprobes test thingy && boot
      
      OK, that reproduces..
      
      So the below makes it work - but I'm not getting this code; at the time
      I wrote that stuff I CC'ed each and every kprobe maintainer listed in
      the usual places but got no reposonse - can some please explain this
      stuff to me?
      
      Are the saved flags only for the TF bit or are they made in full effect
      later (and if so, where) ?
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      CC: Oliver Pinter <oliver.pntr@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8a96da25
    • Neil Brown's avatar
      Close race in md_probe · a23a984f
      Neil Brown authored
      [ Upstream commit f48ed538 ]
      
      There is a possible race in md_probe.  If two threads call md_probe
      for the same device, then one could exit (having checked that
      ->gendisk exists) before the other has called kobject_init_and_add,
      thus returning an incomplete kobj which will cause problems when
      we try to add children to it.
      
      So extend the range of protection of disks_mutex slightly to
      avoid this possibility.
      Signed-off-by: default avatarNeil Brown <neilb@suse.de>
      CC: Oliver Pinter <oliver.pntr@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a23a984f
    • Cyrill Gorcunov's avatar
      x86: io delay - add checking for NULL early param · 97a9945a
      Cyrill Gorcunov authored
      [ Upstream commit d6cd7eff ]
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
      Cc: akpm@linux-foundation.org
      Cc: andi@firstfloor.org
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      CC: Oliver Pinter <oliver.pntr@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      97a9945a
    • Cyrill Gorcunov's avatar
      x86: idle process - add checking for NULL early param · 7cdece17
      Cyrill Gorcunov authored
      [ Upstream commit ab6bc3e3 ]
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
      Cc: akpm@linux-foundation.org
      Cc: andi@firstfloor.org
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      CC: Oliver Pinter <oliver.pntr@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7cdece17
    • FUJITA Tomonori's avatar
      SCSI: bsg: fix bsg_mutex hang with device removal · c4ec1c36
      FUJITA Tomonori authored
      commit 3f27e3ed upstream
      
      [SCSI] bsg: fix bsg_mutex hang with device removal
      
      We don't need to hold bsg_mutex during bsg_complete_all_commands(). It
      leads to a problem that we block bsg_unregister_queue during
      bsg_complete_all_commands (untill all the outstanding commands
      complete).
      
      Thanks to Pete Wyckoff for finding the bug and testing the patch.
      
      The detailed bug report is:
      
      http://marc.info/?l=linux-scsi&m=121182137132145&w=2Tested-by: default avatarPete Wyckoff <pw@osc.edu>
      Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
      CC: Oliver Pinter <oliver.pntr@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c4ec1c36
    • Herbert Xu's avatar
      netfilter: nf_nat_sip: c= is optional for session · 16ace687
      Herbert Xu authored
      netfilter: nf_nat_sip: c= is optional for session
      
      Upstream commit c71529e4:
      
      According to RFC2327, the connection information is optional
      in the session description since it can be specified in the
      media description instead.
      
      My provider does exactly that and does not provide any connection
      information in the session description.  As a result the new
      kernel drops all invite responses.
      
      This patch makes it optional as documented.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      16ace687
    • Linus Torvalds's avatar
      romfs_readpage: don't report errors for pages beyond i_size · edc6e0f9
      Linus Torvalds authored
      commit 0056e65f upstream
      
      We zero-fill them like we are supposed to, and that's all fine.  It's
      only an error if the 'romfs_copyfrom()' routine isn't able to fill the
      data that is supposed to be there.
      
      Most of the patch is really just re-organizing the code a bit, and using
      separate variables for the error value and for how much of the page we
      actually filled from the filesystem.
      Reported-and-tested-by: default avatarChris Fester <cfester@wms.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Matt Waddel <matt.waddel@freescale.com>
      Cc: Greg Ungerer <gerg@snapgear.com>
      Signed-of-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      edc6e0f9
    • Greg Kroah-Hartman's avatar
      ftrace: remove unneeded documentation · bfbd4e66
      Greg Kroah-Hartman authored
      There is no ftrace in the 2.6.26 kernel release, so remove the
      documentation as it isn't needed.
      
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bfbd4e66
  2. 01 Aug, 2008 31 commits