1. 23 10月, 2010 2 次提交
  2. 21 10月, 2010 1 次提交
  3. 23 9月, 2010 2 次提交
    • Y
      ipmi: fix hardcoded ipmi device exit path warning · 561f8182
      Yinghai Lu 提交于
      When modprobe.conf has
      options ipmi_si type="kcs" ports=0xCA2 regspacings="4"
      
      ipmi_si can be loaded properly, but when try to unload it get:
      
      Sep 20 15:00:27 xx abrt: Kerneloops: Reported 1 kernel oopses to Abrt
      Sep 20 15:00:27 xx abrtd: Directory 'kerneloops-1285020027-1' creation detected
      Sep 20 15:00:27 xx abrtd: New crash /var/spool/abrt/kerneloops-1285020027-1, processing
      Sep 20 15:01:09 xx kernel: ------------[ cut here ]------------
      Sep 20 15:01:09 xx kernel: WARNING: at drivers/base/driver.c:262 driver_unregister+0x8a/0xa0()
      Sep 20 15:01:09 xx kernel: Hardware name: Sun Fire x4800
      Sep 20 15:01:09 xx kernel: Unexpected driver unregister!
      Sep 20 15:01:09 xx kernel: Modules linked in: ipmi_si(-) ipmi_msghandler ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat bridge stp llc autofs4 sunrpc cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb3i iw_cxgb3 cxgb3 mdio ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr ipv6 iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi dm_mirror dm_region_hash dm_log dm_mod vhost_net macvtap macvlan tun kvm_intel kvm uinput sg ses enclosure ahci libahci pcspkr i2c_i801 i2c_core iTCO_wdt iTCO_vendor_support igb dca i7core_edac edac_core ext3 jbd mbcache sd_mod crc_t10dif megaraid_sas [last unloaded: ipmi_devintf]
      Sep 20 15:01:09 xx kernel: Pid: 10625, comm: modprobe Tainted: G        W   2.6.36-rc5-tip+ #6
      Sep 20 15:01:09 xx kernel: Call Trace:
      Sep 20 15:01:09 xx kernel: [<ffffffff810600df>] warn_slowpath_common+0x7f/0xc0
      Sep 20 15:01:09 xx kernel: [<ffffffff810601d6>] warn_slowpath_fmt+0x46/0x50
      Sep 20 15:01:09 xx kernel: [<ffffffff812ff60a>] driver_unregister+0x8a/0xa0
      Sep 20 15:01:09 xx kernel: [<ffffffff812ae112>] pnp_unregister_driver+0x12/0x20
      Sep 20 15:01:09 xx kernel: [<ffffffffa01d0327>] cleanup_ipmi_si+0x3c/0xa7 [ipmi_si]
      Sep 20 15:01:09 xx kernel: [<ffffffff81099a60>] sys_delete_module+0x1a0/0x270
      Sep 20 15:01:09 xx kernel: [<ffffffff814b7070>] ? do_page_fault+0x150/0x320
      Sep 20 15:01:09 xx kernel: [<ffffffff8100b072>] system_call_fastpath+0x16/0x1b
      Sep 20 15:01:09 xx kernel: ---[ end trace 0d1967161adcee0d ]---
      
      We need to check if ipmi_pnp_driver is loaded before we try to unload it.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Corey Minyard <minyard@acm.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      561f8182
    • Y
      ipmi: fix acpi probe print · a9e31765
      Yinghai Lu 提交于
      After d9e1b6c4 ("ipmi: fix ACPI detection with regspacing") we get
      
      [   11.026326] ipmi_si: probing via ACPI
      [   11.030019] ipmi_si 00:09: (null) regsize 1 spacing 1 irq 0
      [   11.035594] ipmi_si: Adding ACPI-specified kcs state machine
      
      on an old system with only one range for ipmi kcs range.
      
      Try to fix it by adding another res pointer.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a9e31765
  4. 22 9月, 2010 1 次提交
  5. 21 9月, 2010 2 次提交
  6. 17 9月, 2010 1 次提交
  7. 07 9月, 2010 5 次提交
  8. 04 9月, 2010 2 次提交
    • N
      tty: fix tty_line must not be equal to number of allocated tty pointers in tty driver · 6eb68d6f
      Nathael Pajani 提交于
      I found a bug "by chance" in drivers/char/tty_io.c
      
      I mean "by chance" because I was just reading the code of the
      tty_find_polling_driver() to make a new tty_find_by_name() function.
      
      In tty_find_polling_driver() the driver actually test "tty_line <=
      p->num" while num refers to the number of struct tty_struct pointers
      allocated for the p->ttys (p is a tty_driver), and tty_line is scanned
      in a tty name, which can be for example ttyS2. Then tty_line equals 2.
      And if p->num is 2, we have only p->ttys[0] and p->ttys[1], but no
      p->ttys[2].
      
      This is actually unharmful, for tty_find_polling_driver() is used only
      in drivers/serial/kgdboc.c, and there's a test over there to find a
      console with a matching index, which will never happen.
      
      This is still a bug anyway.
      Signed-off-by: NNathael Pajani <nathael.pajani@ed3l.fr>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6eb68d6f
    • F
      vt: Fix console corruption on driver hand-over. · 9fc2b2d0
      Francisco Jerez 提交于
      After 02f0777a "vc_origin" is no
      longer reset to the screen buffer before calling the con_init() hook
      of the new console driver.
      
      If the old driver wasn't using a fixed scanout buffer (e.g. the case
      of vgacon) "vc_origin" may be a pointer to a VRAM location, and its
      contents aren't guaranteed to be preserved after calling con_deinit()
      on the old driver and con_init() on the new driver, i.e. the
      subsequent console resize may fill the framebuffer with garbage.
      
      It can be reproduced in the transition from vgacon to the nouveau
      framebuffer driver: in that case the legacy VGA aperture "vc_origin"
      points to becomes unreadable after fbcon_init().
      
      This patch reverts the mentioned commit. To avoid the problem it
      intended to fix, stop using "vc_scr_end" in vc_do_resize() to
      calculate how many rows we have to copy (actually the code looks
      simpler this way without the help of "vc_scr_end").
      Signed-off-by: NFrancisco Jerez <currojerez@riseup.net>
      Cc: qiaochong <qiaochong@loongson.cn>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9fc2b2d0
  9. 29 8月, 2010 1 次提交
    • A
      Input: use PIT_TICK_RATE in vt beep ioctl · 2c4e9671
      Arnd Bergmann 提交于
      The KIOCSOUND and KDMKTONE ioctls are based on the CLOCK_TICK_RATE,
      which is architecture and sometimes configuration specific.
      
      In practice, most user applications assume that it is actually defined
      as the i8253 PIT base clock of 1193182 Hz, which is true on some
      architectures but not on others.
      
      This patch makes the vt code use the PIT frequency on all
      architectures, which is much more well-defined.  It will change the
      behavior of user applications sending the beep ioctl on all
      architectures that define CLOCK_TICK_RATE different from
      PIT_TICK_RATE.
      
      The original breakage was introduced in commit bcc8ca09 "Adapt
      drivers/char/vt_ioctl.c to non-x86".  Hopefully, reverting this change
      will make the frequency correct in more cases than it will make it
      incorrect.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      2c4e9671
  10. 24 8月, 2010 4 次提交
  11. 22 8月, 2010 2 次提交
  12. 21 8月, 2010 1 次提交
  13. 20 8月, 2010 1 次提交
  14. 18 8月, 2010 2 次提交
    • N
      tty: fix fu_list abuse · d996b62a
      Nick Piggin 提交于
      tty: fix fu_list abuse
      
      tty code abuses fu_list, which causes a bug in remount,ro handling.
      
      If a tty device node is opened on a filesystem, then the last link to the inode
      removed, the filesystem will be allowed to be remounted readonly. This is
      because fs_may_remount_ro does not find the 0 link tty inode on the file sb
      list (because the tty code incorrectly removed it to use for its own purpose).
      This can result in a filesystem with errors after it is marked "clean".
      
      Taking idea from Christoph's initial patch, allocate a tty private struct
      at file->private_data and put our required list fields in there, linking
      file and tty. This makes tty nodes behave the same way as other device nodes
      and avoid meddling with the vfs, and avoids this bug.
      
      The error handling is not trivial in the tty code, so for this bugfix, I take
      the simple approach of using __GFP_NOFAIL and don't worry about memory errors.
      This is not a problem because our allocator doesn't fail small allocs as a rule
      anyway. So proper error handling is left as an exercise for tty hackers.
      
      [ Arguably filesystem's device inode would ideally be divorced from the
      driver's pseudo inode when it is opened, but in practice it's not clear whether
      that will ever be worth implementing. ]
      
      Cc: linux-kernel@vger.kernel.org
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      d996b62a
    • N
      fs: cleanup files_lock locking · ee2ffa0d
      Nick Piggin 提交于
      fs: cleanup files_lock locking
      
      Lock tty_files with a new spinlock, tty_files_lock; provide helpers to
      manipulate the per-sb files list; unexport the files_lock spinlock.
      
      Cc: linux-kernel@vger.kernel.org
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Acked-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ee2ffa0d
  15. 17 8月, 2010 3 次提交
    • G
      of: Fix missing includes · f1ca09b2
      Grant Likely 提交于
      This patch fixes missing includes from a number of .c files because
      the code (wrongfully) depended on prom.h including them.  The include
      of linux/of_address.h was removed in microblaze prom.h in commit
      "of/address: Clean up function declarations" (sha1 id 22ae782f), but
      not fixed in some callers.  This patch fixes them up.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Tested-by: NMichal Simek <monstr@monstr.eu>
      f1ca09b2
    • J
      vt,console,kdb: preserve console_blanked while in kdb · beed5336
      Jason Wessel 提交于
      Commit b45cfba4 (vt,console,kdb:
      implement atomic console enter/leave functions) introduced the ability
      to atomically change the console mode with kernel mode setting but did
      not preserve the state of the console_blanked variable.
      
      The console_blanked variable must be restored when executing the
      con_debug_leave() or further kernel mode set changes (such as using
      chvt X) will fail to correctly set the state of console.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      CC: Andrew Morton <akpm@linux-foundation.org>
      beed5336
    • J
      vt: fix regression warnings from KMS merge · fed891c8
      Jason Wessel 提交于
      Fix the following new sparse warnings in vt.c introduced by the commit
      b45cfba4 (vt,console,kdb: implement
      atomic console enter/leave functions):
      
      drivers/char/vt.c:197:5: warning: symbol 'saved_fg_console' was not declared. Should it be static?
      drivers/char/vt.c:198:5: warning: symbol 'saved_last_console' was not declared. Should it be static?
      drivers/char/vt.c:199:5: warning: symbol 'saved_want_console' was not declared. Should it be static?
      drivers/char/vt.c:200:5: warning: symbol 'saved_vc_mode' was not declared. Should it be static?
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      CC: Andrew Morton <akpm@linux-foundation.org>
      fed891c8
  16. 12 8月, 2010 1 次提交
  17. 11 8月, 2010 9 次提交
    • S
      kfifo: fix kfifo miss use of nozami.c · 4457d984
      Stefani Seibold 提交于
      There are different types of a fifo which can not handled in C without a
      lot of overhead.  So i decided to write the API as a set of macros, which
      is the only way to do a kind of template meta programming without C++.
      This macros handles the different types of fifos in a transparent way.
      
      There are a lot of benefits:
      
      - Compile time handling of the different fifo types
      - Better performance (a save put or get of an integer does only generate
        9 assembly instructions on a x86)
      - Type save
      - Cleaner interface, the additional kfifo_..._rec() functions are gone
      - Easier to use
      - Less error prone
      - Different types of fifos: it is now possible to define a int fifo or
        any other type. See below for an example.
      - Smaller footprint for none byte type fifos
      - No need of creating a second hidden variable, like in the old DEFINE_KFIFO
      
      The API was not changed.
      
      There are now real in place fifos where the data space is a part of the
      structure.  The fifo needs now 20 byte plus the fifo space.  Dynamic
      assigned or allocated create a little bit more code.
      
      Most of the macros code will be optimized away and simple generate a
      function call.  Only the really small one generates inline code.
      
      Additionally you can now create fifos for any data type, not only the
      "unsigned char" byte streamed fifos.
      
      There is also a new kfifo_put and kfifo_get function, to handle a single
      element in a fifo.  This macros generates inline code, which is lit bit
      larger but faster.
      
      I know that this kind of macros are very sophisticated and not easy to
      maintain.  But i have all tested and it works as expected.  I analyzed the
      output of the compiler and for the x86 the code is as good as hand written
      assembler code.  For the byte stream fifo the generate code is exact the
      same as with the current kfifo implementation.  For all other types of
      fifos the code is smaller before, because the interface is easier to use.
      
      The main goal was to provide an API which is very intuitive, save and easy
      to use.  So linux will get now a powerful fifo API which provides all what
      a developer needs.  This will save in the future a lot of kernel space,
      since there is no need to write an own implementation.  Most of the device
      driver developers need a fifo, and also deep kernel development will gain
      benefit from this API.
      
      Here are the results of the text section usage:
      
      Example 1:
                              kfifo_put/_get  kfifo_in/out    current kfifo
      dynamic allocated       0x000002a8      0x00000291      0x00000299
      in place                0x00000291      0x0000026e      0x00000273
      
      kfifo.c                 new             old
      text section size       0x00000be5      0x000008b2
      
      As you can see, kfifo_put/kfifo_get creates a little bit more code than
      kfifo_in/kfifo_out, but it is much faster (the code is inline).
      
      The code is complete hand crafted and optimized.  The text section size is
      as small as possible.  You get all the fifo handling in only 3 kb.  This
      includes type safe fix size records, dynamic records and DMA handling.
      
      This should be the final version. All requested features are implemented.
      
      Note: Most features of this API doesn't have any users.  All functions
      which are not used in the next 9 months will be removed.  So, please adapt
      your drivers and other sources as soon as possible to the new API and post
      it.
      
      This are the features which are currently not used in the kernel:
      
      kfifo_to_user()
      kfifo_from_user()
      kfifo_dma_....() macros
      kfifo_esize()
      kfifo_recsize()
      kfifo_put()
      kfifo_get()
      
      The fixed size record elements, exclude "unsigned char" fifo's and the
      variable size records fifo's
      
      This patch:
      
      User of the kernel fifo should never bypass the API and directly access
      the fifo structure.  Otherwise it will be very hard to maintain the API.
      Signed-off-by: NStefani Seibold <stefani@seibold.net>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4457d984
    • J
      drivers/char/n_gsm.c: add missing spin_unlock_irqrestore · e73790a5
      Julia Lawall 提交于
      Add a spin_unlock_irqrestore missing on the error path.  Converting the
      return to break leads to the spin_unlock_irqrestore at the end of the
      function.
      
      The semantic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression E1;
      @@
      
      * spin_lock_irqsave(E1,...);
        <+... when != E1
        if (...) {
          ... when != E1
      *   return ...;
        }
        ...+>
      * spin_unlock_irqrestore(E1,...);
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e73790a5
    • Y
      ipmi: print info for spmi and smbios paths like acpi and pci · 7bb671e3
      Yinghai Lu 提交于
      Print out the reg spacing and size for spmi and smbios so BIOS developers
      can make them consistent.
      
      Also remove extra PFX on the duplicating path.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Myron Stowe <myron.stowe@hp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7bb671e3
    • Y
      ipmi: fix memleaking for add_smi when duplicating happen · 7faefea6
      Yinghai Lu 提交于
      Free the temporary info struct when we have duplicated ones.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Myron Stowe <myron.stowe@hp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7faefea6
    • J
      drivers/char/ipmi/ipmi_si_intf.c: fix warning: variable 'addr_space' set but not used · f46c77c2
      Justin P. Mattock 提交于
      Fix a warning message generated by GCC, and also updates a web address
      pointing to a pdf containing information.
      
      CC [M]  drivers/char/ipmi/ipmi_si_intf.o
      drivers/char/ipmi/ipmi_si_intf.c: In function 'try_init_spmi':
      drivers/char/ipmi/ipmi_si_intf.c:2016:8: warning: variable 'addr_space' set but not used
      Signed-off-by: NSergey V. <sftp.mtuci@gmail.com>
      Signed-off-by: NJustin P. Mattock <justinmattock@gmail.com>
      Acked-by: NCorey Minyard <minyard@acm.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f46c77c2
    • R
      param: update drivers/char/ipmi/ipmi_watchdog.c to new scheme · c8ba6c52
      Rusty Russell 提交于
      This is one of the most interesting users of module parameters in the
      tree, so weaning it off the old-style non-const module_param_call
      scheme is a useful exercise.
      
      I was confused by set_param_int/get_param_int (vs. the normal
      param_set_int and param_get_int), so I renamed set_param_int to
      set_param_timeout, and re-used param_get_int directly instead of
      get_param_int.  I also implemented param_check_wdog_ifnum and
      param_check_timeout, so now the ifnum_to_use and timeout/pretimeout
      parameters can just use plain module_param().
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: openipmi-developer@lists.sourceforge.net
      c8ba6c52
    • S
      Add param ops struct for hvc_iucv driver. · 549a8a03
      Sachin Sant 提交于
      Today's next 20091117 build failed on s390 with
      
      drivers/char/hvc_iucv.c:1331: error: 'param_ops_vmidfilter' undeclared here (not in a function)
      make[2]: *** [drivers/char/hvc_iucv.o] Error 1
      
      Most probably caused by commit 684a6d340b8a5767db4670031b0f39455346018a
      (param:param_ops) which introduced a param_ops structure.
      
      The following compile tested patch adds a param_ops structure for hvc_iucv.
      Signed-off-by: NSachin Sant <sachinp@in.ibm.com>
      Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Tested-by: NPhil Carmody <ext-phil.2.carmody@nokia.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      549a8a03
    • J
      Char: nozomi, set tty->driver_data appropriately · bf9c1fca
      Jiri Slaby 提交于
      Sorry, one more fix, this one depends on the other, so this is rather 2/2.
      --
      
      tty->driver_data is used all over the code, but never set. This
      results in oopses like:
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000130
      IP: [<ffffffff814a0040>] mutex_lock+0x10/0x40
      ...
      Pid: 2157, comm: modem-manager Not tainted 2.6.34.1-0.1-desktop #1 2768DR7/2768DR7
      RIP: 0010:[<ffffffff814a0040>]  [<ffffffff814a0040>] mutex_lock+0x10/0x40
      RSP: 0018:ffff88007b16fa50  EFLAGS: 00010286
      RAX: 0000000000000000 RBX: 0000000000000130 RCX: 0000000000000003
      RDX: 0000000000000003 RSI: 0000000000000286 RDI: 0000000000000130
      RBP: 0000000000001000 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000130
      R13: 0000000000000001 R14: 0000000000000000 R15: ffff88007b16feb4
      ...
      Call Trace:
       [<ffffffffa077690d>] ntty_write_room+0x4d/0x90 [nozomi]
      ...
      
      Set tty->driver_data to the computed port in .install to not recompute it in
      every place where needed. Switch .open to use driver_data too.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: stable <stable@kernel.org> [.34, .35]
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      bf9c1fca
    • J
      Char: nozomi, fix tty->count counting · ee78bb95
      Jiri Slaby 提交于
      Currently ntty_install omits to increment tty count and we get the
      following warnings:
      Warning: dev (noz2) tty->count(0) != #fd's(1) in tty_open
      
      So to fix that, add one tty->count++ there.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: stable <stable@kernel.org> [.34, .35]
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ee78bb95