19 Oct, 2011

3 commits

  • The Bluetooth stack has internal connection handlers for all of the various
    Bluetooth protocols, and unfortunately, they are currently lacking the LSM
    hooks found in the core network stack's connection handlers. I say
    unfortunately, because this can cause problems for users who have have an
    LSM enabled and are using certain Bluetooth devices. See one problem
    report below:

    * http://bugzilla.redhat.com/show_bug.cgi?id=741703

    In order to keep things simple at this point in time, this patch fixes the
    problem by cloning the parent socket's LSM attributes to the newly created
    child socket. If we decide we need a more elaborate LSM marking mechanism
    for Bluetooth (I somewhat doubt this) we can always revisit this decision
    in the future.

    Reported-by: James M. Cape
    Signed-off-by: Paul Moore
    Acked-by: James Morris
    Signed-off-by: David S. Miller

    Paul Moore
     
  • l2tp_xmit_skb() can leak one skb if skb_cow_head() returns an error.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Need to cleanup bridge device timers and ports when being bridge
    device is being removed via netlink.

    This fixes the problem of observed when doing:
    ip link add br0 type bridge
    ip link set dev eth1 master br0
    ip link set br0 up
    ip link del br0

    which would cause br0 to hang in unregister_netdev because
    of leftover reference count.

    Reported-by: Sridhar Samudrala
    Signed-off-by: Stephen Hemminger
    Acked-by: Sridhar Samudrala
    Signed-off-by: David S. Miller

    stephen hemminger
     

18 Oct, 2011

