1. 03 8月, 2009 2 次提交
  2. 30 7月, 2009 2 次提交
    • H
      sysrq, kdump: make sysrq-c consistent · cab8bd34
      Hidetoshi Seto 提交于
      commit d6580a9f ("kexec: sysrq: simplify
      sysrq-c handler") changed the behavior of sysrq-c to unconditional
      dereference of NULL pointer.  So in cases with CONFIG_KEXEC, where
      crash_kexec() was directly called from sysrq-c before, now it can be said
      that a step of "real oops" was inserted before starting kdump.
      
      However, in contrast to oops via SysRq-c from keyboard which results in
      panic due to in_interrupt(), oops via "echo c > /proc/sysrq-trigger" will
      not become panic unless panic_on_oops=1.  It means that even if dump is
      properly configured to be taken on panic, the sysrq-c from proc interface
      might not start crashdump while the sysrq-c from keyboard can start
      crashdump.  This confuses traditional users of kdump, i.e.  people who
      expect sysrq-c to do common behavior in both of the keyboard and proc
      interface.
      
      This patch brings the keyboard and proc interface behavior of sysrq-c in
      line, by forcing panic_on_oops=1 before oops in sysrq-c handler.
      
      And some updates in documentation are included, to clarify that there is
      no longer dependency with CONFIG_KEXEC, and that now the system can just
      crash by sysrq-c if no dump mechanism is configured.
      Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Cc: Brayan Arraes <brayan@yack.com.br>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cab8bd34
    • O
      pty: avoid forcing 'low_latency' tty flag · e043e42b
      OGAWA Hirofumi 提交于
      We really don't want to mark the pty as a low-latency device, because as
      Alan points out, the ->write method can be called from an IRQ (ppp?),
      and that means we can't use ->low_latency=1 as we take mutexes in the
      low_latency case.
      
      So rather than using low_latency to force the written data to be pushed
      to the ldisc handling at 'write()' time, just make the reader side (or
      the poll function) do the flush when it checks whether there is data to
      be had.
      
      This also fixes the problem with lost data in an emacs compile buffer
      (bugzilla 13815), and we can thus revert the low_latency pty hack
      (commit 3a542974: "pty: quickfix for the
      pty ENXIO timing problems").
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Tested-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      [ Modified to do the tty_flush_to_ldisc() inside input_available_p() so
        that it triggers for both read and poll()  - Linus]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e043e42b
  3. 29 7月, 2009 1 次提交
  4. 28 7月, 2009 1 次提交
  5. 21 7月, 2009 3 次提交
  6. 17 7月, 2009 5 次提交
  7. 13 7月, 2009 1 次提交
  8. 09 7月, 2009 2 次提交
  9. 03 7月, 2009 2 次提交
  10. 30 6月, 2009 1 次提交
    • A
      tty: Fix the leak in tty_ldisc_release · aef29bc2
      Alan Cox 提交于
      Currently we reinit the ldisc on final tty close which is what the old code
      did to ensure that if the device retained its termios settings then it had the
      right ldisc. tty_ldisc_reinit does that but also leaves us with the reset
      ldisc reference which is then leaked.
      
      At this point we know the port will be recycled so we can kill the ldisc
      off completely rather than try and add another ldisc free up when the kref
      count hits zero.
      
      At this point it is safe to keep the ldisc closed as tty_ldisc waiting
      methods are only used from the user side, and as the final close we are
      the last such reference. Interrupt/driver side methods will always use the
      non wait version and get back a NULL.
      
      Found with kmemleak and investigated/identified by Catalin Marinas.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      aef29bc2
  11. 26 6月, 2009 2 次提交
    • S
      powerpc/BSR: Fix BSR to allow mmap of small BSR on 64k kernel · 04a85d12
      Sonny Rao 提交于
      On Mon, Nov 17, 2008 at 01:26:13AM -0600, Sonny Rao wrote:
      > On Fri, Nov 07, 2008 at 04:28:29PM +1100, Paul Mackerras wrote:
      > > Sonny Rao writes:
      > >
      > > > Fix the BSR driver to allow small BSR devices, which are limited to a
      > > > single 4k space, on a 64k page kernel.  Previously the driver would
      > > > reject the mmap since the size was smaller than PAGESIZE (or because
      > > > the size was greater than the size of the device).  Now, we check for
      > > > this case use remap_4k_pfn(). Also, take out code to set vm_flags,
      > > > as the remap_pfn functions will do this for us.
      > >
      > > Thanks.
      > >
      > > Do we know that the BSR size will always be 4k if it's not a multiple
      > > of 64k?  Is it possible that we could get 8k, 16k or 32k or BSRs?
      > > If it is possible, what does the user need to be able to do?  Do they
      > > just want to map 4k, or might then want to map the whole thing?
      >
      >
      > Hi Paul, I took a look at changing the driver to reject a request for
      > mapping more than a single 4k page, however the only indication we get
      > of the requested size in the mmap function is the vma size, and this
      > is always one page at minimum.  So, it's not possible to determine if
      > the user wants one 4k page or more.  As I noted in my first response,
      > there is only one case where this is even possible and I don't think
      > it is a significant concern.
      >
      > I did notice that I left out the check to see if the user is trying to
      > map more than the device length, so I fixed that.  Here's the revised
      > patch.
      
      Alright, I've reworked this now so that if we get one of these cases
      where there's a bsr that's > 4k and < 64k on a 64k kernel we'll only
      advertise that it is a 4k BSR to userspace.  I think this is the best
      solution since user programs are only supposed to look at sysfs to
      determine how much can be mapped, and libbsr does this as well.
      
      Please consider for 2.6.31 as a fix, thanks.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      04a85d12
    • S
      powerpc/BSR: add 4096 byte BSR size · e4031d52
      Sonny Rao 提交于
      Add a 4096 byte BSR size which will be used on new machines.  Also, remove
      the warning when we run into an unknown size, as this can spam the kernel
      log excessively.
      Signed-off-by: NSonny Rao <sonnyrao@us.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e4031d52
  12. 25 6月, 2009 3 次提交
  13. 23 6月, 2009 6 次提交
  14. 20 6月, 2009 4 次提交
  15. 19 6月, 2009 5 次提交