15 Mar, 2011

8 commits

  • We latch our state using a spinlock not a r/w kind of lock.

    Signed-off-by: Daniel Baluta
    Signed-off-by: David S. Miller

    Daniel Baluta
     
  • Currently, for N 5800 XM I get:
    cdc_phonet: probe of 1-6:1.10 failed with error -22

    It's because phonet_header is empty. Extra altsetting looks like
    there:
    E 05 24 00 01 10 03 24 ab 05 24 06 0a 0b 04 24 fd .$....$..$....$.
    E 00 .

    I don't see the header used anywhere so just check if the phonet
    descriptor is there, not the structure itself.

    Signed-off-by: Jiri Slaby
    Cc: Rémi Denis-Courmont
    Cc: David S. Miller
    Acked-by: Rémi Denis-Courmont
    Signed-off-by: David S. Miller

    Jiri Slaby
     
  • Currently there is a warning emitted by the cdc-phonet driver:
    WARNING: at include/linux/netdevice.h:1557 usbpn_probe+0x3bb/0x3f0 [cdc_phonet]()
    Modules linked in: ...
    Pid: 5877, comm: insmod Not tainted 2.6.37.3-16-desktop #1
    Call Trace:
    [] dump_trace+0x79/0x340
    [] dump_stack+0x69/0x6f
    [] warn_slowpath_common+0x7b/0xc0
    [] usbpn_probe+0x3bb/0x3f0 [cdc_phonet]
    ...
    ---[ end trace f5d3e02908603ab4 ]---
    netif_stop_queue() cannot be called before register_netdev()

    So remove netif_stop_queue from the probe funtction to avoid that.

    Signed-off-by: Jiri Slaby
    Cc: Rémi Denis-Courmont
    Cc: David S. Miller
    Acked-by: Rémi Denis-Courmont
    Signed-off-by: David S. Miller

    Jiri Slaby
     
  • Fixup the rx_gso_checksum_fixup field added in e0ce4af920eb to be
    unsigned long as suggested by Ben Hutchings in

    Signed-off-by: Ian Campbell
    Cc: Ben Hutchings
    Signed-off-by: David S. Miller

    Ian Campbell
     
  • If Spanning Tree Protocol is not enabled, there is no good reason for
    the bridge code to wait for the forwarding delay period before enabling
    the link. The purpose of the forwarding delay is to allow STP to
    learn about other bridges before nominating itself.

    The only possible impact is that when starting up a new port
    the bridge may flood a packet now, where previously it might have
    seen traffic from the other host and preseeded the forwarding table.

    Includes change for local variable br already available in that func.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • Don't reset tx_fifo_errors when reading out current EMAC stats.
    (tx_fifo_errors shows up as TX overruns in netdev stats.)

    Without this correction, the old counter value is lost every time
    stats are read out.

    Signed-off-by: Thomas Lange
    Signed-off-by: David S. Miller

    Thomas Lange
     
  • Index i was already used in the outer loop.

    Signed-off-by: Roel Kluin
    Signed-off-by: David S. Miller

    roel kluin
     
  • Signed-off-by: Ariel Elior
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Ariel Elior
     

11 Mar, 2011

