21 Jun, 2011

1 commit


20 Jun, 2011

3 commits


13 Jun, 2011

5 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
    Btrfs: use join_transaction in btrfs_evict_inode()
    Btrfs - use %pU to print fsid
    Btrfs: fix extent state leak on failed nodatasum reads
    btrfs: fix unlocked access of delalloc_inodes
    Btrfs: avoid stack bloat in btrfs_ioctl_fs_info()
    btrfs: remove 64bit alignment padding to allow extent_buffer to fit into one fewer cacheline
    Btrfs: clear current->journal_info on async transaction commit
    Btrfs: make sure to recheck for bitmaps in clusters
    btrfs: remove unneeded includes from scrub.c
    btrfs: reinitialize scrub workers
    btrfs: scrub: errors in tree enumeration
    Btrfs: don't map extent buffer if path->skip_locking is set
    Btrfs: unlock the trans lock properly
    Btrfs: don't map extent buffer if path->skip_locking is set
    Btrfs: fix duplicate checking logic
    Btrfs: fix the allocator loop logic
    Btrfs: fix bitmap regression
    Btrfs: don't commit the transaction if we dont have enough pinned bytes
    Btrfs: noinline the cluster searching functions
    Btrfs: cache bitmaps when searching for a cluster

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: hda: Fix inaudible internal speakers on CyberpowerPC Gamer Xplorer N57001 laptop
    ALSA: Use %pV for snd_printk()
    ALSA: hda - Fix initialization of hp pins with master_mute in Realtek
    ALSA: hda - Fix invalid unsol tag for some alc262 model quirks
    ASoC: SAMSUNG: Fix the incorrect referencing of I2SCON register
    ASoC: snd_soc_new_{mixer,mux,pga} make sure to use right DAPM context
    ASoC: fsl: fix initialization of DMA buffers
    ASoC: WM8804 does not support sample rates below 32kHz
    ASoC: Fix WM8962 headphone volume update for use of advanced caches
    ASoC: Blackfin: bf5xx-ad1836: Fix codec device name
    ALSA: hda: Fix quirk for Dell Inspiron 910
    ASoC: AD1836: Fix setting the PCM format
    ASoC: Check for NULL register bank in snd_soc_get_cache_val()
    ASoC: Add missing break in WM8915 FLL source selection
    ASoC: Only update SYSCLK_ENA when pausing WM8915 SYSCLK
    ASoC: atmel_ssc: Don't try to free ssc if request failed

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
    ide-cd: signedness warning fix again

    Linus Torvalds
     
  • * 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6:
    gpio/basic_mmio: add missing include of spinlock_types.h
    gpio/nomadik: fix sleepmode for elder Nomadik

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (55 commits)
    ISDN, hfcsusb: Don't leak in hfcsusb_ph_info()
    netpoll: call dev_put() on error in netpoll_setup()
    net: ep93xx_eth: fix DMA API violations
    net: ep93xx_eth: drop GFP_DMA from call to dma_alloc_coherent()
    net: ep93xx_eth: allocate buffers using kmalloc()
    net: ep93xx_eth: pass struct device to DMA API functions
    ep93xx: set DMA masks for the ep93xx_eth
    vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
    dl2k: EEPROM CRC calculation wrong endianess on bigendian machine
    NET: am79c961: fix assembler warnings
    NET: am79c961: ensure multicast filter is correctly set at open
    NET: am79c961: ensure asm() statements are marked volatile
    ethtool.h: fix typos
    ep93xx_eth: Update MAINTAINERS
    ipv4: Fix packet size calculation for raw IPsec packets in __ip_append_data
    netpoll: prevent netpoll setup on slave devices
    net: pmtu_expires fixes
    gianfar:localized filer table
    iwlegacy: fix channel switch locking
    mac80211: fix IBSS teardown race
    ...

    Linus Torvalds
     

12 Jun, 2011

