1. 26 Dec, 2010 4 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · d7c1255a
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
        ipv4: dont create routes on down devices
        epic100: hamachi: yellowfin: Fix skb allocation size
        sundance: Fix oopses with corrupted skb_shared_info
        Revert "ipv4: Allow configuring subnets as local addresses"
        USB: mcs7830: return negative if auto negotiate fails
        irda: prevent integer underflow in IRLMP_ENUMDEVICES
        tcp: fix listening_get_next()
        atl1c: Do not use legacy PCI power management
        mac80211: fix mesh forwarding
        MAINTAINERS: email address change
        net: Fix range checks in tcf_valid_offset().
        net_sched: sch_sfq: fix allot handling
        hostap: remove netif_stop_queue from init
        mac80211/rt2x00: add ieee80211_tx_status_ni()
        typhoon: memory corruption in typhoon_get_drvinfo()
        net: Add USB PID for new MOSCHIP USB ethernet controller MCS7832 variant
        net_sched: always clone skbs
        ipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed.
        netlink: fix gcc -Wconversion compilation warning
        asix: add USB ID for Logitec LAN-GTJ U2A
        ...
      d7c1255a
    • Eric Dumazet's avatar
      ipv4: dont create routes on down devices · fc75fc83
      Eric Dumazet authored
      In ip_route_output_slow(), instead of allowing a route to be created on
      a not UPed device, report -ENETUNREACH immediately.
      
      # ip tunnel add mode ipip remote 10.16.0.164 local
      10.16.0.72 dev eth0
      # (Note : tunl1 is down)
      # ping -I tunl1 10.1.2.3
      PING 10.1.2.3 (10.1.2.3) from 192.168.18.5 tunl1: 56(84) bytes of data.
      (nothing)
      # ./a.out tunl1
      # ip tunnel del tunl1
      Message from syslogd@shelby at Dec 22 10:12:08 ...
        kernel: unregister_netdevice: waiting for tunl1 to become free.
      Usage count = 3
      
      After patch:
      # ping -I tunl1 10.1.2.3
      connect: Network is unreachable
      Reported-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Reviewed-by: default avatarOctavian Purdila <opurdila@ixiacom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc75fc83
    • Jarek Poplawski's avatar
      epic100: hamachi: yellowfin: Fix skb allocation size · 7a36df8a
      Jarek Poplawski authored
      Joel Soete reported oopses during pppoe over sundance NIC, caused by
      a bug in skb allocation and dma mapping code, where skb_reserve()
      bytes weren't taken into account. As a followup to the patch:
      "sundance: Fix oopses with corrupted skb_shared_info" very similar
      code is fixed here for three other drivers.
      Signed-off-by: default avatarJarek Poplawski <jarkao2@gmail.com>
      Cc: Joel Soete <soete.joel@scarlet.be>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7a36df8a
    • Jarek Poplawski's avatar
      sundance: Fix oopses with corrupted skb_shared_info · 78a36f25
      Jarek Poplawski authored
      Joel Soete reported oopses at the beginning of pppoe connections since
      v2.6.35. After debugging the bug was found in sundance skb allocation
      and dma mapping code, where skb_reserve() bytes aren't taken into
      account. This is an old bug, only uncovered by some change in 2.6.35.
      
      Initial debugging patch by: Eric Dumazet <eric.dumazet@gmail.com>
      Reported-by: default avatarJoel Soete <soete.joel@scarlet.be>
      Tested-by: default avatarJoel Soete <soete.joel@scarlet.be>
      Signed-off-by: default avatarJarek Poplawski <jarkao2@gmail.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78a36f25
  2. 24 Dec, 2010 16 commits
  3. 23 Dec, 2010 20 commits
    • Linus Torvalds's avatar
      Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 · e82bb314
      Linus Torvalds authored
      * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (21 commits)
        [media] mceusb: set a default rx timeout
        [media] mceusb: fix inverted mask inversion logic
        [media] mceusb: add another Fintek device ID
        [media] lirc_dev: fixes in lirc_dev_fop_read()
        [media] lirc_dev: stray unlock in lirc_dev_fop_poll()
        [media] rc: fix sysfs entry for mceusb and streamzap
        [media] streamzap: merge timeout space with trailing space
        [media] mceusb: fix keybouce issue after parser simplification
        [media] IR: add tv power scancode to rc6 mce keymap
        [media] mceusb: buffer parsing fixups for 1st-gen device
        [media] mceusb: fix up reporting of trailing space
        [media] nuvoton-cir: improve buffer parsing responsiveness
        [media] mceusb: add support for Conexant Hybrid TV RDU253S
        [media] s5p-fimc: Fix output DMA handling in S5PV310 IP revisions
        [media] s5p-fimc: Use correct fourcc code for 32-bit RGB format
        [media] s5p-fimc: Convert m2m driver to unlocked_ioctl
        [media] s5p-fimc: Explicitly add required header file
        [media] s5p-fimc: Fix vidioc_g_crop/cropcap on camera sensor
        [media] s5p-fimc: BKL lock removal - compilation fix
        [media] soc-camera: fix static build of the sh_mobile_csi2.c driver
        ...
      e82bb314
    • Linus Torvalds's avatar
      Merge branches 'perf-fixes-for-linus' and 'x86-fixes-for-linus' of... · 79534f23
      Linus Torvalds authored
      Merge branches 'perf-fixes-for-linus' and 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        perf probe: Fix to support libdwfl older than 0.148
        perf tools: Fix lazy wildcard matching
        perf buildid-list: Fix error return for success
        perf buildid-cache: Fix symbolic link handling
        perf symbols: Stop using vmlinux files with no symbols
        perf probe: Fix use of kernel image path given by 'k' option
      
      * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86, kexec: Limit the crashkernel address appropriately
      79534f23
    • David Howells's avatar
      KEYS: Don't call up_write() if __key_link_begin() returns an error · 3fc5e98d
      David Howells authored
      In construct_alloc_key(), up_write() is called in the error path if
      __key_link_begin() fails, but this is incorrect as __key_link_begin() only
      returns with the nominated keyring locked if it returns successfully.
      
      Without this patch, you might see the following in dmesg:
      
      	=====================================
      	[ BUG: bad unlock balance detected! ]
      	-------------------------------------
      	mount.cifs/5769 is trying to release lock (&key->sem) at:
      	[<ffffffff81201159>] request_key_and_link+0x263/0x3fc
      	but there are no more locks to release!
      
      	other info that might help us debug this:
      	3 locks held by mount.cifs/5769:
      	 #0:  (&type->s_umount_key#41/1){+.+.+.}, at: [<ffffffff81131321>] sget+0x278/0x3e7
      	 #1:  (&ret_buf->session_mutex){+.+.+.}, at: [<ffffffffa0258e59>] cifs_get_smb_ses+0x35a/0x443 [cifs]
      	 #2:  (root_key_user.cons_lock){+.+.+.}, at: [<ffffffff81201000>] request_key_and_link+0x10a/0x3fc
      
      	stack backtrace:
      	Pid: 5769, comm: mount.cifs Not tainted 2.6.37-rc6+ #1
      	Call Trace:
      	 [<ffffffff81201159>] ? request_key_and_link+0x263/0x3fc
      	 [<ffffffff81081601>] print_unlock_inbalance_bug+0xca/0xd5
      	 [<ffffffff81083248>] lock_release_non_nested+0xc1/0x263
      	 [<ffffffff81201159>] ? request_key_and_link+0x263/0x3fc
      	 [<ffffffff81201159>] ? request_key_and_link+0x263/0x3fc
      	 [<ffffffff81083567>] lock_release+0x17d/0x1a4
      	 [<ffffffff81073f45>] up_write+0x23/0x3b
      	 [<ffffffff81201159>] request_key_and_link+0x263/0x3fc
      	 [<ffffffffa026fe9e>] ? cifs_get_spnego_key+0x61/0x21f [cifs]
      	 [<ffffffff812013c5>] request_key+0x41/0x74
      	 [<ffffffffa027003d>] cifs_get_spnego_key+0x200/0x21f [cifs]
      	 [<ffffffffa026e296>] CIFS_SessSetup+0x55d/0x1273 [cifs]
      	 [<ffffffffa02589e1>] cifs_setup_session+0x90/0x1ae [cifs]
      	 [<ffffffffa0258e7e>] cifs_get_smb_ses+0x37f/0x443 [cifs]
      	 [<ffffffffa025a9e3>] cifs_mount+0x1aa1/0x23f3 [cifs]
      	 [<ffffffff8111fd94>] ? alloc_debug_processing+0xdb/0x120
      	 [<ffffffffa027002c>] ? cifs_get_spnego_key+0x1ef/0x21f [cifs]
      	 [<ffffffffa024cc71>] cifs_do_mount+0x165/0x2b3 [cifs]
      	 [<ffffffff81130e72>] vfs_kern_mount+0xaf/0x1dc
      	 [<ffffffff81131007>] do_kern_mount+0x4d/0xef
      	 [<ffffffff811483b9>] do_mount+0x6f4/0x733
      	 [<ffffffff8114861f>] sys_mount+0x88/0xc2
      	 [<ffffffff8100ac42>] system_call_fastpath+0x16/0x1b
      Reported-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-and-Tested-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3fc5e98d
    • Andres Salomon's avatar
      cs5535-gpio: handle GPIO regs where higher (clear) bits are set · 44658a11
      Andres Salomon authored
      The default for non-READ_BACK GPIO regs is to have the clear bits set;
      this means that our original errata fix was too simplistic.  This
      changes it to the following behavior:
      
       - when setting GPIOs, ignore the higher order bits (they're for
         clearing, we don't need to care about them).
      
       - when clearing GPIOs, keep all the bits, but unset (via XOR) the
         lower order bit that negates the clear bit that we care about.  That
         is, if we're clearing GPIO 26 (val = 0x04000000), we first XOR what's
         currently in the register with 0x0400 (GPIO 26's SET bit), and then
         OR that with the GPIO 26's CLEAR bit.
      Tested-by: default avatarDaniel Drake <dsd@laptop.org>
      Signed-off-by: default avatarAndres Salomon <dilinger@queued.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      44658a11
    • Andres Salomon's avatar
      cs5535-gpio: don't apply errata #36 to edge detect GPIOs · 00185165
      Andres Salomon authored
      The edge detect status GPIOs function differently from the other atomic
      model CS5536 GPIO registers; writing 1 to the high bits clears the GPIO,
      but writing 1 to the lower bits also clears the bit.
      
      This means that read-modify-write doesn't actually work for it, so don't
      apply the errata here.  If a negative edge status gets lost after
      resume..  well, we tried our best!
      Tested-by: default avatarDaniel Drake <dsd@laptop.org>
      Signed-off-by: default avatarAndres Salomon <dilinger@queued.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      00185165
    • David S. Miller's avatar
      Revert "ipv4: Allow configuring subnets as local addresses" · e0584649
      David S. Miller authored
      This reverts commit 4465b469.
      
      Conflicts:
      
      	net/ipv4/fib_frontend.c
      
      As reported by Ben Greear, this causes regressions:
      
      > Change 4465b469 caused rules
      > to stop matching the input device properly because the
      > FLOWI_FLAG_MATCH_ANY_IIF is always defined in ip_dev_find().
      >
      > This breaks rules such as:
      >
      > ip rule add pref 512 lookup local
      > ip rule del pref 0 lookup local
      > ip link set eth2 up
      > ip -4 addr add 172.16.0.102/24 broadcast 172.16.0.255 dev eth2
      > ip rule add to 172.16.0.102 iif eth2 lookup local pref 10
      > ip rule add iif eth2 lookup 10001 pref 20
      > ip route add 172.16.0.0/24 dev eth2 table 10001
      > ip route add unreachable 0/0 table 10001
      >
      > If you had a second interface 'eth0' that was on a different
      > subnet, pinging a system on that interface would fail:
      >
      >   [root@ct503-60 ~]# ping 192.168.100.1
      >   connect: Invalid argument
      Reported-by: default avatarBen Greear <greearb@candelatech.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0584649
    • Theodore Ts'o's avatar
      ext4: fix on-line resizing regression · 8a7411a2
      Theodore Ts'o authored
      https://bugzilla.kernel.org/show_bug.cgi?id=25352
      
      This regression was caused by commit a31437b8: "ext4: use
      sb_issue_zeroout in setup_new_group_blocks", by accidentally dropping
      the code which reserved the block group descriptor and inode table
      blocks.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      8a7411a2
    • Wolfram Sang's avatar
      powerpc/mpc5200: include fs.h in mpc52xx_gpt.c · 5e2f55c6
      Wolfram Sang authored
      Fix build errors like these (from a randconfig and my defconfig for a custom board):
      
      src/arch/powerpc/platforms/52xx/mpc52xx_gpt.c:549: error: dereferencing pointer to incomplete type: 1 errors in 1 logs
      src/arch/powerpc/platforms/52xx/mpc52xx_gpt.c:636: error: implicit declaration of function 'nonseekable_open': 1 errors in 1 logs
      src/arch/powerpc/platforms/52xx/mpc52xx_gpt.c:657: error: variable 'mpc52xx_wdt_fops' has initializer but incomplete type: 1 errors in 1 logs
      src/arch/powerpc/platforms/52xx/mpc52xx_gpt.c:658: error: excess elements in struct initializer: 1 errors in 1 logs
      src/arch/powerpc/platforms/52xx/mpc52xx_gpt.c:658: error: unknown field 'owner' specified in initializer: 1 errors in 1 logs
      ...
      Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      5e2f55c6
    • Dan Carpenter's avatar
      USB: mcs7830: return negative if auto negotiate fails · 0e214ad8
      Dan Carpenter authored
      The original code returns 0 on success and 1 on failure.  In fact, at
      this point, "ret" is already either zero or a negative error code so
      we can just return it directly.
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0e214ad8
    • Dan Rosenberg's avatar
      irda: prevent integer underflow in IRLMP_ENUMDEVICES · fdac1e06
      Dan Rosenberg authored
      If the user-provided len is less than the expected offset, the
      IRLMP_ENUMDEVICES getsockopt will do a copy_to_user() with a very large
      size value.  While this isn't be a security issue on x86 because it will
      get caught by the access_ok() check, it may leak large amounts of kernel
      heap on other architectures.  In any event, this patch fixes it.
      Signed-off-by: default avatarDan Rosenberg <drosenberg@vsecurity.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fdac1e06
    • Eric Dumazet's avatar
      tcp: fix listening_get_next() · 1bde5ac4
      Eric Dumazet authored
      Alexey Vlasov found /proc/net/tcp could sometime loop and display
      millions of sockets in LISTEN state.
      
      In 2.6.29, when we converted TCP hash tables to RCU, we left two
      sk_next() calls in listening_get_next().
      
      We must instead use sk_nulls_next() to properly detect an end of chain.
      Reported-by: default avatarAlexey Vlasov <renton@renton.name>
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1bde5ac4
    • Takashi Iwai's avatar
      Merge branch 'fix/hda' into for-linus · 76934575
      Takashi Iwai authored
      76934575
    • Takashi Iwai's avatar
      ALSA: hda - Fix GPIO2-fixup for Sony laptops · 7039c74c
      Takashi Iwai authored
      The fix-up entries by the commit 2785591a
           ALSA: hda - Add fix-up for Sony VAIO with ALC275 codecs
      weren't applied in the right position.  They had to be before the quirk
      entry matching to all Sony devices.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7039c74c
    • Takashi Iwai's avatar
      Merge branch 'fix/misc' into for-linus · 5058cbf2
      Takashi Iwai authored
      5058cbf2
    • Takashi Iwai's avatar
      ALSA: hda - Try to find an empty control index when it's occupied · 1afe206a
      Takashi Iwai authored
      When a mixer control element was already created with the given name,
      try to find another index for avoiding conflicts, instead of breaking
      with an error.  This makes the driver more robust.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      1afe206a
    • Takashi Iwai's avatar
      ALSA: hda - Fix conflict of d-mic capture volume controls · 2d7ec12b
      Takashi Iwai authored
      When the d-mics are assigned to the same purpose of another analog mic
      pins, the driver doesn't compute the index properly, resulting in an
      error with "existing control".  This patch fixes it.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2d7ec12b
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · e819eb86
      Linus Torvalds authored
      * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
        drm: Include the connector name in the output_poll_execute() debug message
        drm/radeon/kms: fix bug in r600_gpu_is_lockup
        drm/radeon/kms: reorder display resume to avoid problems
        drm/radeon/kms/evergreen: reset the grbm blocks at resume and init
        drm/radeon/kms: fix evergreen asic reset
        Revert "drm: Don't try and disable an encoder that was never enabled"
        drm/radeon: Add early unregister of firmware fb's
        drm/radeon: use aperture size not vram size for overlap tests
        drm/radeon/kms/evergreen: flush hdp cache when flushing gart tlb
        drm/radeon/kms: disable the r600 cb offset checker for linear surfaces
        drm/radeon/kms: disable ss fixed ref divide
        drm/i915/bios: Reverse order of 100/120 Mhz SSC clocks
        agp/intel: Fix missed cached memory flags setting in i965_write_entry()
        drm/i915/sdvo: Only use the SDVO pin if it is in the valid range
        drm/i915/ringbuffer: Handle wrapping of the autoreported HEAD
        drm/i915/dp: Fix I2C/EDID handling with active DisplayPort to DVI converter
      e819eb86
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 · ca5f73a0
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
        mfd: Support additional parent IDs for wm831x
        mfd: Fix ab8500-core interrupt ffs bit bug
        mfd: Supply IRQ base for WM832x devices
        watchdog: Fix null pointer dereference while accessing rdc321x platform_data
        gpio: Fix null pointer dereference while accessing rdc321x platform_data
      ca5f73a0
    • Sebastian Andrzej Siewior's avatar
      drivers/spi/spi.c: don't release the spi device twice · 97dbf37d
      Sebastian Andrzej Siewior authored
      This was fixed by David Lamparter in v2.6.36-rc5 34860089 ("spi: free
      children in spi_unregister_master, not siblings") and broken again in
      v2.6.37-rc1~2^2~4 during the merge of 2b9603a0 ("spi: enable
      spi_board_info to be registered after spi_master").
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarDavid Lamparter <equinox@diac24.net>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      97dbf37d
    • Jeff Mahoney's avatar
      taskstats: pad taskstats netlink response for aligment issues on ia64 · 4be2c95d
      Jeff Mahoney authored
      The taskstats structure is internally aligned on 8 byte boundaries but the
      layout of the aggregrate reply, with two NLA headers and the pid (each 4
      bytes), actually force the entire structure to be unaligned.  This causes
      the kernel to issue unaligned access warnings on some architectures like
      ia64.  Unfortunately, some software out there doesn't properly unroll the
      NLA packet and assumes that the start of the taskstats structure will
      always be 20 bytes from the start of the netlink payload.  Aligning the
      start of the taskstats structure breaks this software, which we don't
      want.  So, for now the alignment only happens on architectures that
      require it and those users will have to update to fixed versions of those
      packages.  Space is reserved in the packet only when needed.  This ifdef
      should be removed in several years e.g.  2012 once we can be confident
      that fixed versions are installed on most systems.  We add the padding
      before the aggregate since the aggregate is already a defined type.
      
      Commit 85893120 ("delayacct: align to 8 byte boundary on 64-bit systems")
      previously addressed the alignment issues by padding out the pid field.
      This was supposed to be a compatible change but the circumstances
      described above mean that it wasn't.  This patch backs out that change,
      since it was a hack, and introduces a new NULL attribute type to provide
      the padding.  Padding the response with 4 bytes avoids allocating an
      aligned taskstats structure and copying it back.  Since the structure
      weighs in at 328 bytes, it's too big to do it on the stack.
      Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
      Reported-by: default avatarBrian Rogers <brian@xyzw.org>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: Guillaume Chazarain <guichaz@gmail.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4be2c95d