11 commits

  • Simply remove redundant 'dev' NULL check.

    Signed-off-by: Jinqiu Yang
    Signed-off-by: David S. Miller

    j223yang@asset.uwaterloo.ca
     
  • Add necessary alias to autoload ip6ip6 tunnel module.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • David S. Miller
     
  • When configs BRIDGE=y and IPV6=m, this build error occurs:

    br_multicast.c:(.text+0xa3341): undefined reference to `ipv6_dev_get_saddr'

    BRIDGE_IGMP_SNOOPING is boolean; if it were tristate, then adding
    depends on IPV6 || IPV6=n
    to BRIDGE_IGMP_SNOOPING would be a good fix. As it is currently,
    making BRIDGE depend on the IPV6 config works.

    Reported-by: Patrick Schaaf
    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • * 'media_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
    [media] mantis_pci: remove asm/pgtable.h include
    [media] tda829x: fix regression in probe functions
    [media] mceusb: don't claim multifunction device non-IR parts
    [media] nuvoton-cir: fix wake from suspend
    [media] cx18: Add support for Hauppauge HVR-1600 models with s5h1411
    [media] ivtv: Fix corrective action taken upon DMA ERR interrupt to avoid hang
    [media] cx25840: fix probing of cx2583x chips
    [media] cx23885: Remove unused 'err:' labels to quiet compiler warning
    [media] cx23885: Revert "Check for slave nack on all transactions"
    [media] DiB7000M: add pid filtering
    [media] Fix sysfs rc protocol lookup for rc-5-sz
    [media] au0828: fix VBI handling when in V4L2 streaming mode
    [media] ir-raw: Properly initialize the IR event (BZ#27202)
    [media] s2255drv: firmware re-loading changes
    [media] Fix double free of video_device in mem2mem_testdev
    [media] DM04/QQBOX memcpy to const char fix

    Linus Torvalds
     
  • This patch fixes an issue in OpenIPMI module where sometimes an ABORT command
    is sent after sending an IPMI request to BMC causing the IPMI request to fail.

    Signed-off-by: YiCheng Doe
    Signed-off-by: Corey Minyard
    Acked-by: Tom Mingarelli
    Tested-by: Andy Cress
    Tested-by: Mika Lansirine
    Tested-by: Brian De Wolf
    Cc: Jean Michel Audet
    Cc: Jozef Sudelsky
    Acked-by: Matthew Garrett
    Signed-off-by: Linus Torvalds

    Doe, YiCheng
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    fs/dcache: allow d_obtain_alias() to return unhashed dentries
    Check for immutable/append flag in fallocate path
    sysctl: the include of rcupdate.h is only needed in the kernel
    fat: fix d_revalidate oopsen on NFS exports
    jfs: fix d_revalidate oopsen on NFS exports
    ocfs2: fix d_revalidate oopsen on NFS exports
    gfs2: fix d_revalidate oopsen on NFS exports
    fuse: fix d_revalidate oopsen on NFS exports
    ceph: fix d_revalidate oopsen on NFS exports
    reiserfs xattr ->d_revalidate() shouldn't care about RCU
    /proc/self is never going to be invalidated...

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, UV: Initialize the broadcast assist unit base destination node id properly
    x86, numa: Fix numa_emulation code with memory-less node0
    x86, build: Make sure mkpiggy fails on read error

    Linus Torvalds
     
  • …l/git/tip/linux-2.6-tip

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Fix sched rt group scheduling when hierachy is enabled

    Linus Torvalds
     
  • * 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    perf symbols: Avoid resolving [kernel.kallsyms] to real path for buildid cache
    perf symbols: Fix vmlinux path when not using --symfs

    Linus Torvalds
     
  • This reverts commit 951f3512dba5bd44cda3e5ee22b4b522e4bb09fb

    drm/i915: Do not handle backlight combination mode specially

    since this commit introduced other regressions due to untouched LBPC
    register, e.g. the backlight dimmed after resume.

    In addition to the revert, this patch includes a fix for the original
    issue (weird backlight levels) by removing the wrong bit shift for
    computing the current backlight level.
    Also, including typo fixes (lpbc -> lbpc).

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34524
    Acked-by: Indan Zupancic
    Reviewed-by: Keith Packard
    Reviewed-by: Jesse Barnes
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Linus Torvalds

    Takashi Iwai
     

10 Mar, 2011

21 commits

  • Without this patch, inodes are not promptly freed on last close of an
    unlinked file by an nfs client:

    client$ mount -tnfs4 server:/export/ /mnt/
    client$ tail -f /mnt/FOO
    ...
    server$ df -i /export
    server$ rm /export/FOO
    (^C the tail -f)
    server$ df -i /export
    server$ echo 2 >/proc/sys/vm/drop_caches
    server$ df -i /export

    the df's will show that the inode is not freed on the filesystem until
    the last step, when it could have been freed after killing the client's
    tail -f. On-disk data won't be deallocated either, leading to possible
    spurious ENOSPC.

    This occurs because when the client does the close, it arrives in a
    compound with a putfh and a close, processed like:

    - putfh: look up the filehandle.  The only alias found for the
    inode will be DCACHE_UNHASHED alias referenced by the filp
    this, so it creates a new DCACHE_DISCONECTED dentry and
    returns that instead.
    - close: closes the existing filp, which is destroyed
    immediately by dput() since it's DCACHE_UNHASHED.
    - end of the compound: release the reference
    to the current filehandle, and dput() the new
    DCACHE_DISCONECTED dentry, which gets put on the
    unused list instead of being destroyed immediately.

    Nick Piggin suggested fixing this by allowing d_obtain_alias to return
    the unhashed dentry that is referenced by the filp, instead of making it
    create a new dentry.

    Leave __d_find_alias() alone to avoid changing behavior of other
    callers.

    Also nfsd doesn't need all the checks of __d_find_alias(); any dentry,
    hashed or unhashed, disconnected or not, should work.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Al Viro

    J. Bruce Fields
     
  • In the fallocate path the kernel doesn't check for the immutable/append
    flag. It's possible to have a race condition in this scenario: an
    application open a file in read/write and it does something, meanwhile
    root set the immutable flag on the file, the application at that point
    can call fallocate with success. In addition, we don't allow to do any
    unreserve operation on an append only file but only the reserve one.

    Signed-off-by: Marco Stornelli
    Signed-off-by: Al Viro

    Marco Stornelli
     
  • Fixes this built error:

    include/linux/sysctl.h:28: included file 'linux/rcupdate.h' is not exported

    Signed-off-by: Stephen Rothwell
    Acked-by: Al Viro
    Signed-off-by: Al Viro

    Stephen Rothwell
     
  • can't blindly check nd->flags in ->d_revalidate()

    Signed-off-by: Al Viro

    Al Viro
     
  • can't blindly check nd->flags in ->d_revalidate()

    Signed-off-by: Al Viro

    Al Viro
     
  • can't blindly check nd->flags in ->d_revalidate()

    Signed-off-by: Al Viro

    Al Viro
     
  • can't blindly check nd->flags in ->d_revalidate()

    Signed-off-by: Al Viro

    Al Viro
     
  • can't blindly check nd->flags in ->d_revalidate()

    Signed-off-by: Al Viro

    Al Viro
     
  • can't blindly check nd->flags in ->d_revalidate()

    Signed-off-by: Al Viro

    Al Viro
     
  • ... it returns an error unconditionally

    Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Addresses https://bugzilla.kernel.org/show_bug.cgi?id=29252
    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=30462

    In commit d80bc0fd262ef840ed4e82593ad6416fa1ba3fc4 ("ipv6: Always
    clone offlink routes.") we forced the kernel to always clone offlink
    routes.

    The reason we do that is to make sure we never bind an inetpeer to a
    prefixed route.

    The logic turned on here has existed in the tree for many years,
    but was always off due to a protecting CPP define. So perhaps
    it's no surprise that there is a logic bug here.

    The problem is that we canot clone a route that is already a
    host route (ie. has DST_HOST set). Because if we do, an identical
    entry already exists in the routing tree and therefore the
    ip6_rt_ins() call is going to fail.

    This sets off a series of failures and high cpu usage, because when
    ip6_rt_ins() fails we loop retrying this operation a few times in
    order to handle a race between two threads trying to clone and insert
    the same host route at the same time.

    Fix this by simply using the route as-is when DST_HOST is set.

    Reported-by: slash@ac.auone-net.jp
    Reported-by: Ernst Sjöstrand
    Signed-off-by: David S. Miller

    David S. Miller
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc/pseries: Disable VPNH feature
    powerpc/iseries: Fix early init access to lppaca

    Linus Torvalds
     
  • …s/security-testing-2.6

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
    net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules

    Linus Torvalds
     
  • Fixes this build-check error:

    include/linux/sysctl.h:28: included file 'linux/rcupdate.h' is not exported

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with
    CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean
    that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are
    limited to /lib/modules/**. However, CAP_NET_ADMIN capability shouldn't
    allow anybody load any module not related to networking.

    This patch restricts an ability of autoloading modules to netdev modules
    with explicit aliases. This fixes CVE-2011-1019.

    Arnd Bergmann suggested to leave untouched the old pre-v2.6.32 behavior
    of loading netdev modules by name (without any prefix) for processes
    with CAP_SYS_MODULE to maintain the compatibility with network scripts
    that use autoloading netdev modules by aliases like "eth0", "wlan0".

    Currently there are only three users of the feature in the upstream
    kernel: ipip, ip_gre and sit.

    root@albatros:~# capsh --drop=$(seq -s, 0 11),$(seq -s, 13 34) --
    root@albatros:~# grep Cap /proc/$$/status
    CapInh: 0000000000000000
    CapPrm: fffffff800001000
    CapEff: fffffff800001000
    CapBnd: fffffff800001000
    root@albatros:~# modprobe xfs
    FATAL: Error inserting xfs
    (/lib/modules/2.6.38-rc6-00001-g2bf4ca3/kernel/fs/xfs/xfs.ko): Operation not permitted
    root@albatros:~# lsmod | grep xfs
    root@albatros:~# ifconfig xfs
    xfs: error fetching interface information: Device not found
    root@albatros:~# lsmod | grep xfs
    root@albatros:~# lsmod | grep sit
    root@albatros:~# ifconfig sit
    sit: error fetching interface information: Device not found
    root@albatros:~# lsmod | grep sit
    root@albatros:~# ifconfig sit0
    sit0 Link encap:IPv6-in-IPv4
    NOARP MTU:1480 Metric:1

    root@albatros:~# lsmod | grep sit
    sit 10457 0
    tunnel4 2957 1 sit

    For CAP_SYS_MODULE module loading is still relaxed:

    root@albatros:~# grep Cap /proc/$$/status
    CapInh: 0000000000000000
    CapPrm: ffffffffffffffff
    CapEff: ffffffffffffffff
    CapBnd: ffffffffffffffff
    root@albatros:~# ifconfig xfs
    xfs: error fetching interface information: Device not found
    root@albatros:~# lsmod | grep xfs
    xfs 745319 0

    Reference: https://lkml.org/lkml/2011/2/24/203

    Signed-off-by: Vasiliy Kulikov
    Signed-off-by: Michael Tokarev
    Acked-by: David S. Miller
    Acked-by: Kees Cook
    Signed-off-by: James Morris

    Vasiliy Kulikov
     
  • This feature triggers nasty races in the scheduler between the
    rebuilding of the topology and the load balancing code, causing
    the machine to hang.

    Disable it for now until the races are fixed.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • The combination of commit

    8154c5d22d91cd16bd9985b0638c8957e4688d0e and
    93c22703efa72c7527dbd586d1951c1f4a85fd70

    Broke boot on iSeries.

    The problem is that iSeries very early boot code, which generates
    the device-tree and runs before our normal early initializations
    does need access the lppaca's very early, before the PACA array is
    initialized, and in fact even before the boot PACA has been
    initialized (it contains all 0's at this stage).

    However, the first patch above makes that code use the new
    llpaca_of(cpu) accessor, which itself is changed by the second patch to
    use the PACA array.

    We fix that by reverting iSeries to directly dereferencing the array. In
    addition, we fix all iterators in the iSeries code to always skip CPU
    whose number is above 63 which is the maximum size of that array and
    the maximum number of supported CPUs on these machines.

    Additionally, we make sure the boot_paca is properly initialized
    in our early startup code.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • * 'for-2.6.38' of git://linux-nfs.org/~bfields/linux:
    nfsd: wrong index used in inner loop
    nfsd4: fix bad pointer on failure to find delegation
    NFSD: fix decode_cb_sequence4resok

    Linus Torvalds
     
  • The units in show_results in pktgen were not correct.
    The results are in usec but it was displayed nsec.

    Reported-by: Jong-won Lee
    Signed-off-by: Daniel Turull
    Signed-off-by: David S. Miller

    Daniel Turull
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
    watchdog: sbc_fitpc2_wdt, fix crash on systems without DMI_BOARD_NAME

    Linus Torvalds