15 commits

  • …s/security-testing-2.6

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
    AppArmor: Fix sleep in invalid context from task_setrlimit

    Linus Torvalds
     
  • We leak the memory allocated to 'phi' when the variable goes out of scope
    in hfcsusb_ph_info().

    Signed-off-by: Jesper Juhl
    Signed-off-by: David S. Miller

    Jesper Juhl
     
  • There is a dev_put(ndev) missing on an error path. This was
    introduced in 0c1ad04aecb "netpoll: prevent netpoll setup on slave
    devices".

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • Russell King said:
    >
    > So, to summarize what its doing:
    >
    > 1. It allocates buffers for rx and tx.
    > 2. It maps them with dma_map_single().
    > This transfers ownership of the buffer to the DMA device.
    > 3. In ep93xx_xmit,
    > 3a. It copies the data into the buffer with skb_copy_and_csum_dev()
    > This violates the DMA buffer ownership rules - the CPU should
    > not be writing to this buffer while it is (in principle) owned
    > by the DMA device.
    > 3b. It then calls dma_sync_single_for_cpu() for the buffer.
    > This transfers ownership of the buffer to the CPU, which surely
    > is the wrong direction.
    > 4. In ep93xx_rx,
    > 4a. It calls dma_sync_single_for_cpu() for the buffer.
    > This at least transfers the DMA buffer ownership to the CPU
    > before the CPU reads the buffer
    > 4b. It then uses skb_copy_to_linear_data() to copy the data out.
    > At no point does it transfer ownership back to the DMA device.
    > 5. When the driver is removed, it dma_unmap_single()'s the buffer.
    > This transfers ownership of the buffer to the CPU.
    > 6. It frees the buffer.
    >
    > While it may work on ep93xx, it's not respecting the DMA API rules,
    > and with DMA debugging enabled it will probably encounter quite a few
    > warnings.

    This patch fixes these violations.

    Signed-off-by: Mika Westerberg
    Acked-by: Russell King
    Acked-by: H Hartley Sweeten
    Tested-by: Petr Stetiar
    Signed-off-by: David S. Miller

    Mika Westerberg
     
  • Commit a197b59ae6e8 (mm: fail GFP_DMA allocations when ZONE_DMA is not
    configured) made page allocator to return NULL if GFP_DMA is set but
    CONFIG_ZONE_DMA is disabled.

    This causes ep93xx_eth to fail:

    WARNING: at mm/page_alloc.c:2251 __alloc_pages_nodemask+0x11c/0x638()
    Modules linked in:
    [] (unwind_backtrace+0x0/0xf4) from [] (warn_slowpath_common+0x48/0x60)
    [] (warn_slowpath_common+0x48/0x60) from [] (warn_slowpath_null+0x1c/0x24)
    [] (warn_slowpath_null+0x1c/0x24) from [] (__alloc_pages_nodemask+0x11c/0x638)
    [] (__alloc_pages_nodemask+0x11c/0x638) from [] (__dma_alloc+0x8c/0x3ec)
    [] (__dma_alloc+0x8c/0x3ec) from [] (dma_alloc_coherent+0x54/0x60)
    [] (dma_alloc_coherent+0x54/0x60) from [] (ep93xx_open+0x20/0x864)
    [] (ep93xx_open+0x20/0x864) from [] (__dev_open+0xb8/0x108)
    [] (__dev_open+0xb8/0x108) from [] (__dev_change_flags+0x70/0x128)
    [] (__dev_change_flags+0x70/0x128) from [] (dev_change_flags+0x10/0x48)
    [] (dev_change_flags+0x10/0x48) from [] (ip_auto_config+0x190/0xf68)
    [] (ip_auto_config+0x190/0xf68) from [] (do_one_initcall+0x34/0x18c)
    [] (do_one_initcall+0x34/0x18c) from [] (kernel_init+0x94/0x134)
    [] (kernel_init+0x94/0x134) from [] (kernel_thread_exit+0x0/0x8)

    Since there is no restrictions for DMA on ep93xx, we can fix this by just
    removing the GFP_DMA flag from the call.

    Signed-off-by: Mika Westerberg
    Acked-by: Russell King
    Acked-by: H Hartley Sweeten
    Tested-by: Petr Stetiar
    Signed-off-by: David S. Miller

    Mika Westerberg
     
  • We can use simply kmalloc() to allocate the buffers. This also simplifies the
    code and allows us to perform DMA sync operations more easily.

    Memory is allocated with only GFP_KERNEL since there are no DMA allocation
    restrictions on this platform.

    Signed-off-by: Mika Westerberg
    Acked-by: Russell King
    Acked-by: H Hartley Sweeten
    Tested-by: Petr Stetiar
    Signed-off-by: David S. Miller

    Mika Westerberg
     
  • We shouldn't use NULL for any DMA API functions, unless we are dealing with
    ISA or EISA device. So pass correct struct dev pointer to these functions.

    Signed-off-by: Mika Westerberg
    Signed-off-by: David S. Miller

    Mika Westerberg
     
  • Since the driver uses the DMA API, we should pass it valid DMA masks.

    Signed-off-by: Mika Westerberg
    Acked-by: Russell King
    Acked-by: H Hartley Sweeten
    Tested-by: Petr Stetiar
    Signed-off-by: David S. Miller

    Mika Westerberg
     
  • Testing of VLAN_FLAG_REORDER_HDR does not belong in vlan_untag
    but rather in vlan_do_receive. Otherwise the vlan header
    will not be properly put on the packet in the case of
    vlan header accelleration.

    As we remove the check from vlan_check_reorder_header
    rename it vlan_reorder_header to keep the naming clean.

    Fix up the skb->pkt_type early so we don't look at the packet
    after adding the vlan tag, which guarantees we don't goof
    and look at the wrong field.

    Use a simple if statement instead of a complicated switch
    statement to decided that we need to increment rx_stats
    for a multicast packet.

    Hopefully at somepoint we will just declare the case where
    VLAN_FLAG_REORDER_HDR is cleared as unsupported and remove
    the code. Until then this keeps it working correctly.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Jiri Pirko
    Acked-by: Changli Gao
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • Fix:
    /tmp/ccvoZ6h8.s: Assembler messages:
    /tmp/ccvoZ6h8.s:284: Warning: register range not in ascending order
    /tmp/ccvoZ6h8.s:881: Warning: register range not in ascending order
    /tmp/ccvoZ6h8.s:1087: Warning: register range not in ascending order

    by ensuring that we have temporary variables placed into specific
    registers. Reorder the code a bit to allow the resulting assembly
    to be slightly more optimal.

    Signed-off-by: Russell King
    Signed-off-by: David S. Miller

    Russell King - ARM Linux
     
  • We were clearing out the multicast filter whenever the interface was
    upped, and not setting the mode bits correctly. This can cause
    problems if there are any multicast addresses already set at this
    point, or if ALLMULTI was set.

    Signed-off-by: Russell King
    Signed-off-by: David S. Miller

    Russell King - ARM Linux
     
  • Without this the compiler can (and does) optimize register reads away
    from within loops, and other such optimizations.

    Signed-off-by: Russell King
    Signed-off-by: David S. Miller

    Russell King - ARM Linux
     
  • One of the legit warnings 'make W=3 drivers/ide/ide-cd.c'
    generates is:
    drivers/ide/ide-cd.c: In function ide_cd_do_request
    drivers/ide/ide-cd.c:828:2: warning: conversion to int from \
    unsigned int may change the sign of the result
    drivers/ide/ide-cd.c:833:2: warning: conversion to int from \
    unsigned int may change the sign of the result

    nsectors is declared int, should be unsigned int.

    blk_rq_sectors() returns unsigned int, and ide_complete_rq
    expects unsigned int as well. Fixes both warnings.

    Signed-off-by: Connor Hansen
    Signed-off-by: David S. Miller

    Connor Hansen
     
  • It uses cpu_relax(), and so needs

    Without this patch, I see:

    CC arch/mn10300/kernel/asm-offsets.s
    In file included from include/linux/time.h:8,
    from include/linux/timex.h:56,
    from include/linux/sched.h:57,
    from arch/mn10300/kernel/asm-offsets.c:7:
    include/linux/seqlock.h: In function 'read_seqbegin':
    include/linux/seqlock.h:91: error: implicit declaration of function 'cpu_relax'

    whilst building asb2364_defconfig on MN10300.

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     