5 commits

  • David S. Miller
     
  • x25_find_listener does not check that the amount of call user data given
    in the skb is big enough in per-socket comparisons, hence buffer
    overreads may occur. Fix this by adding a check.

    Signed-off-by: Matthew Daley
    Cc: Eric Dumazet
    Cc: Andrew Hendry
    Cc: stable
    Acked-by: Andrew Hendry
    Signed-off-by: David S. Miller

    Matthew Daley
     
  • There are multiple locations in the X.25 packet layer where a skb is
    assumed to be of at least a certain size and that all its data is
    currently available at skb->data. These assumptions are not checked,
    hence buffer overreads may occur. Use pskb_may_pull to check these
    minimal size assumptions and ensure that data is available at skb->data
    when necessary, as well as use skb_copy_bits where needed.

    Signed-off-by: Matthew Daley
    Cc: Eric Dumazet
    Cc: Andrew Hendry
    Cc: stable
    Acked-by: Andrew Hendry
    Signed-off-by: David S. Miller

    Matthew Daley
     
  • X.25 call user data is being copied in its entirety from incoming messages
    without consideration to the size of the destination buffers, leading to
    possible buffer overflows. Validate incoming call user data lengths before
    these copies are performed.

    It appears this issue was noticed some time ago, however nothing seemed to
    come of it: see http://www.spinics.net/lists/linux-x25/msg00043.html and
    commit 8db09f26f912f7c90c764806e804b558da520d4f.

    Signed-off-by: Matthew Daley
    Acked-by: Eric Dumazet
    Tested-by: Andrew Hendry
    Cc: stable
    Signed-off-by: David S. Miller

    Matthew Daley
     
  • Commit 903ab86d195cca295379699299c5fc10beba31c7 of 1 March this year ("udp: Add
    lockless transmit path") introduced a new fast TX path that broke the checksum
    coverage computation of UDP-lite, which so far depended on up->len (only set
    if the socket is locked and 0 in the fast path).

    Fixed by providing both fast- and slow-path computation of checksum coverage.
    The latter can be removed when UDP(-lite)v6 also uses a lockless transmit path.

    Reported-by: Thomas Volkert
    Signed-off-by: Gerrit Renker
    Signed-off-by: David S. Miller

    Gerrit Renker
     

15 Oct, 2011

1 commit


14 Oct, 2011

8 commits


13 Oct, 2011

5 commits

  • The 32-bit TILEPro support uses some #defines in
    for atomic support routines in assembly. To make this more explicit,
    I've turned those includes into includes of , which
    should hopefully make it clear that they shouldn't be bombed into
    in any cleanups.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    mscan: too much data copied to CAN frame due to 16 bit accesses
    gro: refetch inet6_protos[] after pulling ext headers
    bnx2x: fix cl_id allocation for non-eth clients for NPAR mode
    mlx4_en: fix endianness with blue frame support

    Linus Torvalds
     
  • Fix file references in drivers/ide/

    There are a lot of file references to now moved or deleted files in the
    whole tree, especially in documentation and Kconfig files. This patch
    fixes the references in drivers/ide/.

    Signed-off-by: Johann Felix Soden
    Signed-off-by: Randy Dunlap
    Acked-by: David S. Miller
    Signed-off-by: Linus Torvalds

    Johann Felix Soden
     
  • * 'btrfs-3.0' of git://github.com/chrismason/linux:
    Btrfs: make sure not to defrag extents past i_size
    Btrfs: fix recursive auto-defrag

    Linus Torvalds
     
  • ip_vs_mutext is used by both netns shutdown code and startup
    and both implicit uses sk_lock-AF_INET mutex.

    cleanup CPU-1 startup CPU-2
    ip_vs_dst_event() ip_vs_genl_set_cmd()
    sk_lock-AF_INET __ip_vs_mutex
    sk_lock-AF_INET
    __ip_vs_mutex
    * DEAD LOCK *

    A new mutex placed in ip_vs netns struct called sync_mutex is added.

    Comments from Julian and Simon added.
    This patch has been running for more than 3 month now and it seems to work.

    Ver. 3
    IP_VS_SO_GET_DAEMON in do_ip_vs_get_ctl protected by sync_mutex
    instead of __ip_vs_mutex as sugested by Julian.

    Signed-off-by: Hans Schillstrom
    Acked-by: Julian Anastasov
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Hans Schillstrom
     

12 Oct, 2011

3 commits

  • Currently we have a few issues with the way the workqueue code is used to
    implement AIL pushing:

    - it accidentally uses the same workqueue as the syncer action, and thus
    can be prevented from running if there are enough sync actions active
    in the system.
    - it doesn't use the HIGHPRI flag to queue at the head of the queue of
    work items

    At this point I'm not confident enough in getting all the workqueue flags and
    tweaks right to provide a perfectly reliable execution context for AIL
    pushing, which is the most important piece in XFS to make forward progress
    when the log fills.

    Revert back to use a kthread per filesystem which fixes all the above issues
    at the cost of having a task struct and stack around for each mounted
    filesystem. In addition this also gives us much better ways to diagnose
    any issues involving hung AIL pushing and removes a small amount of code.

    Signed-off-by: Christoph Hellwig
    Reported-by: Stefan Priebe
    Tested-by: Stefan Priebe
    Reviewed-by: Dave Chinner
    Signed-off-by: Alex Elder

    Christoph Hellwig
     
  • We need to check for pinned buffers even in .iop_pushbuf given that inode
    items flush into the same buffers that may be pinned directly due operations
    on the unlinked inode list operating directly on buffers. To do this add a
    return value to .iop_pushbuf that tells the AIL push about this and use
    the existing log force mechanisms to unpin it.

    Signed-off-by: Christoph Hellwig
    Reported-by: Stefan Priebe
    Tested-by: Stefan Priebe
    Reviewed-by: Dave Chinner
    Signed-off-by: Alex Elder

    Christoph Hellwig
     
  • If an item was locked we should not update xa_last_pushed_lsn and thus skip
    it when restarting the AIL scan as we need to be able to lock and write it
    out as soon as possible. Otherwise heavy lock contention might starve AIL
    pushing too easily, especially given the larger backoff once we moved
    xa_last_pushed_lsn all the way to the target lsn.

    Signed-off-by: Christoph Hellwig
    Reported-by: Stefan Priebe
    Tested-by: Stefan Priebe
    Reviewed-by: Dave Chinner
    Signed-off-by: Alex Elder

    Christoph Hellwig
     

11 Oct, 2011

7 commits

  • The btrfs file defrag code will loop through the extents and
    force COW on them. But there is a concurrent truncate in the middle of
    the defrag, it might end up defragging the same range over and over
    again.

    The problem is that writepage won't go through and do anything on pages
    past i_size, so the cow won't happen, so the file will appear to still
    be fragmented. defrag will end up hitting the same extents again and
    again.

    In the worst case, the truncate can actually live lock with the defrag
    because the defrag keeps creating new ordered extents which the truncate
    code keeps waiting on.

    The fix here is to make defrag check for i_size inside the main loop,
    instead of just once before the looping starts.

    Signed-off-by: Chris Mason

    Chris Mason
     
  • This UML breakage:

    linux-2.6.30.1[3800] vsyscall fault (exploit attempt?) ip:ffffffffff600000 cs:33 sp:7fbfb9c498 ax:ffffffffff600000 si:0 di:606790
    linux-2.6.30.1[3856] vsyscall fault (exploit attempt?) ip:ffffffffff600000 cs:33 sp:7fbfb13168 ax:ffffffffff600000 si:0 di:606790

    Is caused by commit 3ae36655 ("x86-64: Rework vsyscall emulation and add
    vsyscall= parameter") - the vsyscall emulation code is not fully cooked
    yet as UML relies on some rather fragile SIGSEGV semantics.

    Linus suggested in https://lkml.org/lkml/2011/8/9/376 to default
    to vsyscall=native for now, this patch implements that.

    Signed-off-by: Adrian Bunk
    Acked-by: Andrew Lutomirski
    Cc: H. Peter Anvin
    Link: http://lkml.kernel.org/r/20111005214047.GE14406@localhost.pp.htv.fi
    Signed-off-by: Ingo Molnar

    Adrian Bunk
     
  • Follow those steps:

    # mount -o autodefrag /dev/sda7 /mnt
    # dd if=/dev/urandom of=/mnt/tmp bs=200K count=1
    # sync
    # dd if=/dev/urandom of=/mnt/tmp bs=8K count=1 conv=notrunc

    and then it'll go into a loop: writeback -> defrag -> writeback ...

    It's because writeback writes [8K, 200K] and then writes [0, 8K].

    I tried to make writeback know if the pages are dirtied by defrag,
    but the patch was a bit intrusive. Here I simply set writeback_index
    when we defrag a file.

    Signed-off-by: Li Zefan
    Signed-off-by: Chris Mason

    Li Zefan
     
  • Due to the 16 bit access to mscan registers there's too much data copied to
    the zero initialized CAN frame when having an odd number of bytes to copy.
    This patch ensures that only the requested bytes are copied by using an
    8 bit access for the remaining byte.

    Reported-by: Andre Naujoks
    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Wolfgang Grandegger
     
  • ipv6_gro_receive() doesn't update the protocol ops after pulling
    the ext headers. It looks like a typo.

    Signed-off-by: Zheng Yan
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Yan, Zheng
     
  • There are some consolidations of NPAR configuration
    when FCoE and iSCSI L2 clients will get the same id,
    in this case FCoE ring will be non-functional.

    Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Dmitry Kravkov
     
  • The doorbell register was being unconditionally swapped. In x86, that
    meant it was being swapped to BE and written to the descriptor and to
    memory, depending on the case of blue frame support or writing to
    doorbell register. On PPC, this meant it was being swapped to LE and
    then swapped back to BE while writing to the register. But in the blue
    frame case, it was being written as LE to the descriptor.

    The fix is not to swap doorbell unconditionally, write it to the
    register as BE and convert it to BE when writing it to the descriptor.

    Signed-off-by: Thadeu Lima de Souza Cascardo
    Reported-by: Richard Hendrickson
    Cc: Eli Cohen
    Cc: Yevgeny Petrilin
    Cc: Benjamin Herrenschmidt
    Signed-off-by: David S. Miller

    Thadeu Lima de Souza Cascardo
     

10 Oct, 2011

6 commits

  • * git://git.samba.org/sfrench/cifs-2.6:
    [CIFS] Fix first time message on mount, ntlmv2 upgrade delayed to 3.2

    Linus Torvalds
     
  • * 'fixes' of git://git.linaro.org/people/arnd/arm-soc:
    ARM: mach-ux500: enable fix for ARM errata 754322
    ARM: OMAP: musb: Remove a redundant omap4430_phy_init call in usb_musb_init
    ARM: OMAP: Fix i2c init for twl4030
    ARM: OMAP4: MMC: fix power and audio issue, decouple USBC1 from MMC1

    Linus Torvalds
     
  • This fixes a compilation error in cpu-tegra.c which was introduced in
    dc8d966bccde ("ARM: convert PCI defines to variables") which removed the
    now obsolete mach/hardware.h from the mach-tegra subtree.

    Signed-off-by: Marc Dietrich
    Signed-off-by: Olof Johansson
    Cc: Sergei Shtylyov
    Signed-off-by: Linus Torvalds

    Marc Dietrich
     
  • * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/radeon/kms: use hardcoded dig encoder to transmitter mapping for DCE4.1
    drm/radeon/kms: fix dp_detect handling for DP bridge chips
    drm/radeon/kms: retry aux transactions if there are status flags

    Linus Torvalds
     
  • A couple of changes to the Tegra maintainership setup:

    I'm very glad to bring on Stephen Warren on board as a maintainer. The
    work he has done so far is excellent, and the fact that he works for
    Nvidia means he has long-term interest in the platform.

    Erik Gilling did an astounding amount of work on getting things up and
    running but has been a silent partner on the maintainership side for a
    while, and is stepping down. Thanks for your contributions so far, Erik.

    Finally, update the git URL since I'll take over running the main repo
    for a while.

    Overall maintainership model isn't changing much at this time: We'll all
    three review patches as appropriate, and one of us will collect the main
    repo (me at this time).

    Signed-off-by: Olof Johansson
    Cc: Erik Gilling
    Acked-by: Colin Cross
    Acked-by: Stephen Warren
    Signed-off-by: Linus Torvalds

    Olof Johansson
     
  • * 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (29 commits)
    MIPS: Call oops_enter, oops_exit in die
    staging/octeon: Software should check the checksum of no tcp/udp packets
    MIPS: Octeon: Enable C0_UserLocal probing.
    MIPS: No branches in delay slots for huge pages in handle_tlbl
    MIPS: Don't clobber CP0_STATUS value for CONFIG_MIPS_MT_SMTC
    MIPS: Octeon: Select CONFIG_HOLES_IN_ZONE
    MIPS: PM: Use struct syscore_ops instead of sysdevs for PM (v2)
    MIPS: Compat: Use 32-bit wrapper for compat_sys_futex.
    MIPS: Do not use EXTRA_CFLAGS
    MIPS: Alchemy: DB1200: Disable cascade IRQ in handler
    SERIAL: Lantiq: Set timeout in uart_port
    MIPS: Lantiq: Fix setting the PCI bus speed on AR9
    MIPS: Lantiq: Fix external interrupt sources
    MIPS: tlbex: Fix build error in R3000 code.
    MIPS: Alchemy: Include Au1100 in PM code.
    MIPS: Alchemy: Fix typo in MAC0 registration
    MIPS: MSP71xx: Fix build error.
    MIPS: Handle __put_user() sleeping.
    MIPS: Allow forced irq threading
    MIPS: i8259: Mark cascade interrupt non-threaded
    ...

    Linus Torvalds
     

09 Oct, 2011

1 commit


08 Oct, 2011

1 commit