1. 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
  2. 19 12月, 2008 1 次提交
  3. 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
  4. 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
  5. 25 10月, 2008 1 次提交
  6. 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
  7. 06 9月, 2008 1 次提交
  8. 12 3月, 2008 1 次提交
  9. 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
  10. 15 10月, 2007 1 次提交
  11. 17 6月, 2007 1 次提交
  12. 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
  13. 20 2月, 2007 2 次提交
  14. 17 2月, 2007 1 次提交
  15. 09 2月, 2007 1 次提交
  16. 06 1月, 2007 1 次提交
  17. 20 12月, 2006 1 次提交
    • Y
      ACPI: video: Add dev argument for backlight_device_register · 519ab5f2
      Yu Luming 提交于
      This patch set adds generic abstract layer support for acpi video driver to
      have generic user interface to control backlight and output switch control by
      leveraging the existing backlight sysfs class driver, and by adding a new
      video output sysfs class driver.
      
      This patch:
      
      Add dev argument for backlight_device_register to link the class device to
      real device object.  The platform specific driver should find a way to get the
      real device object for their video device.
      
      [akpm@osdl.org: build fix]
      [akpm@osdl.org: fix msi-laptop.c]
      Signed-off-by: NLuming Yu <Luming.yu@intel.com>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      519ab5f2
  18. 21 10月, 2006 1 次提交
  19. 05 8月, 2005 1 次提交
  20. 12 7月, 2005 2 次提交
  21. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4