11 Jun, 2011

9 commits

  • The WARN_ON() in start_transaction() was triggered while balancing.

    The cause is btrfs_relocate_chunk() started a transaction and
    then called iput() on the inode that stores free space cache,
    and iput() called btrfs_start_transaction() again.

    Reported-by: Tsutomu Itoh
    Signed-off-by: Li Zefan
    Reviewed-by: Josef Bacik
    Signed-off-by: Chris Mason

    Li Zefan
     
  • Get rid of FIXME comment. Uuids from dmesg are now the same as uuids
    given by btrfs-progs.

    Signed-off-by: Ilya Dryomov
    Signed-off-by: Chris Mason

    Ilya Dryomov
     
  • When encountering an EIO while reading from a nodatasum extent, we
    insert an error record into the inode's failure tree.
    btrfs_readpage_end_io_hook returns early for nodatasum inodes. We'd
    better clear the failure tree in that case, otherwise the kernel
    complains about

    BUG extent_state: Objects remaining on kmem_cache_close()

    on rmmod.

    Signed-off-by: Jan Schmidt
    Signed-off-by: Chris Mason

    Jan Schmidt
     
  • …trfs-unstable-arne into for-linus

    Chris Mason
     
  • list_splice_init will make delalloc_inodes empty, but without a spinlock
    around, this may produce corrupted list head, accessed in many placess,
    The race window is very tight and nobody seems to have hit it so far.

    Signed-off-by: David Sterba
    Signed-off-by: Chris Mason

    David Sterba
     
  • The size of struct btrfs_ioctl_fs_info_args is as big as 1KB, so
    don't declare the variable on stack.

    Signed-off-by: Li Zefan
    Reviewed-by: Josef Bacik
    Signed-off-by: Chris Mason

    Li Zefan
     
  • Reorder extent_buffer to remove 8 bytes of alignment padding on 64 bit
    builds. This shrinks its size to 128 bytes allowing it to fit into one
    fewer cache lines and allows more objects per slab in its kmem_cache.

    slabinfo extent_buffer reports :-

    before:-
    Sizes (bytes) Slabs
    ----------------------------------
    Object : 136 Total : 123
    SlabObj: 136 Full : 121
    SlabSiz: 4096 Partial: 0
    Loss : 0 CpuSlab: 2
    Align : 8 Objects: 30

    after :-
    Object : 128 Total : 4
    SlabObj: 128 Full : 2
    SlabSiz: 4096 Partial: 0
    Loss : 0 CpuSlab: 2
    Align : 8 Objects: 32

    Signed-off-by: Richard Kennedy
    Signed-off-by: Chris Mason

    richard kennedy
     
  • Normally current->jouranl_info is cleared by commit_transaction. For an
    async snap or subvol creation, though, it runs in a work queue. Clear
    it in btrfs_commit_transaction_async() to avoid leaking a non-NULL
    journal_info when we return to userspace. When the actual commit runs in
    the other thread it won't care that it's current->journal_info is already
    NULL.

    Signed-off-by: Sage Weil
    Tested-by: Jim Schutt
    Signed-off-by: Chris Mason

    Sage Weil
     
  • Josef recently changed the free extent cache to look in
    the block group cluster for any bitmaps before trying to
    add a new bitmap for the same offset. This avoids BUG_ON()s due
    covering duplicate ranges.

    But it didn't go quite far enough. A given free range might span
    between one or more bitmaps or free space entries. The code has
    looping to cover this, but it doesn't check for clustered bitmaps
    every time.

    This shuffles our gotos to check for a bitmap in the cluster
    for every new bitmap entry we try to add.

    Signed-off-by: Chris Mason

    Chris Mason
     

10 Jun, 2011

7 commits