Skip to content
  1. Sep 29, 2009
    • Reinette Chatre's avatar
      iwlwifi: fix debugfs buffer handling · 2fac9717
      Reinette Chatre authored
      We keep track of where to write into a buffer by keeping a count of how
      much has been written so far. When writing to the buffer we thus take the
      buffer pointer and adding the count of what has been written so far.
      Keeping track of what has been written so far is done by incrementing
      this number every time something is written to the buffer with how much has
      been written at that time.
      
      Currently this number is incremented incorrectly when using the
      "hex_dump_to_buffer" call to add data to the buffer. Fix this by only
      adding what has been added to the buffer in that call instead of what has
      been added since beginning of buffer.
      
      Issue was discovered and discussed during testing of
      https://bugzilla.redhat.com/show_bug.cgi?id=464598
      
       .
      
      When a user views any of these files they will see something like:
      
      [  179.355202] ------------[ cut here ]------------
      [  179.355209] WARNING: at ../lib/vsprintf.c:989 vsnprintf+0x5ec/0x5f0()
      [  179.355212] Hardware name: VGN-Z540N
      [  179.355213] Modules linked in: i915 drm i2c_algo_bit i2c_core ipv6 acpi_cpufreq cpufreq_userspace cpufreq_powersave cpufreq_ondemand cpufreq_conservative cpufreq_stats freq_table container sbs sbshc arc4 ecb iwlagn iwlcore joydev led_class mac80211 af_packet pcmcia psmouse sony_laptop cfg80211 iTCO_wdt iTCO_vendor_support pcspkr serio_raw rfkill intel_agp video output tpm_infineon tpm tpm_bios button battery yenta_socket rsrc_nonstatic pcmcia_core processor ac evdev ext3 jbd mbcache sr_mod sg cdrom sd_mod ahci libata scsi_mod ehci_hcd uhci_hcd usbcore thermal fan thermal_sys
      [  179.355262] Pid: 5449, comm: cat Not tainted 2.6.31-wl-54419-ge881071 #62
      [  179.355264] Call Trace:
      [  179.355267]  [<ffffffff811ad14c>] ? vsnprintf+0x5ec/0x5f0
      [  179.355271]  [<ffffffff81041348>] warn_slowpath_common+0x78/0xd0
      [  179.355275]  [<ffffffff810413af>] warn_slowpath_null+0xf/0x20
      [  179.355277]  [<ffffffff811ad14c>] vsnprintf+0x5ec/0x5f0
      [  179.355280]  [<ffffffff811ad23d>] ? scnprintf+0x5d/0x80
      [  179.355283]  [<ffffffff811ad23d>] scnprintf+0x5d/0x80
      [  179.355286]  [<ffffffff811aed29>] ? hex_dump_to_buffer+0x189/0x340
      [  179.355290]  [<ffffffff810e91d7>] ? __kmalloc+0x207/0x260
      [  179.355303]  [<ffffffffa02a02f8>] iwl_dbgfs_nvm_read+0xe8/0x220 [iwlcore]
      [  179.355306]  [<ffffffff811a9b62>] ? __up_read+0x92/0xb0
      [  179.355310]  [<ffffffff810f0988>] vfs_read+0xc8/0x1a0
      [  179.355313]  [<ffffffff810f0b50>] sys_read+0x50/0x90
      [  179.355316]  [<ffffffff8100bd6b>] system_call_fastpath+0x16/0x1b
      [  179.355319] ---[ end trace 2383d0d5e0752ca0 ]---
      
      Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      2fac9717
    • Johannes Berg's avatar
      cfg80211: don't set privacy w/o key · 4be3bd8c
      Johannes Berg authored
      
      
      When wpa_supplicant is used to connect to open networks,
      it causes the wdev->wext.keys to point to key memory, but
      that key memory is all empty. Only use privacy when there
      is a default key to be used.
      
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Tested-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Tested-by: default avatarKalle Valo <kalle.valo@iki.fi>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      4be3bd8c
    • Johannes Berg's avatar
      cfg80211: wext: don't display BSSID unless associated · 33de4f9d
      Johannes Berg authored
      
      
      Currently, cfg80211's SIOCGIWAP implementation returns
      the BSSID that the user set, even if the connection has
      since been dropped due to other changes. It only should
      return the current BSSID when actually connected.
      
      Also do a small code cleanup.
      
      Reported-by: default avatarThomas H. Guenther <thomas.h.guenther@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Tested-by: default avatarThomas H. Guenther <thomas.h.guenther@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      33de4f9d
  2. Sep 27, 2009
  3. Sep 26, 2009
  4. Sep 25, 2009
    • Johannes Berg's avatar
      genetlink: fix netns vs. netlink table locking (2) · b8273570
      Johannes Berg authored
      Similar to commit d136f1bd
      
      ,
      there's a bug when unregistering a generic netlink family,
      which is caught by the might_sleep() added in that commit:
      
          BUG: sleeping function called from invalid context at net/netlink/af_netlink.c:183
          in_atomic(): 1, irqs_disabled(): 0, pid: 1510, name: rmmod
          2 locks held by rmmod/1510:
           #0:  (genl_mutex){+.+.+.}, at: [<ffffffff8138283b>] genl_unregister_family+0x2b/0x130
           #1:  (rcu_read_lock){.+.+..}, at: [<ffffffff8138270c>] __genl_unregister_mc_group+0x1c/0x120
          Pid: 1510, comm: rmmod Not tainted 2.6.31-wl #444
          Call Trace:
           [<ffffffff81044ff9>] __might_sleep+0x119/0x150
           [<ffffffff81380501>] netlink_table_grab+0x21/0x100
           [<ffffffff813813a3>] netlink_clear_multicast_users+0x23/0x60
           [<ffffffff81382761>] __genl_unregister_mc_group+0x71/0x120
           [<ffffffff81382866>] genl_unregister_family+0x56/0x130
           [<ffffffffa0007d85>] nl80211_exit+0x15/0x20 [cfg80211]
           [<ffffffffa000005a>] cfg80211_exit+0x1a/0x40 [cfg80211]
      
      Fix in the same way by grabbing the netlink table lock
      before doing rcu_read_lock().
      
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8273570
    • Anton Vorontsov's avatar
      3c59x: Get rid of "Trying to free already-free IRQ" · 704cc92e
      Anton Vorontsov authored
      Following trace pops up if we try to suspend with 3c59x ethernet NIC
      brought down:
      
        root@b1:~# ifconfig eth16 down
        root@b1:~# echo mem > /sys/power/state
        ...
        3c59x 0000:00:10.0: suspend
        3c59x 0000:00:10.0: PME# disabled
        Trying to free already-free IRQ 48
        ------------[ cut here ]------------
        Badness at c00554e4 [verbose debug info unavailable]
        NIP: c00554e4 LR: c00554e4 CTR: c019a098
        REGS: c7975c60 TRAP: 0700   Not tainted  (2.6.31-rc4)
        MSR: 00021032 <ME,CE,IR,DR>  CR: 28242422  XER: 20000000
        TASK = c79cb0c0[1746] 'bash' THREAD: c7974000
        ...
        NIP [c00554e4] __free_irq+0x108/0x1b0
        LR [c00554e4] __free_irq+0x108/0x1b0
        Call Trace:
        [c7975d10] [c00554e4] __free_irq+0x108/0x1b0 (unreliable)
        [c7975d30] [c005559c] free_irq+0x10/0x24
        [c7975d40] [c01e21ec] vortex_suspend+0x70/0xc4
        [c7975d60] [c017e584] pci_legacy_suspend+0x58/0x100
      
      This is because the driver manages interrupts without checking for
      netif_running().
      
      Though, there are few other issues with suspend/resume in this driver.
      The intention of calling free_irq() in suspend() was to avoid any
      possible spurious interrupts (see commit 5b039e68
      
      
      "3c59x PM fixes"). But,
      
      - On resume, the driver was requesting IRQ just after pci_set_master(),
        but before vortex_up() (which actually resets 3c59x chips).
      
      - Issuing free_irq() on a shared IRQ doesn't guarantee that a buggy
        HW won't trigger spurious interrupts in another driver that
        requested the same interrupt. So, if we want to protect from
        unexpected interrupts, then on suspend we should issue disable_irq(),
        not free_irq().
      
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      704cc92e
    • Eric Dumazet's avatar
      tunnel: eliminate recursion field · a43912ab
      Eric Dumazet authored
      
      
      It seems recursion field from "struct ip_tunnel" is not anymore needed.
      recursion prevention is done at the upper level (in dev_queue_xmit()),
      since we use HARD_TX_LOCK protection for tunnels.
      
      This avoids a cache line ping pong on "struct ip_tunnel" : This structure
      should be now mostly read on xmit and receive paths.
      
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a43912ab
    • Sebastian Haas's avatar
      ems_pci: fix size of CAN controllers BAR mapping for CPC-PCI v2 · edf42a27
      Sebastian Haas authored
      
      
      The driver mapped only 128 bytes of the CAN controller address space when a
      CPC-PCI v2 was detected (incl. CPC-104P). This patch will fix it by always
      mapping the whole address space (4096 bytes on all boards) of the
      corresponding PCI BAR.
      
      Signed-off-by: default avatarSebastian Haas <haas@ems-wuensche.com>
      Signed-off-by: default avatarWolfgang Grandegger <wg@grandegger.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      edf42a27
    • Jaswinder Singh Rajput's avatar
      net: fix htmldocs sunrpc, clnt.c · 0c01695d
      Jaswinder Singh Rajput authored
      
      
      DOCPROC Documentation/DocBook/networking.xml
        Warning(net/sunrpc/clnt.c:647): No description found for parameter 'req'
        Warning(net/sunrpc/clnt.c:647): No description found for parameter 'tk_ops'
        Warning(net/sunrpc/clnt.c:647): Excess function parameter 'ops' description in 'rpc_run_bc_task'
      
      Signed-off-by: default avatarJaswinder Singh Rajput <jaswinderrajput@gmail.com>
      Cc: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
      Cc: Benny Halevy <bhalevy@panasas.com>
      Cc: Andy Adamson <andros@netapp.com>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0c01695d
    • Rémi Denis-Courmont's avatar
      Phonet: error on broadcast sending (unimplemented) · 18a1166d
      Rémi Denis-Courmont authored
      
      
      If we ever implement this, then we can stop returning an error.
      
      Signed-off-by: default avatarRémi Denis-Courmont <remi.denis-courmont@nokia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      18a1166d
    • Rémi Denis-Courmont's avatar
      Phonet: fix race for port number in concurrent bind() · 582b0b61
      Rémi Denis-Courmont authored
      
      
      Allocating a port number to a socket and hashing that socket shall be
      an atomic operation with regards to other port allocation. Otherwise,
      we could allocate a port that is already being allocated to another
      socket.
      
      Signed-off-by: default avatarRémi Denis-Courmont <remi.denis-courmont@nokia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      582b0b61
    • Stephen Hemminger's avatar
      pktgen: better scheduler friendliness · ef87979c
      Stephen Hemminger authored
      
      
      Previous update did not resched in inner loop causing watchdogs.
      Rewrite inner loop to:
        * account for delays better with less clock calls
        * more accurate timing of delay:
          - only delay if packet was successfully sent
          - if delay is 100ns and it takes 10ns to build packet then
            account for that
        * use wait_event_interruptible_timeout rather than open coding it.
      
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ef87979c
    • Stephen Hemminger's avatar
      pktgen: T_TERMINATE flag is unused · 6b80d6a6
      Stephen Hemminger authored
      
      
      Get rid of unused flag bit.
      
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6b80d6a6
    • Shan Wei's avatar
      ipv4: check optlen for IP_MULTICAST_IF option · 0915921b
      Shan Wei authored
      
      
      Due to man page of setsockopt, if optlen is not valid, kernel should return
      -EINVAL. But a simple testcase as following, errno is 0, which means setsockopt
      is successful.
      	addr.s_addr = inet_addr("192.1.2.3");
      	setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &addr, 1);
      	printf("errno is %d\n", errno);
      
      Xiaotian Feng(dfeng@redhat.com) caught the bug. We fix it firstly checking
      the availability of optlen and then dealing with the logic like other options.
      
      Reported-by: default avatarXiaotian Feng <dfeng@redhat.com>
      Signed-off-by: default avatarShan Wei <shanwei@cn.fujitsu.com>
      Acked-by: default avatarAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0915921b
    • David S. Miller's avatar
      Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ · 8b3f6af8
      David S. Miller authored
      Conflicts:
      	drivers/staging/Kconfig
      	drivers/staging/Makefile
      	drivers/staging/cpc-usb/TODO
      	drivers/staging/cpc-usb/cpc-usb_drv.c
      	drivers/staging/cpc-usb/cpc.h
      	drivers/staging/cpc-usb/cpc_int.h
      	drivers/staging/cpc-usb/cpcusb.h
      8b3f6af8
    • Linus Torvalds's avatar
      Merge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel · 94e0fb08
      Linus Torvalds authored
      * 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: (57 commits)
        drm/i915: Handle ERESTARTSYS during page fault
        drm/i915: Warn before mmaping a purgeable buffer.
        drm/i915: Track purged state.
        drm/i915: Remove eviction debug spam
        drm/i915: Immediately discard any backing storage for uneeded objects
        drm/i915: Do not mis-classify clean objects as purgeable
        drm/i915: Whitespace correction for madv
        drm/i915: BUG_ON page refleak during unbind
        drm/i915: Search harder for a reusable object
        drm/i915: Clean up evict from list.
        drm/i915: Add tracepoints
        drm/i915: framebuffer compression for GM45+
        drm/i915: split display functions by chip type
        drm/i915: Skip the sanity checks if the current relocation is valid
        drm/i915: Check that the relocation points to within the target
        drm/i915: correct FBC update when pipe base update occurs
        drm/i915: blacklist Acer AspireOne lid status
        ACPI: make ACPI button funcs no-ops if not built in
        drm/i915: prevent FIFO calculation overflows on 32 bits with high dotclocks
        drm/i915: intel_display.c handle latency variable efficiently
        ...
      
      Fix up trivial conflicts in drivers/gpu/drm/i915/{i915_dma.c|i915_drv.h}
      94e0fb08
    • Linus Torvalds's avatar
      Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 · b7f21bb2
      Linus Torvalds authored
      * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (21 commits)
        x86/PCI: make 32 bit NUMA node array int, not unsigned char
        x86/PCI: default pcibus cpumask to all cpus if it lacks affinity
        MAINTAINTERS: remove hotplug driver entries
        PCI: pciehp: remove slot capabilities definitions
        PCI: pciehp: remove error message definitions
        PCI: pciehp: remove number field
        PCI: pciehp: remove hpc_ops
        PCI: pciehp: remove pci_dev field
        PCI: pciehp: remove crit_sect mutex
        PCI: pciehp: remove slot_bus field
        PCI: pciehp: remove first_slot field
        PCI: pciehp: remove slot_device_offset field
        PCI: pciehp: remove hp_slot field
        PCI: pciehp: remove device field
        PCI: pciehp: remove bus field
        PCI: pciehp: remove slot_num_inc field
        PCI: pciehp: remove num_slots field
        PCI: pciehp: remove slot_list field
        PCI: fix VGA arbiter header file
        PCI: Disable AER with pci=nomsi
        ...
      
      Fixed up trivial conflicts in MAINTAINERS
      b7f21bb2
    • Linus Torvalds's avatar
      Merge branch 'cputime' of git://git390.marist.edu/pub/scm/linux-2.6 · 7ca263cd
      Linus Torvalds authored
      * 'cputime' of git://git390.marist.edu/pub/scm/linux-2.6:
        [PATCH] Fix idle time field in /proc/uptime
      7ca263cd
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze · a6b49cb2
      Linus Torvalds authored
      * 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze: (24 commits)
        microblaze: Disable heartbeat/enable emaclite in defconfigs
        microblaze: Support simpleImage.dts make target
        microblaze: Fix _start symbol to physical address
        microblaze: Use LOAD_OFFSET macro to get correct LMA for all sections
        microblaze: Create the LOAD_OFFSET macro used to compute VMA vs LMA offsets
        microblaze: Copy ppc asm-compat.h for clean handling of constants in asm and C
        microblaze: Actually show KiB rather than pages in "Freeing initrd memory:"
        microblaze: Support ptrace syscall tracing.
        microblaze: Updated CPU version and FPGA family codes in PVR
        microblaze: Generate correct signal and siginfo for integer div-by-zero
        microblaze: Don't be noisy when userspace causes hardware exceptions
        microblaze: Remove ipc.h file which points to non-existing asm-generic file
        microblaze: Clear sticky FSR register after generating exception signals
        microblaze: Ensure CPU usermode is set on new userspace processes
        microblaze: Use correct kbuild variable KBUILD_CFLAGS
        microblaze: Save and restore msr in hw exception
        microblaze: Add architectural support for USB EHCI host controllers
        microblaze: Implement include/asm/syscall.h.
        microblaze: Improve checking mechanism for MSR instruction
        microblaze: Add checking mechanism for MSR instruction
        ...
      a6b49cb2
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus · 2c9871de
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
        module: don't call percpu_modfree on NULL pointer.
        module: fix memory leak when load fails after srcversion/version allocated
        module: preferred way to use MODULE_AUTHOR
        param: allow whitespace as kernel parameter separator
        module: reduce string table for loaded modules (v2)
        module: reduce symbol table for loaded modules (v2)
      2c9871de