1. 22 3月, 2012 2 次提交
  2. 21 3月, 2012 1 次提交
  3. 06 12月, 2011 1 次提交
  4. 24 10月, 2011 6 次提交
  5. 28 5月, 2011 1 次提交
  6. 23 3月, 2011 1 次提交
  7. 25 11月, 2010 1 次提交
  8. 16 11月, 2010 1 次提交
  9. 21 10月, 2010 1 次提交
  10. 03 8月, 2010 4 次提交
  11. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  12. 17 3月, 2010 1 次提交
  13. 09 3月, 2010 1 次提交
  14. 01 3月, 2010 1 次提交
  15. 26 2月, 2010 1 次提交
  16. 24 12月, 2009 1 次提交
  17. 29 8月, 2009 1 次提交
  18. 04 6月, 2009 1 次提交
    • J
      rfkill: rewrite · 19d337df
      Johannes Berg 提交于
      This patch completely rewrites the rfkill core to address
      the following deficiencies:
      
       * all rfkill drivers need to implement polling where necessary
         rather than having one central implementation
      
       * updating the rfkill state cannot be done from arbitrary
         contexts, forcing drivers to use schedule_work and requiring
         lots of code
      
       * rfkill drivers need to keep track of soft/hard blocked
         internally -- the core should do this
      
       * the rfkill API has many unexpected quirks, for example being
         asymmetric wrt. alloc/free and register/unregister
      
       * rfkill can call back into a driver from within a function the
         driver called -- this is prone to deadlocks and generally
         should be avoided
      
       * rfkill-input pointlessly is a separate module
      
       * drivers need to #ifdef rfkill functions (unless they want to
         depend on or select RFKILL) -- rfkill should provide inlines
         that do nothing if it isn't compiled in
      
       * the rfkill structure is not opaque -- drivers need to initialise
         it correctly (lots of sanity checking code required) -- instead
         force drivers to pass the right variables to rfkill_alloc()
      
       * the documentation is hard to read because it always assumes the
         reader is completely clueless and contains way TOO MANY CAPS
      
       * the rfkill code needlessly uses a lot of locks and atomic
         operations in locked sections
      
       * fix LED trigger to actually change the LED when the radio state
         changes -- this wasn't done before
      Tested-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [thinkpad]
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      19d337df
  19. 23 4月, 2009 1 次提交
  20. 31 3月, 2009 1 次提交
    • A
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan 提交于
      Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
      as correctly noted at bug #12454. Someone can lookup entry with NULL
      ->owner, thus not pinning enything, and release it later resulting
      in module refcount underflow.
      
      We can keep ->owner and supply it at registration time like ->proc_fops
      and ->data.
      
      But this leaves ->owner as easy-manipulative field (just one C assignment)
      and somebody will forget to unpin previous/pin current module when
      switching ->owner. ->proc_fops is declared as "const" which should give
      some thoughts.
      
      ->read_proc/->write_proc were just fixed to not require ->owner for
      protection.
      
      rmmod'ed directories will be empty and return "." and ".." -- no harm.
      And directories with tricky enough readdir and lookup shouldn't be modular.
      We definitely don't want such modular code.
      
      Removing ->owner will also make PDE smaller.
      
      So, let's nuke it.
      
      Kudos to Jeff Layton for reminding about this, let's say, oversight.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12454Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
  21. 19 12月, 2008 1 次提交
  22. 16 12月, 2008 1 次提交
    • F
      ACPI toshiba: only register rfkill if bt is enabled · 38aefbc5
      Frederik Deweerdt 提交于
      Part of the rfkill initialization was done whenever BT was on or not.  The
      following patch checks for BT presence before registering the rfkill to
      the input layer.  Some minor cleanups (> 80 char lines) were also added in
      the process.
      
      On Tue, Oct 28, 2008 at 10:10:37PM +0300, Andrey Borzenkov wrote:
      [...]
      > [   66.633036] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.19
      > [   66.633054] toshiba_acpi:     HCI method: \_SB_.VALD.GHCI
      > [   66.637764] input: Toshiba RFKill Switch as /devices/virtual/input/input3
      [...]
      > [  113.920753] ------------[ cut here ]------------
      > [  113.920828] kernel BUG at /home/bor/src/linux-git/net/rfkill/rfkill.c:347!
      > [  113.920845] invalid opcode: 0000 [#1]
      > [  113.920877] last sysfs file: /sys/devices/pci0000:00/0000:00:04.0/host0/target0:0:0/0:0:0:0/block/sda/size
      > [  113.920900] Dumping ftrace buffer:
      > [  113.920919]    (ftrace buffer empty)
      > [  113.920933] Modules linked in: af_packet irnet ppp_generic slhc ircomm_tty ircomm binfmt_misc loop dm_mirror dm_region_hash dm_log dm_round_robin dm_multipath dm_mod alim15x3 ide_core nvram toshiba cryptomgr aead crypto_blkcipher michael_mic crypto_algapi orinoco_cs orinoco hermes_dld hermes pcmcia firmware_class snd_ali5451 snd_ac97_codec ac97_bus snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device smsc_ircc2 snd_pcm_oss snd_pcm rtc_cmos irda snd_timer snd_mixer_oss rtc_core snd crc_ccitt yenta_socket rtc_lib rsrc_nonstatic i2c_ali1535 pcmcia_core pcspkr psmouse soundcore i2c_core evdev sr_mod snd_page_alloc alim1535_wdt cdrom fan sg video output toshiba_acpi rfkill thermal backlight ali_agp processor ac button input_polldev battery agpgart ohci_hcd usbcore reiserfs pata_ali libata sd_mod scsi_mod [last unloaded: scsi_wait_scan]
      > [  113.921765]
      > [  113.921785] Pid: 3272, comm: ipolldevd Not tainted (2.6.28-rc2-1avb #3) PORTEGE 4000
      > [  113.921801] EIP: 0060:[<dfaa4683>] EFLAGS: 00010246 CPU: 0
      > [  113.921854] EIP is at rfkill_force_state+0x53/0x90 [rfkill]
      > [  113.921870] EAX: 00000000 EBX: 00000000 ECX: 00000003 EDX: 00000000
      > [  113.921885] ESI: 00000000 EDI: ddd50300 EBP: d8d7af40 ESP: d8d7af24
      > [  113.921900]  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
      > [  113.921918] Process ipolldevd (pid: 3272, ti=d8d7a000 task=d8d93c90 task.ti=d8d7a000)
      > [  113.921933] Stack:
      > [  113.921945]  d8d7af38 00000246 dfb029d8 dfb029c0 dfb029d8 dfb029c0 ddd50300 d8d7af5c
      > [  113.922014]  dfb018e2 01000246 01000000 ddd50300 ddd50314 ddabb8a0 d8d7af68 dfb381c1
      > [  113.922098]  00000000 d8d7afa4 c012ec0a 00000000 00000002 00000000 c012eba8 ddabb8c0
      > [  113.922240] Call Trace:
      > [  113.922240]  [<dfb018e2>] ? bt_poll_rfkill+0x5c/0x82 [toshiba_acpi]
      > [  113.922240]  [<dfb381c1>] ? input_polled_device_work+0x11/0x40 [input_polldev]
      > [  113.922240]  [<c012ec0a>] ? run_workqueue+0xea/0x1f0
      > [  113.922240]  [<c012eba8>] ? run_workqueue+0x88/0x1f0
      > [  113.922240]  [<dfb381b0>] ? input_polled_device_work+0x0/0x40 [input_polldev]
      > [  113.922240]  [<c012f047>] ? worker_thread+0x87/0xf0
      > [  113.922240]  [<c0132b00>] ? autoremove_wake_function+0x0/0x50
      > [  113.922240]  [<c012efc0>] ? worker_thread+0x0/0xf0
      > [  113.922240]  [<c013280f>] ? kthread+0x3f/0x80
      > [  113.922240]  [<c01327d0>] ? kthread+0x0/0x80
      > [  113.922240]  [<c01040d7>] ? kernel_thread_helper+0x7/0x10
      > [  113.922240] Code: 43 54 89 73 54 39 c6 74 11 89 d9 ba 01 00 00 00 b8 40 68 aa df e8 3e 35 69 e0 89 f8 e8 77 fd 85 e0 31 c0 83 c4 10 5b 5e 5f 5d c3 <0f> 0b eb fe 89 f6 8d bc 27 00 00 00 00 be f4 4d aa df bb 5f 01
      > [  113.922240] EIP: [<dfaa4683>] rfkill_force_state+0x53/0x90 [rfkill] SS:ESP 0068:d8d7af24
      > [  113.924700] ---[ end trace 0e404eb40cadd5f0 ]---
      Signed-off-by: NFrederik Deweerdt <frederik.deweerdt@gmail.com>
      Tested-by: NAndrey Borzenkov <arvidjaar@mail.ru>
      Acked-by: NLen Brown <len.brown@intel.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Acked-by: NPhilip Langdale <philipl@overt.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      38aefbc5
  23. 29 11月, 2008 1 次提交
    • A
      toshiba_acpi: close race in toshiba_acpi driver · 23d0a65c
      Arjan van de Ven 提交于
      the toshiba ACPI driver will, in a failure case, free the rfkill state
      before stopping the polling timer that would use this state. More interesting,
      in the same failure case handling, it calls the exit function, which also
      frees the rfkill state, but after stopping the polling.
      
      If the race happens, a NULL pointer is passed to rfkill_force_state()
      which then causes a nice dereference.
      
      Fix the race by just not doing the too-early freeing of the rfkill state.
      
      This appears to be the cause of a hot issue on kerneloops.org; while I
      have no solid evidence of that this patch will fix the issue, the race
      appears rather real.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      23d0a65c
  24. 25 10月, 2008 1 次提交
  25. 11 10月, 2008 1 次提交
    • H
      ACPI: toshiba_acpi.c fix sparse signedness mismatch warnings · 9e113e00
      Harvey Harrison 提交于
      set_bit expects unsigned int, and we start with a u32 anyway.
      drivers/acpi/toshiba_acpi.c:397:14: warning: incorrect type in argument 1 (different signedness)
      drivers/acpi/toshiba_acpi.c:397:14:    expected unsigned int [usertype] *word
      drivers/acpi/toshiba_acpi.c:397:14:    got int *<noident>
      drivers/acpi/toshiba_acpi.c:399:14: warning: incorrect type in argument 1 (different signedness)
      drivers/acpi/toshiba_acpi.c:399:14:    expected unsigned int [usertype] *word
      drivers/acpi/toshiba_acpi.c:399:14:    got int *<noident>
      drivers/acpi/toshiba_acpi.c:401:14: warning: incorrect type in argument 1 (different signedness)
      drivers/acpi/toshiba_acpi.c:401:14:    expected unsigned int [usertype] *word
      drivers/acpi/toshiba_acpi.c:401:14:    got int *<noident>
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      9e113e00
  26. 06 9月, 2008 1 次提交
  27. 12 3月, 2008 1 次提交
  28. 15 11月, 2007 1 次提交
    • A
      Fix Oops in toshiba_acpi error return path · 1299342b
      Andrey Borzenkov 提交于
      When backlight_device_register() fails, return after undo initialization, do
      not try to use pointer that just was reset to NULL
      
      This fixes this oops:
      
      [ 1595.177672]  [<c010480a>] show_trace_log_lvl+0x1a/0x30
      [ 1595.177706]  [<c01052a2>] show_trace+0x12/0x20
      [ 1595.177718]  [<c0105305>] dump_stack+0x15/0x20
      [ 1595.177728]  [<c01c9375>] kobject_shadow_add+0x125/0x1c0
      [ 1595.177754]  [<c01c941a>] kobject_add+0xa/0x10
      [ 1595.177764]  [<c0239a37>] device_add+0x97/0x5d0
      [ 1595.177776]  [<c0239f82>] device_register+0x12/0x20
      [ 1595.177786]  [<dfd912df>] backlight_device_register+0x9f/0x110 [backlight]
      [ 1595.177814]  [<df861117>] toshiba_acpi_init+0x117/0x15e [toshiba_acpi]
      [ 1595.177834]  [<c013e28d>] sys_init_module+0xfd/0x14e0
      [ 1595.177871]  [<c0104112>] sysenter_past_esp+0x5f/0x99
      [ 1595.177883]  =======================
      [ 1595.177890] Could not register toshiba backlight device
      [ 1595.177985] BUG: unable to handle kernel NULL pointer dereference at virtual address 00000004
      ...
      [ 1595.394097] EIP:    0060:[<df861143>]    Not tainted VLI
      [ 1595.394101] EFLAGS: 00010282   (2.6.23-rc9-1avb #24)
      [ 1595.480081] EIP is at toshiba_acpi_init+0x143/0x15e [toshiba_acpi]
      Signed-off-by: NAndrey Borzenkov <arvidjaar@mail.ru>
      Cc: John Belmonte <toshiba_acpi@memebeam.org>
      Acked-by: NRichard Purdie <rpurdie@rpsys.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1299342b
  29. 15 10月, 2007 1 次提交
  30. 17 6月, 2007 1 次提交
  31. 01 6月, 2007 1 次提交
    • S
      acpi: fix section mismatch warning in asus + toshiba · b2b77b23
      Sam Ravnborg 提交于
      Fix following section mismatch warnings in acpi
      
      WARNING: drivers/acpi/asus_acpi.o(.init.text+0xb7): Section mismatch: reference to .exit.text: (after 'init_module')
      WARNING: o-i386/drivers/acpi/toshiba_acpi.o(.init.text+0x13a): Section mismatch: reference to .exit.text: (after 'init_module')
      
      The exit function is used in the init function during an error codition.
      As __exit may be discarded during link-time / run-time this is no good.
      Do not mark the exit function __exit.
      
      Note: This warning is only seen by my local copy of modpost
            but the change will soon hit upstream.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Len Brown <lenb@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b2b77b23