]> asedeno.scripts.mit.edu Git - linux.git/log
linux.git
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Fri, 15 Jun 2012 23:04:37 +0000 (16:04 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs

Pull btrfs update from Chris Mason:
 "The dates look like I had to rebase this morning because there was a
  compiler warning for a printk arg that I had missed earlier.

  These are all fixes, including one to prevent using stale pointers for
  device names, and lots of fixes around transaction abort cleanups
  (Josef, Liu Bo).

  Jan Schmidt also sent in a number of fixes for the new reference
  number tracking code.

  Liu Bo beat me to updating the MAINTAINERS file.  Since he thought to
  also fix the git url, I kept his commit."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (24 commits)
  Btrfs: update MAINTAINERS info for BTRFS FILE SYSTEM
  Btrfs: destroy the items of the delayed inodes in error handling routine
  Btrfs: make sure that we've made everything in pinned tree clean
  Btrfs: avoid memory leak of extent state in error handling routine
  Btrfs: do not resize a seeding device
  Btrfs: fix missing inherited flag in rename
  Btrfs: fix incompat flags setting
  Btrfs: fix defrag regression
  Btrfs: call filemap_fdatawrite twice for compression
  Btrfs: keep inode pinned when compressing writes
  Btrfs: implement ->show_devname
  Btrfs: use rcu to protect device->name
  Btrfs: unlock everything properly in the error case for nocow
  Btrfs: fix btrfs_destroy_marked_extents
  Btrfs: abort the transaction if the commit fails
  Btrfs: wake up transaction waiters when aborting a transaction
  Btrfs: fix locking in btrfs_destroy_delayed_refs
  Btrfs: pass locked_page into extent_clear_unlock_delalloc if theres an error
  Btrfs: fix race in tree mod log addition
  Btrfs: add btrfs_next_old_leaf
  ...

12 years agoBtrfs: update MAINTAINERS info for BTRFS FILE SYSTEM
Liu Bo [Thu, 14 Jun 2012 08:23:25 +0000 (02:23 -0600)]
Btrfs: update MAINTAINERS info for BTRFS FILE SYSTEM

Update to the latest btrfs's maintainer mail and git repo.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
12 years agoBtrfs: destroy the items of the delayed inodes in error handling routine
Miao Xie [Thu, 14 Jun 2012 08:23:22 +0000 (02:23 -0600)]
Btrfs: destroy the items of the delayed inodes in error handling routine

the items of the delayed inodes were forgotten to be freed, this patch
fixes it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
12 years agoBtrfs: make sure that we've made everything in pinned tree clean
Liu Bo [Thu, 14 Jun 2012 08:23:21 +0000 (02:23 -0600)]
Btrfs: make sure that we've made everything in pinned tree clean

Since we have two trees for recording pinned extents, we need to go through
both of them to make sure that we've done everything clean.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
12 years agoBtrfs: avoid memory leak of extent state in error handling routine
Liu Bo [Thu, 14 Jun 2012 08:23:20 +0000 (02:23 -0600)]
Btrfs: avoid memory leak of extent state in error handling routine

We've forgotten to clear extent states in pinned tree, which will results in
space counter mismatch and memory leak:

WARNING: at fs/btrfs/extent-tree.c:7537 btrfs_free_block_groups+0x1f3/0x2e0 [btrfs]()
...
space_info 2 has 8380416 free, is not full
space_info total=12582912, used=4096, pinned=4096, reserved=0, may_use=0, readonly=4194304
btrfs state leak: start 29364224 end 29376511 state 1 in tree ffff880075f20090 refs 1
...

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
12 years agoBtrfs: do not resize a seeding device
Liu Bo [Thu, 14 Jun 2012 08:23:19 +0000 (02:23 -0600)]
Btrfs: do not resize a seeding device

Seeding devices are not supposed to change any more.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
12 years agoBtrfs: fix missing inherited flag in rename
Liu Bo [Thu, 14 Jun 2012 08:23:18 +0000 (02:23 -0600)]
Btrfs: fix missing inherited flag in rename

When we move a file into a directory with compression flag, we need to
inherite BTRFS_INODE_COMPRESS and clear BTRFS_INODE_NOCOMPRESS as well.
But if we move a file into a directory without compression flag, we need
to clear both of them.

It is the way how our setflags deals with compression flag, so keep
the same behaviour here.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
12 years agoMerge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into for-linus
Chris Mason [Fri, 15 Jun 2012 01:33:34 +0000 (21:33 -0400)]
Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into for-linus

12 years agoBtrfs: fix incompat flags setting
Li Zefan [Mon, 11 Jun 2012 09:10:51 +0000 (17:10 +0800)]
Btrfs: fix incompat flags setting

It's a bug, but it happens to work, as BTRFS_COMPRESS_LZO == 2, which
has only one bit set.

Signed-off-by: Li Zefan <lizefan@huawei.com>
12 years agoBtrfs: fix defrag regression
Li Zefan [Mon, 11 Jun 2012 08:03:35 +0000 (16:03 +0800)]
Btrfs: fix defrag regression

If a file has 3 small extents:

| ext1 | ext2 | ext3 |

Running "btrfs fi defrag" will only defrag the last two extents, if those
extent mappings hasn't been read into memory from disk.

This bug was introduced by commit 17ce6ef8d731af5edac8c39e806db4c7e1f6956f
("Btrfs: add a check to decide if we should defrag the range")

The cause is, that commit looked into previous and next extents using
lookup_extent_mapping() only.

While at it, remove the code that checks the previous extent, since
it's sufficient to check the next extent.

Signed-off-by: Li Zefan <lizefan@huawei.com>
12 years agoBtrfs: call filemap_fdatawrite twice for compression
Josef Bacik [Fri, 8 Jun 2012 19:26:47 +0000 (15:26 -0400)]
Btrfs: call filemap_fdatawrite twice for compression

I removed this in an earlier commit and I was wrong.  Because compression
can return from filemap_fdatawrite() without having actually set any of it's
pages as writeback() it can make filemap_fdatawait() do essentially nothing,
and then we won't find any ordered extents because they may not have been
created yet.  So not only does this make fsync() completely useless, but it
will also screw up if you truncate on a non-page aligned offset since we
zero out the end and then wait on ordered extents and then call drop caches.
We can drop the cache before the io completes and then we try to unpin the
extent we just wrote we won't find it and everything goes sideways.  So fix
this by putting it back and put a giant comment there to keep me from trying
to remove it in the future.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: keep inode pinned when compressing writes
Josef Bacik [Fri, 8 Jun 2012 19:16:12 +0000 (15:16 -0400)]
Btrfs: keep inode pinned when compressing writes

A user reported lots of problems using compression on the new code and it
turns out part of the problem was that igrab() was failing when we added a
new ordered extent.  This is because when writing out an inode under
compression we immediately return without actually doing anything to the
pages, and then in another thread at some point down the line actually do
the ordered dance.  The problem is between the point that we start writeback
and we actually add the ordered extent we could be trying to reclaim the
inode, which makes igrab() return NULL.  So we need to do an igrab() when we
create the async extent and then drop it when we are done with it.  This
makes sure we stay pinned in memory until the ordered extent can get a
reference on it and we are good to go.  With this patch we no longer panic
in btrfs_finish_ordered_io().  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: implement ->show_devname
Josef Bacik [Tue, 5 Jun 2012 18:13:12 +0000 (14:13 -0400)]
Btrfs: implement ->show_devname

Because btrfs can remove the device that was mounted we need to have a
->show_devname so that in this case we can print out some other device in
the file system to /proc/mount.  So if there are multiple devices in a btrfs
file system we will just print the device with the lowest devid that we can
find.  This will make everything consistent and deal with device removal
properly.  The drawback is if you mount with a device that is higher than
the lowest devicd it won't show up as the mounted device in /proc/mounts,
but this is a small price to pay. This was inspired by Miao Xie's patch.
Thanks,

Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: use rcu to protect device->name
Josef Bacik [Mon, 4 Jun 2012 18:03:51 +0000 (14:03 -0400)]
Btrfs: use rcu to protect device->name

Al pointed out that we can just toss out the old name on a device and add a
new one arbitrarily, so anybody who uses device->name in printk could
possibly use free'd memory.  Instead of adding locking around all of this he
suggested doing it with RCU, so I've introduced a struct rcu_string that
does just that and have gone through and protected all accesses to
device->name that aren't under the uuid_mutex with rcu_read_lock().  This
protects us and I will use it for dealing with removing the device that we
used to mount the file system in a later patch.  Thanks,

Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: unlock everything properly in the error case for nocow
Josef Bacik [Thu, 31 May 2012 19:58:55 +0000 (15:58 -0400)]
Btrfs: unlock everything properly in the error case for nocow

I was getting hung on umount when a transaction was aborted because a range
of one of the free space inodes was still locked.  This is because the nocow
stuff doesn't unlock anything on error.  This fixed the problem and I
verified that is what was happening.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: fix btrfs_destroy_marked_extents
Josef Bacik [Thu, 31 May 2012 19:54:30 +0000 (15:54 -0400)]
Btrfs: fix btrfs_destroy_marked_extents

So we're forcing the eb's to have their ref count set to 1 so invalidatepage
works but this breaks lots of things, for example root nodes, and is just
plain wrong, we don't need to just evict all of this stuff.  Also drop the
invalidatepage altogether and add a page_cache_release().  With this patch
we no longer hang when trying to access the root nodes after an aborted
transaction and we no longer leak memory.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: abort the transaction if the commit fails
Josef Bacik [Thu, 31 May 2012 19:52:43 +0000 (15:52 -0400)]
Btrfs: abort the transaction if the commit fails

If a transaction commit fails we don't abort it so we don't set an error on
the file system.  This patch fixes that by actually calling the abort stuff
and then adding a check for a fs error in the transaction start stuff to
make sure it is caught properly.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: wake up transaction waiters when aborting a transaction
Josef Bacik [Thu, 31 May 2012 19:49:57 +0000 (15:49 -0400)]
Btrfs: wake up transaction waiters when aborting a transaction

I was getting lots of hung tasks and a NULL pointer dereference because we
are not cleaning up the transaction properly when it aborts.  First we need
to reset the running_transaction to NULL so we don't get a bad dereference
for any start_transaction callers after this.  Also we cannot rely on
waitqueue_active() since it's just a list_empty(), so just call wake_up()
directly since that will do the barrier for us and such.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: fix locking in btrfs_destroy_delayed_refs
Josef Bacik [Thu, 31 May 2012 15:06:33 +0000 (11:06 -0400)]
Btrfs: fix locking in btrfs_destroy_delayed_refs

The transaction abort stuff was throwing warnings from the list debugging
code because we do a list_del_init outside of the delayed_refs spin lock.
The delayed refs locking makes baby Jesus cry so it's not hard to get wrong,
but we need to take the ref head mutex to make sure it's not being processed
currently, and so if it is we need to drop the spin lock and then take and
drop the mutex and do the search again.  If we can take the mutex then we
can safely remove the head from the list and carry on.  Now when the
transaction aborts I don't get the list debugging warnings.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: pass locked_page into extent_clear_unlock_delalloc if theres an error
Josef Bacik [Wed, 30 May 2012 19:35:17 +0000 (15:35 -0400)]
Btrfs: pass locked_page into extent_clear_unlock_delalloc if theres an error

While doing my enospc work I got a transaction abortion that resulted in a
panic when we tried to unlock_page() an already unlocked page.  This is
because we aren't calling extent_clear_unlock_delalloc with the locked page
so it was unlocking all the pages in the range.  This is wrong since
__extent_writepage expects to have the page locked still unless we return
*page_started as 1.  This should keep us from panicing.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: fix race in tree mod log addition
Jan Schmidt [Mon, 11 Jun 2012 08:52:38 +0000 (10:52 +0200)]
Btrfs: fix race in tree mod log addition

When adding to the tree modification log, we grab two locks at different
stages. We must not drop the outer lock until we're done with section
protected by the inner lock. This moves the unlock call for the outer lock
to the appropriate position.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
12 years agoBtrfs: add btrfs_next_old_leaf
Jan Schmidt [Mon, 11 Jun 2012 06:29:29 +0000 (08:29 +0200)]
Btrfs: add btrfs_next_old_leaf

To make sense of the tree mod log, the backref walker not only needs
btrfs_search_old_slot, but it also called btrfs_next_leaf, which in turn was
calling btrfs_search_slot. This obviously didn't give the correct result.

This commit adds btrfs_next_old_leaf, a drop-in replacement for
btrfs_next_leaf with a time_seq parameter. If it is zero, it behaves exactly
like btrfs_next_leaf. If it is non-zero, it will use btrfs_search_old_slot
with this time_seq parameter.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
12 years agoBtrfs: fix return value for __tree_mod_log_oldest_root
Jan Schmidt [Tue, 5 Jun 2012 14:41:24 +0000 (16:41 +0200)]
Btrfs: fix return value for __tree_mod_log_oldest_root

In __tree_mod_log_oldest_root() we must return the found operation even if
it's not a ROOT_REPLACE operation. Otherwise, the caller assumes that there
are no operations to be rewinded and returns immediately.

The code in the caller is modified to improve readability.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
12 years agoBtrfs: use btrfs_read_lock_root_node in get_old_root
Jan Schmidt [Mon, 4 Jun 2012 14:54:57 +0000 (16:54 +0200)]
Btrfs: use btrfs_read_lock_root_node in get_old_root

get_old_root could race with root node updates because we weren't locking
the node early enough. Use btrfs_read_lock_root_node to grab the root locked
in the very beginning and release the lock as soon as possible (just like
btrfs_search_slot does).

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
12 years agoBtrfs: remove obsolete btrfs_next_leaf call from __resolve_indirect_ref
Jan Schmidt [Thu, 14 Jun 2012 14:10:13 +0000 (16:10 +0200)]
Btrfs: remove obsolete btrfs_next_leaf call from __resolve_indirect_ref

When resolving indirect refs, we used to call btrfs_next_leaf in case we
didn't find an exact match. While we should find exact matches most of the
time, in case we don't, we must continue searching. Treating those matches
differently depending on the level we're searching doesn't make sense.

Even worse, we might end up searching for a key larger than the largest, in
which case there is no next_leaf and subsequent jobs would fail. This commit
drops the bogous lines.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
12 years agoMerge git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Thu, 14 Jun 2012 12:46:59 +0000 (15:46 +0300)]
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fix from Marcelo Tosatti:
 "Fix a spurious warning on CPU offline path"

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  x86: kvmclock: remove check_and_clear_guest_paused warning

12 years agoMerge tag 'pinctrl-fixes-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 14 Jun 2012 12:43:32 +0000 (15:43 +0300)]
Merge tag 'pinctrl-fixes-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pinctrl fixes from Linus Walleij:
 - section markup fixes
 - clk_prepare() fix to conform to the clk API
 - memory leaks
 - incorrect debug messages
 - bad errorpaths
 - typos

* tag 'pinctrl-fixes-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: pinctrl-mxs: set platform driver data to NULL at errpath and at unregister
  pinctrl: pinctrl-mxs: Take care of frees if the kzalloc fails
  pinctrl: pinctrl-imx: fix incorrect debug message of maps
  pinctrl: pinctrl-imx: free if of_get_parent fails to get the parent node
  pinctrl: pinctrl-imx: free allocated pinctrl_map structure only once and use kernel facilities for IMX_PMX_DUMP
  pinctrl: nomadik: fix up typo
  pinctrl: nomadik: add clk_prepare() call
  pinctrl: fix a minor harmless typo
  pinctrl: sirf: mark of_device_id match table as __devinitconst

12 years agoMerge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Thu, 14 Jun 2012 12:38:48 +0000 (15:38 +0300)]
Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:

 - Fix a regression of USB-audio PCM assignment since 3.4
 - A few VGA-switcheroo-related fixes for proper HDMI audio enablement
 - Fixed the missing initializations of HD-audio verbs, which may have
   resulted in various breakage
 - Some driver-specific ASoC updates
 - A few fixes for the dynamic PCM code
 - The addition of pinctrl support for the i.MX audmux which didn't make
   it into -rc1 due to cross tree dependency issues
 - A few minor fixes in compress API codes

* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Don't forget to call init verbs added by fixup list
  ALSA: HDA: Pin fixup for Zotac Z68 motherboard
  ALSA: compress_core: cleanup pointers on stop
  ALSA: compress_core: don't wake up on pause
  ALSA: hda - Fix detection of Creative SoundCore3D controllers
  vga_switcheroo: Enable/disable audio clients at the right time
  ALSA: hda - HDMI Audio init all connectors when VGA-switcheroo is off
  vga_switcheroo: Fix error without CONFIG_VGA_SWITCHEROO
  ALSA: hda - Fix uninitialized HDMI controllers with VGA-switcheroo
  vga_switcheroo: Add a helper function to get the client state
  ALSA: usb-audio: Fix substream assignments
  ASoC: tegra: add MODULE_DEVICE_TABLE to tegra30_ahub
  ASoC: wm2000: Always use a 4s timeout for the firmware
  ASoC: dapm: Fix input list to use source widgets
  ASoC: dpcm: Fix dpcm_get_be() to check that DAI is BE
  ASoC: wm8994: Apply volume updates with clocks enabled
  ASoC: wm8994: Ensure all AIFnCLK events are run from the _late variants
  ASoC: imx-audmux: add pinctrl support
  ASoC: dapm: Fix connected widget capture path query.

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Thu, 14 Jun 2012 12:33:55 +0000 (15:33 +0300)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David S. Miller:

This has the fix for the wireless issues I ran into the other week as
well as:

 1) Fix CAN c_can driver transmit handling resulting in BUG check
    triggers, from AnilKumar Ch.

 2) Fix packet drop monitor sleeping in atomic context, from Eric
    Dumazet.

 3) Fix mv643xx_eth driver build regression, from Andrew Lunn.

 4) Inetpeer freeing needs an RCU grace period in order to avoid races
    during tree invalidation.  From Eric Dumazet.

 5) Fix endianness bugs in xt_HMARK netfilter module, from Hans
    Schillstrom.

 6) Add proper module refcounting to l2tp_eth to avoid crash on module
    unload, from Eric Dumazet.

 7) Fix truncation of neighbour entry dumps due to logic errors in
    neigh_dump_info() and friends, from Eric Dumazet.

 8) The conversion of fib6_age() to dst_neigh_lookup() accidently
    reversed the logic of a flags test, fix from Thomas Graf.

 9) Fix checksum configuration in newer sky2 chips, from Stephen
    Hemminger.

10) Revert BQL support in NIU driver, doesn't work.

11) l2tp_ip_sendmsg() illegally uses a route without a proper reference.
    From Eric Dumazet.

12) be2net driver references an SKB after it's potentially been freed,
    also from Eric Dumazet.

13) Fix RCU stalls in dummy net driver init.  Also from Eric Dumazet.

14) lpc_eth has several bugs in it's transmit engine leading to packet
    leaks and improper queue wakes, from Eric Dumazet.

15) Apply short DMA workaround to more tg3 chips, from Matt Carlson.

16) Add tilegx network driver.

17) Bonding queue mapping for a packet can get corrupted, fix from Eric
    Dumazet.

18) Fix bug in netpoll_send_udp() SKB management that can leave garbage
    in the payload in certain situations.  From Eric Dumazet.

19) bnx2x driver interprets chip RX checksum offload incorrectly in
    encapsulation situations.  Fix from Eric Dumazet.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (75 commits)
  bnx2x: fix checksum validation
  netpoll: fix netpoll_send_udp() bugs
  bonding: Fix corrupted queue_mapping
  bonding:record primary when modify it via sysfs
  tilegx network driver: initial support
  tg3: Apply short DMA frag workaround to 5906
  net: stmmac: Fix clock en-/disable calls
  lpc_eth: fix tx completion
  lpc_eth: add missing ndo_change_mtu()
  dummy: fix rcu_sched self-detected stalls
  net: Reorder initialization in ip_route_output to fix gcc warning
  virtio-net: fix a race on 32bit arches
  r8169: avoid NAPI scheduling delay.
  net: Make linux/tcp.h C++ friendly (trivial)
  netdev: fix drivers/net/phy/ kernel-doc warnings
  net/core: fix kernel-doc warnings
  be2net: fix a race in be_xmit()
  l2tp: fix a race in l2tp_ip_sendmsg()
  mac80211: add back channel change flag
  NFC: Fix possible NULL ptr deref when getting the name of a socket
  ...

12 years agobnx2x: fix checksum validation
Eric Dumazet [Tue, 12 Jun 2012 23:50:04 +0000 (23:50 +0000)]
bnx2x: fix checksum validation

bnx2x driver incorrectly sets ip_summed to CHECKSUM_UNNECESSARY on
encapsulated segments. TCP stack happily accepts frames with bad
checksums, if they are inside a GRE or IPIP encapsulation.

Our understanding is that if no IP or L4 csum validation was done by the
hardware, we should leave ip_summed as is (CHECKSUM_NONE), since
hardware doesn't provide CHECKSUM_COMPLETE support in its cqe.

Then, if IP/L4 checksumming was done by the hardware, set
CHECKSUM_UNNECESSARY if no error was flagged.

Patch based on findings and analysis from Robert Evans

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Eilon Greenstein <eilong@broadcom.com>
Cc: Yaniv Rosner <yanivr@broadcom.com>
Cc: Merav Sicron <meravs@broadcom.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Robert Evans <evansr@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetpoll: fix netpoll_send_udp() bugs
Eric Dumazet [Tue, 12 Jun 2012 19:30:21 +0000 (19:30 +0000)]
netpoll: fix netpoll_send_udp() bugs

Bogdan Hamciuc diagnosed and fixed following bug in netpoll_send_udp() :

"skb->len += len;" instead of "skb_put(skb, len);"

Meaning that _if_ a network driver needs to call skb_realloc_headroom(),
only packet headers would be copied, leaving garbage in the payload.

However the skb_realloc_headroom() must be avoided as much as possible
since it requires memory and netpoll tries hard to work even if memory
is exhausted (using a pool of preallocated skbs)

It appears netpoll_send_udp() reserved 16 bytes for the ethernet header,
which happens to work for typicall drivers but not all.

Right thing is to use LL_RESERVED_SPACE(dev)
(And also add dev->needed_tailroom of tailroom)

This patch combines both fixes.

Many thanks to Bogdan for raising this issue.

Reported-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Linus Torvalds [Wed, 13 Jun 2012 20:19:34 +0000 (23:19 +0300)]
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh

Pull SuperH fixes from Paul Mundt.

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
  sh: Kill off additional asm-generic wrappers.
  sh: Setup CROSS_COMPILE at the top
  sh: Fix up link time defsym warnings.
  sh: use the new generic strnlen_user() function
  sh: switch to generic strncpy_from_user().
  sh: Kill off last dead UBC header
  serial: sh-sci: Make probe fail for ports that exceed the maximum count
  serial: sh-sci: Fix probe error paths
  clocksource: sh_tmu: Use clockevents_config_and_register().
  clocksource: sh_tmu: Convert timer lock to raw spinlock.
  clocksource: sh_mtu2: Convert timer lock to raw spinlock.
  clocksource: sh_cmt: Convert timer lock to raw spinlock.
  bug.h: need linux/kernel.h for TAINT_WARN.
  sh: convert to kbuild asm-generic support.
  sh64: Fix up fallout from generic init_task conversion.
  sh: arch/sh/kernel/process.c needs asm/fpu.h for unlazy_fpu().

12 years agoMerge branch 'fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/coolone...
Linus Torvalds [Wed, 13 Jun 2012 20:18:41 +0000 (23:18 +0300)]
Merge branch 'fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds

Pull led fixes from Bryan Wu.

* 'fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
  leds: Make LEDS_ASIC3 and LEDS_RENESAS_TPU depend on LEDS_CLASS=y
  leds: fixed a coding style issue.
  leds: don't disable blinking when writing the same value to delay_on or delay_off

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Wed, 13 Jun 2012 20:17:12 +0000 (23:17 +0300)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

Pull m68k update from Geert Uytterhoeven.

This makes m68k use the generic library functions for the user-space
strn[cpy|len] functions.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Use generic strncpy_from_user(), strlen_user(), and strnlen_user()

12 years agoMerge tag 'omapdss-for-3.5-rc2' of git://gitorious.org/linux-omap-dss2/linux
Linus Torvalds [Wed, 13 Jun 2012 14:57:30 +0000 (17:57 +0300)]
Merge tag 'omapdss-for-3.5-rc2' of git://gitorious.org/linux-omap-dss2/linux

Pull omapdss build problem fix from Tomi Valkeinen:
 "Small fixes for omapdss driver.  Most importantly, fixes a build
  problem when debugfs or omapdss debug support is turned off, and fixes
  a suspend related crash."

This has apparently been annoying rmk for a while..

* tag 'omapdss-for-3.5-rc2' of git://gitorious.org/linux-omap-dss2/linux:
  OMAPDSS: fix registration of DPI and SDI devices
  OMAPDSS: DSI: Fix bug when calculating LP command interleaving parameters
  OMAPDSS: fix bogus WARN_ON in dss_runtime_put()
  OMAPDSS: Taal: fix compilation warning
  OMAPDSS: fix build when DEBUG_FS or DSS_DEBUG_SUPPORT disabled

12 years agoALSA: hda - Don't forget to call init verbs added by fixup list
Takashi Iwai [Wed, 13 Jun 2012 14:47:32 +0000 (16:47 +0200)]
ALSA: hda - Don't forget to call init verbs added by fixup list

During the split to the auto-parser helper functions, the actual call
of init verbs was lost.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43366

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branches 'sh/urgent', 'sh/core', 'sh/clockevents', 'sh/asm-generic' and 'sh...
Paul Mundt [Wed, 13 Jun 2012 03:01:33 +0000 (12:01 +0900)]
Merge branches 'sh/urgent', 'sh/core', 'sh/clockevents', 'sh/asm-generic' and 'sh/trivial' into sh-fixes-for-linus

12 years agosh: Kill off additional asm-generic wrappers.
Paul Mundt [Wed, 13 Jun 2012 02:59:47 +0000 (11:59 +0900)]
sh: Kill off additional asm-generic wrappers.

A few wrappers were overlooked in the initial conversion, take care of
them now.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agosh: Setup CROSS_COMPILE at the top
Geert Uytterhoeven [Sat, 12 May 2012 20:39:07 +0000 (22:39 +0200)]
sh: Setup CROSS_COMPILE at the top

CROSS_COMPILE must be setup before using e.g. cc-option (and a few other
as-*, cc-*, ld-* macros), else they will check against the wrong compiler
when cross-compiling, and may invoke the cross compiler with wrong or
suboptimal compiler options.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agosh: Fix up link time defsym warnings.
Paul Mundt [Wed, 13 Jun 2012 02:36:36 +0000 (11:36 +0900)]
sh: Fix up link time defsym warnings.

sh-linux-gnu-ld:--defsym 'jiffies=jiffies_64': ignoring invalid character `'' in expression

For some reason ld has recently started complaining about the quotes, so just
get rid of them, we don't need them for anything anyways.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agosh: use the new generic strnlen_user() function
Paul Mundt [Mon, 4 Jun 2012 06:46:05 +0000 (15:46 +0900)]
sh: use the new generic strnlen_user() function

This discards both the _32 and _64 versions in favour of the consolidated
generic one.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agosh: switch to generic strncpy_from_user().
Paul Mundt [Fri, 25 May 2012 04:02:48 +0000 (13:02 +0900)]
sh: switch to generic strncpy_from_user().

This kills off the special sh32/64 versions and adopts the generic
version. It should be possible to optimize this for SH-4A unaligned
loads, but this is a corner case that can be supported incrementally.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agosh: Kill off last dead UBC header
Paul Bolle [Fri, 8 Jun 2012 20:49:17 +0000 (22:49 +0200)]
sh: Kill off last dead UBC header

Commit 7025bec9125b0a02edcaf22c2dce753bf2c95480 ("sh: Kill off dead UBC
headers.") skipped arch/sh/include/cpu-sh2a/cpu/ubc.h. Since nothing is
using that header either, kill it off too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoserial: sh-sci: Make probe fail for ports that exceed the maximum count
Laurent Pinchart [Tue, 12 Jun 2012 22:28:24 +0000 (00:28 +0200)]
serial: sh-sci: Make probe fail for ports that exceed the maximum count

The driver supports a maximum number of ports configurable at compile
time. Make sure the probe() method fails when registering a port that
exceeds the maximum instead of returning success without registering the
port.

This fixes a crash at system suspend time, when the driver tried to
suspend a non-registered port using the UART core.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoserial: sh-sci: Fix probe error paths
Laurent Pinchart [Tue, 12 Jun 2012 22:28:23 +0000 (00:28 +0200)]
serial: sh-sci: Fix probe error paths

When probing fails, the driver must not try to cleanup resources that
have not been initialized. Fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agobonding: Fix corrupted queue_mapping
Eric Dumazet [Tue, 12 Jun 2012 06:03:51 +0000 (06:03 +0000)]
bonding: Fix corrupted queue_mapping

In the transmit path of the bonding driver, skb->cb is used to
stash the skb->queue_mapping so that the bonding device can set its
own queue mapping.  This value becomes corrupted since the skb->cb is
also used in __dev_xmit_skb.

When transmitting through bonding driver, bond_select_queue is
called from dev_queue_xmit.  In bond_select_queue the original
skb->queue_mapping is copied into skb->cb (via bond_queue_mapping)
and skb->queue_mapping is overwritten with the bond driver queue.

Subsequently in dev_queue_xmit, __dev_xmit_skb is called which writes
the packet length into skb->cb, thereby overwriting the stashed
queue mappping.  In bond_dev_queue_xmit (called from hard_start_xmit),
the queue mapping for the skb is set to the stashed value which is now
the skb length and hence is an invalid queue for the slave device.

If we want to save skb->queue_mapping into skb->cb[], best place is to
add a field in struct qdisc_skb_cb, to make sure it wont conflict with
other layers (eg : Qdiscc, Infiniband...)

This patchs also makes sure (struct qdisc_skb_cb)->data is aligned on 8
bytes :

netem qdisc for example assumes it can store an u64 in it, without
misalignment penalty.

Note : we only have 20 bytes left in (struct qdisc_skb_cb)->data[].
The largest user is CHOKe and it fills it.

Based on a previous patch from Tom Herbert.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Tom Herbert <therbert@google.com>
Cc: John Fastabend <john.r.fastabend@intel.com>
Cc: Roland Dreier <roland@kernel.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobonding:record primary when modify it via sysfs
Weiping Pan [Sun, 10 Jun 2012 23:00:20 +0000 (23:00 +0000)]
bonding:record primary when modify it via sysfs

If we modify primary via sysfs and it is not a valid slave,
we should record it for future use, and this behavior is the same with
bond_check_params().

Signed-off-by: Weiping Pan <wpan@redhat.com>
Acked-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://1984.lsi.us.es/net
David S. Miller [Tue, 12 Jun 2012 22:18:15 +0000 (15:18 -0700)]
Merge branch 'master' of git://1984.lsi.us.es/net

12 years agoALSA: HDA: Pin fixup for Zotac Z68 motherboard
David Henningsson [Tue, 12 Jun 2012 11:15:12 +0000 (13:15 +0200)]
ALSA: HDA: Pin fixup for Zotac Z68 motherboard

Pin 0x1b was connected to the front panel connector, which according to
the HDA standard should contain a mic and a headphone. In this case,
the headphone was listed as "line out" by BIOS.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/993162
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: compress_core: cleanup pointers on stop
Vinod Koul [Tue, 12 Jun 2012 10:46:18 +0000 (16:16 +0530)]
ALSA: compress_core: cleanup pointers on stop

as the start can be called after stop again, we need to reset state

Signed-off-by: Namarta Kohli <namartax.kohli@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: compress_core: don't wake up on pause
Vinod Koul [Tue, 12 Jun 2012 10:46:17 +0000 (16:16 +0530)]
ALSA: compress_core: don't wake up on pause

during pause the core should maintain the status-quo on the device and pointers
and not wake up. If app needs it should call DROP explcitly.

Signed-off-by: Namarta Kohli <namartax.kohli@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Tue, 12 Jun 2012 15:48:17 +0000 (18:48 +0300)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "As per your -rc2 announce, this is small and urgent only,

  The radeon one is for a regression in 3.4 so we need this one in your
  tree so we can send the stable one out, code in 3.4 broke some old
  userspaces.  The max props increase fixes spew being seen on a few
  machines.  And a ttm regression to fix some accounting issues that
  affect vmwgfx."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/ttm: Fix buffer object metadata accounting regression v2
  drm: increase DRM_OBJECT_MAX_PROPERTY to 24
  drm/radeon: fix tiling and command stream checking on evergreen v3

12 years agoMerge tag 'writeback-lock-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux
Linus Torvalds [Tue, 12 Jun 2012 15:28:58 +0000 (18:28 +0300)]
Merge tag 'writeback-lock-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux

Pull writeback locking fix from Wu Fengguang:
 "fix unbalanced wb->list_lock in 3.5-rc1"

* tag 'writeback-lock-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
  writeback: Fix lock imbalance in writeback_sb_inodes()

12 years agodrm/ttm: Fix buffer object metadata accounting regression v2
Thomas Hellstrom [Tue, 12 Jun 2012 11:28:42 +0000 (13:28 +0200)]
drm/ttm: Fix buffer object metadata accounting regression v2

A regression was introduced in the 3.3 rc series, commit
"drm/ttm: simplify memory accounting for ttm user v2",
causing the metadata of buffer objects created using the ttm_bo_create()
function to be accounted twice.
That causes massive leaks with the vmwgfx driver running for example
SpecViewperf Catia-03 test 2, eventually killing the app.

Furthermore, the same commit introduces a regression where
metadata accounting is leaked if a buffer object is
initialized with an illegal size. This is also fixed with this commit.

v2: Fixed an error path and removed an unused variable.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: increase DRM_OBJECT_MAX_PROPERTY to 24
Paulo Zanoni [Tue, 12 Jun 2012 14:27:01 +0000 (11:27 -0300)]
drm: increase DRM_OBJECT_MAX_PROPERTY to 24

Before Kernel 3.5, no one was checking for the return value of
drm_connector_attach_property, so we never noticed that we were unable
to create some properties. Commit "drm: WARN() when
drm_connector_attach_property fails" added a WARN when we fail to
create a property, and the transition from "connector properties" to
"object properties" changed the warning message a little bit.

On i915 machines with many TV connectors we hit the maximum number of
properties (since each TV connector uses a lot of properties), so we
get a few backtraces in our logs. This commit increases the maximum
number of properties to 24 hoping we'll have enough room for
everybody.

Chris suggested that we convert this code to "lists", but I believe
this conversion can come after we make sure people's dmesgs are not
spammed by our driver.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reported-by: Dave Jones <davej@redhat.com>
Tested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agopinctrl: pinctrl-mxs: set platform driver data to NULL at errpath and at unregister
Devendra Naga [Sat, 9 Jun 2012 12:02:31 +0000 (17:32 +0530)]
pinctrl: pinctrl-mxs: set platform driver data to NULL at errpath and at unregister

clear the platform data pointer when mxs_pinctrl_probe_dt fails,
and also before the unregistering with pinctrl subsystem.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agopinctrl: pinctrl-mxs: Take care of frees if the kzalloc fails
Devendra Naga [Sat, 9 Jun 2012 12:01:23 +0000 (17:31 +0530)]
pinctrl: pinctrl-mxs: Take care of frees if the kzalloc fails

if there is no purecfg , the group pointer is allocated using kzalloc and if it
fails to allocate, we wont free the new_map,

if config is true, we call kmemdup and if it
fails to do so we wont free the allocated group if there is no purecfg.

fix this by doing the frees of new_map pointer and group pointers.

Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agopinctrl: pinctrl-imx: fix incorrect debug message of maps
Dong Aisheng [Fri, 8 Jun 2012 13:33:12 +0000 (21:33 +0800)]
pinctrl: pinctrl-imx: fix incorrect debug message of maps

After create config map, the new_map pointer becomes point to
PIN_MAP_TYPE_CONFIGS_PIN map rather than PIN_MAP_TYPE_MUX_GROUP map any more.
Thus using new_map pointer to display the MUX_GROUP info is not correct.
Using map pointer instead to show the correct MUX_GROUP map info.
Original the debug message is:
imx6q-pinctrl 20e0000.iomuxc: maps: function Yp group MX6Q_PAD_SD3_CMD num 12
After fix it is:
imx6q-pinctrl 20e0000.iomuxc: maps: function usdhc3 group usdhc3grp-1 num 11

Reported-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agopinctrl: pinctrl-imx: free if of_get_parent fails to get the parent node
Devendra Naga [Thu, 7 Jun 2012 16:49:26 +0000 (22:19 +0530)]
pinctrl: pinctrl-imx: free if of_get_parent fails to get the parent node

of_get_parent can return null if no parent node found, so the allocated new_map
should be freed.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agopinctrl: pinctrl-imx: free allocated pinctrl_map structure only once and use kernel...
Devendra Naga [Fri, 8 Jun 2012 19:22:11 +0000 (00:52 +0530)]
pinctrl: pinctrl-imx: free allocated pinctrl_map structure only once and use kernel facilities for IMX_PMX_DUMP

a) as we allocate the pinctrl_map structure at imx_dt_node_to_map at  line 167, anyway
   if its an element, or a num_elements * (sizeof(type)) elements allocated to one single
   pointer must be freed only once.

CASE. A)

as new_map is not moved and allocated like,

for (i = 0; i < MAX_ELEMS; i++) {
    new_map[i] = kmalloc(numelems * size, GFP_KERNEL);
}

its freed as

for (i = 0; i < MAX_ELEMS; i++) {
    kfree(new_map[i]);
}

CASE. B)
and its allocated like
        new_map = kmalloc(numelems * size, GFP_KERNEL);

it just needs kfree not as case A's.

b) use KERN_DEBUG facility for the IMX_PMX_DUMP macro.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agopinctrl: nomadik: fix up typo
Linus Walleij [Tue, 12 Jun 2012 10:43:06 +0000 (12:43 +0200)]
pinctrl: nomadik: fix up typo

Commit a60b57eddaa8af6c02cf7bbeb58ebf82881f08ac
"drivers/gpio: gpio-nomadik: Add support for irqdomains"
changed GPIO offset calculations to have this form:
(gpio % NMK_GPIO_PER_CHIP) except in this one place for
setting sleep mode, where the conversion was all wrong, and
instead mod:ing the GPIO with the IRQ base which does not
make any sense.

So fix this up so we can use sleepmode.

Reviewed-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
12 years agopinctrl: nomadik: add clk_prepare() call
Linus Walleij [Wed, 6 Jun 2012 20:50:41 +0000 (22:50 +0200)]
pinctrl: nomadik: add clk_prepare() call

We now strictly require clk_prepare() calls to be issued before
any clk_enable() calls.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Linus Torvalds [Tue, 12 Jun 2012 04:39:58 +0000 (07:39 +0300)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu

Pull m68knommu from Greg Ungerer:
 "This contains five fixes.  Four fix build problems introduced by
  recent clean up and merging of the m68k timer and ptrace code.  The
  other fixes the 528x ColdFire CPU QSPI base address definition, missed
  in the ColdFire QSPI cleanup."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68k: make syscall_trace_enter/leave exist for non-MMU classic m68k types
  m68knommu: fix 68360 local setting of timer interrupt handler
  m68knommu: fix 68328 local setting of timer interrupt handler
  m68k: fix inclusion of arch_gettimeoffset for non-MMU 68k classic CPU types
  m68knommu: m528x qspi definition fix

12 years agoexofs: fix sparse non-ANSI function warning
Randy Dunlap [Mon, 11 Jun 2012 23:46:55 +0000 (16:46 -0700)]
exofs: fix sparse non-ANSI function warning

Fix sparse non-ANSI function warning:

  fs/exofs/sys.c:112:28: warning: non-ANSI function declaration of function 'exofs_sysfs_dbg_print'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoleds: Make LEDS_ASIC3 and LEDS_RENESAS_TPU depend on LEDS_CLASS=y
Axel Lin [Fri, 8 Jun 2012 23:41:42 +0000 (07:41 +0800)]
leds: Make LEDS_ASIC3 and LEDS_RENESAS_TPU depend on LEDS_CLASS=y

Otherwise, I got below build error when CONFIG_LEDS_CLASS=m.

  LD      init/built-in.o
drivers/built-in.o: In function `asic3_led_probe':
clkdev.c:(.devinit.text+0x4680): undefined reference to `led_classdev_register'
drivers/built-in.o: In function `r_tpu_probe':
clkdev.c:(.devinit.text+0x4838): undefined reference to `led_classdev_register'
drivers/built-in.o: In function `asic3_led_remove':
clkdev.c:(.devexit.text+0x564): undefined reference to `led_classdev_unregister'
drivers/built-in.o: In function `r_tpu_remove':
clkdev.c:(.devexit.text+0x5a0): undefined reference to `led_classdev_unregister'
make: *** [vmlinux] Error 1

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
12 years agoleds: fixed a coding style issue.
Jeffrin Jose [Sun, 3 Jun 2012 12:11:52 +0000 (20:11 +0800)]
leds: fixed a coding style issue.

Fixed a coding style issue relating to trailing
white space error found by checkpatch.pl tool in drivers/leds/led-class.c

Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
12 years agoleds: don't disable blinking when writing the same value to delay_on or delay_off
Rafal Prylowski [Mon, 28 May 2012 15:35:54 +0000 (23:35 +0800)]
leds: don't disable blinking when writing the same value to delay_on or delay_off

Function led_set_software_blink() assumes that blink timer is still running,
but commit 488bc35bf40df89d37486c1826b178a2fba36ce7 introduced disabling
of blink timer before each call to led_set_software_blink().

Correct led_software_blink():
1) remove protection against reprogramming blink timer to the same values,
   because it only disables blinking now,
2) remove unnecessary call to led_stop_software_blink().

Signed-off-by: Rafal Prylowski <prylowski@metasoft.pl>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
12 years agox86: kvmclock: remove check_and_clear_guest_paused warning
Marcelo Tosatti [Tue, 12 Jun 2012 02:18:33 +0000 (23:18 -0300)]
x86: kvmclock: remove check_and_clear_guest_paused warning

CPU offline path calls the hrtimer interrupt handler with interrupts
disabled, without touching preempt_count, triggering this warning.

Remove the warning since it is supposed to be used from hrtimer
interrupt context only.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
12 years agom68k: make syscall_trace_enter/leave exist for non-MMU classic m68k types
Greg Ungerer [Wed, 23 May 2012 03:43:52 +0000 (13:43 +1000)]
m68k: make syscall_trace_enter/leave exist for non-MMU classic m68k types

The assembler entry code calls directly to the syscall_trace_enter() and
syscall_trace_leave() functions. But currently they are conditionaly
compiled out for the non-MMU classic m68k CPU types (so 68328 for example),
resulting in a link error:

      LD      vmlinux
    arch/m68k/platform/68328/built-in.o: In function `do_trace':
    (.text+0x1c): undefined reference to `syscall_trace_enter'
    arch/m68k/platform/68328/built-in.o: In function `do_trace':
    (.text+0x4c): undefined reference to `syscall_trace_leave'

Change the conditional check that includes these functions to be true for
the !defined(CONFIG_MMU) case as well.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68knommu: fix 68360 local setting of timer interrupt handler
Greg Ungerer [Wed, 23 May 2012 03:32:55 +0000 (13:32 +1000)]
m68knommu: fix 68360 local setting of timer interrupt handler

Compiling for 68360 based targets fails with:

    arch/m68k/platform/68360/config.c: In function ‘hw_tick’:
    arch/m68k/platform/68360/config.c:55:2: error: implicit declaration of function ‘arch_timer_interrupt’
    arch/m68k/platform/68360/config.c: At top level:
    arch/m68k/platform/68360/config.c:64:6: error: conflicting types for ‘hw_timer_init’
    arch/m68k/include/asm/machdep.h:36:13: note: previous declaration of ‘hw_timer_init’ was here

Changes made to hw_timer_init() didn't get updated in the 68328 timer code.
So process and call the "handler" arg that is now passed into that
hw_timer_init() function.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68knommu: fix 68328 local setting of timer interrupt handler
Greg Ungerer [Wed, 23 May 2012 03:27:18 +0000 (13:27 +1000)]
m68knommu: fix 68328 local setting of timer interrupt handler

Compiling for 68328 based targets fails with:

    arch/m68k/platform/68328/timers.c: In function ‘hw_tick’:
    arch/m68k/platform/68328/timers.c:65:2: error: implicit declaration of function ‘arch_timer_interrupt’
    arch/m68k/platform/68328/timers.c: At top level:
    arch/m68k/platform/68328/timers.c:102:6: error: conflicting types for ‘hw_timer_init’
    arch/m68k/include/asm/machdep.h:36:13: note: previous declaration of ‘hw_timer_init’ was here

Changes made to hw_timer_init() didn't get updated in the 68328 timer code.
So process and call the "handler" arg that is now passed into that
hw_timer_init() function.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68k: fix inclusion of arch_gettimeoffset for non-MMU 68k classic CPU types
Greg Ungerer [Wed, 23 May 2012 01:32:45 +0000 (11:32 +1000)]
m68k: fix inclusion of arch_gettimeoffset for non-MMU 68k classic CPU types

When building for non-MMU based classic 68k CPU types (like the 68328 for
example) you get a compilation error:

  CC      arch/m68k/kernel/time.o
arch/m68k/kernel/time.c:91:5: error: redefinition of ‘arch_gettimeoffset’
include/linux/time.h:145:19: note: previous definition of ‘arch_gettimeoffset’ was here

The arch_gettimeoffset() code is included when building for these CPU types,
but it shouldn't be. Those machine types do not have
CONFIG_ARCH_USES_GETTIMEOFFSET set.

The fix is simply to conditionally include the arch_gettimeoffset() code on
that same config setting that specifies its use or not.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68knommu: m528x qspi definition fix
Steven King [Sat, 5 May 2012 20:40:44 +0000 (13:40 -0700)]
m68knommu: m528x qspi definition fix

The consolidation of the qspi code missed a definition for 528x.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agotilegx network driver: initial support
Chris Metcalf [Thu, 7 Jun 2012 10:45:02 +0000 (10:45 +0000)]
tilegx network driver: initial support

This change adds support for the tilegx network driver based on the
GXIO IORPC support in the tilegx software stack, using the on-chip
mPIPE packet processing engine.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Apply short DMA frag workaround to 5906
Matt Carlson [Thu, 7 Jun 2012 12:56:54 +0000 (12:56 +0000)]
tg3: Apply short DMA frag workaround to 5906

5906 devices also need the short DMA fragment workaround.  This patch
makes the necessary change.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Tested-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: stmmac: Fix clock en-/disable calls
Stefan Roese [Thu, 7 Jun 2012 23:21:05 +0000 (23:21 +0000)]
net: stmmac: Fix clock en-/disable calls

clk_{un}prepare is mandatory for platforms using common clock framework.
Since these drivers are used by SPEAr platform, which supports common
clock framework, add clk_{un}prepare() support for them. Otherwise
the clocks are not correctly en-/disabled and ethernet support doesn't
work.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Viresh Kumar <viresh.linux@gmail.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agolpc_eth: fix tx completion
Eric Dumazet [Mon, 11 Jun 2012 07:21:36 +0000 (07:21 +0000)]
lpc_eth: fix tx completion

__lpc_handle_xmit() has two bugs :

1) It can leak skbs in case TXSTATUS_ERROR is set

2) It can wake up txqueue while no slot was freed.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Roland Stigge <stigge@antcom.de>
Tested-by: Roland Stigge <stigge@antcom.de>
Cc: Kevin Wells <kevin.wells@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agolpc_eth: add missing ndo_change_mtu()
Eric Dumazet [Sun, 10 Jun 2012 23:24:00 +0000 (23:24 +0000)]
lpc_eth: add missing ndo_change_mtu()

lpc_eth does a copy of transmitted skbs to DMA area, without checking
skb lengths, so can trigger buffer overflows :

memcpy(pldat->tx_buff_v + txidx * ENET_MAXF_SIZE, skb->data, len);

One way to get bigger skbs is to allow MTU changes above the 1500 limit.

Calling eth_change_mtu() in ndo_change_mtu() makes sure this cannot
happen.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Kevin Wells <kevin.wells@nxp.com>
Acked-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Mon, 11 Jun 2012 18:36:48 +0000 (14:36 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem

12 years agoALSA: hda - Fix detection of Creative SoundCore3D controllers
Takashi Iwai [Mon, 11 Jun 2012 13:51:54 +0000 (15:51 +0200)]
ALSA: hda - Fix detection of Creative SoundCore3D controllers

The PCI ID entries of Creative SoundCore3D HD-audio controllers should
be before the wildcard for vendor = Creative.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Mon, 11 Jun 2012 13:31:52 +0000 (16:31 +0300)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:
 "This push fixes an unaligned fault on x86-32 with aesni-intel and an
  RNG failure with atmel-rng (repeated bits)."

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: aesni-intel - fix unaligned cbc decrypt for x86-32
  hwrng: atmel-rng - fix race condition leading to repeated bits

12 years agodummy: fix rcu_sched self-detected stalls
Eric Dumazet [Sun, 10 Jun 2012 21:11:57 +0000 (21:11 +0000)]
dummy: fix rcu_sched self-detected stalls

Trying to "modprobe dummy numdummies=30000" triggers :

INFO: rcu_sched self-detected stall on CPU { 8} (t=60000 jiffies)

After this splat, RTNL is locked and reboot is needed.

We must call cond_resched() to avoid this, even holding RTNL.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoclocksource: sh_tmu: Use clockevents_config_and_register().
Paul Mundt [Mon, 11 Jun 2012 08:10:16 +0000 (17:10 +0900)]
clocksource: sh_tmu: Use clockevents_config_and_register().

This switches over to the now exported clockevents_config() and
clockevents_config_and_register() helpers. This knocks off a
long-standing TMU TODO item.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agonet: Reorder initialization in ip_route_output to fix gcc warning
Roland Dreier [Sun, 10 Jun 2012 20:05:24 +0000 (20:05 +0000)]
net: Reorder initialization in ip_route_output to fix gcc warning

If I build with W=1, for every file that includes <net/route.h>, I get the warning

    include/net/route.h: In function 'ip_route_output':
    include/net/route.h:135:3: warning: initialized field overwritten [-Woverride-init]
    include/net/route.h:135:3: warning: (near initialization for 'fl4') [-Woverride-init]

(This is with "gcc (Debian 4.6.3-1) 4.6.3")

A fix seems pretty trivial: move the initialization of .flowi4_tos
earlier.  As far as I can tell, this has no effect on code generation.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoclocksource: sh_tmu: Convert timer lock to raw spinlock.
Paul Mundt [Fri, 25 May 2012 04:39:09 +0000 (13:39 +0900)]
clocksource: sh_tmu: Convert timer lock to raw spinlock.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoclocksource: sh_mtu2: Convert timer lock to raw spinlock.
Paul Mundt [Fri, 25 May 2012 04:38:54 +0000 (13:38 +0900)]
clocksource: sh_mtu2: Convert timer lock to raw spinlock.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoclocksource: sh_cmt: Convert timer lock to raw spinlock.
Paul Mundt [Fri, 25 May 2012 04:36:43 +0000 (13:36 +0900)]
clocksource: sh_cmt: Convert timer lock to raw spinlock.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agobug.h: need linux/kernel.h for TAINT_WARN.
Paul Mundt [Mon, 11 Jun 2012 05:29:58 +0000 (14:29 +0900)]
bug.h: need linux/kernel.h for TAINT_WARN.

asm-generic/bug.h uses taint flags that are only defined in
linux/kernel.h, resulting in build failures on platforms that
don't include linux/kernel.h some other way:

        arch/sh/include/asm/thread_info.h:172:2: error: 'TAINT_WARN' undeclared (first use in this function)

Caused by commit edd63a2763bd ("set_restore_sigmask() is never called
without SIGPENDING (and never should be)").

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoMerge tag 'regmap-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Linus Torvalds [Mon, 11 Jun 2012 03:57:43 +0000 (06:57 +0300)]
Merge tag 'regmap-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull regmap fixes from Mark Brown:
 "Nothing too exciting - a cleanup for debugfs in error handling and a
  fix for the padding (which has only just acquired real use) and
  exporting a function that's supposed to be usable by drivers."

* tag 'regmap-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: Export regmap_reinit_cache()
  regmap: Fix the size calculation for map->format.buf_size
  regmap: clean up debugfs if regmap_init fails

12 years agoMerge tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Linus Torvalds [Mon, 11 Jun 2012 03:53:48 +0000 (06:53 +0300)]
Merge tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A couple of small fixes, plus larger fixes for the gpio-regulator
  driver the most recent changes for which had apparently not been
  tested at all in -next (or elsewhere from the looks of it)."

* tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: core: Properly handle the case min_uV < rdev->desc->min_uV in map_voltage_linear
  regulator: max8649: fix missing regmap in rdev
  regulator: gpio-regulator: populate selector from set_voltage
  regulator: gpio-regulator: Fix finding of smallest value
  regulator: gpio-regulator: do not pass drvdata pointer as reference
  regulator: anatop: Use correct __devexit_p annotation
  regulator: palmas: Fix wrong kfree calls

12 years agovirtio-net: fix a race on 32bit arches
Eric Dumazet [Tue, 5 Jun 2012 22:35:24 +0000 (22:35 +0000)]
virtio-net: fix a race on 32bit arches

commit 3fa2a1df909 (virtio-net: per cpu 64 bit stats (v2)) added a race
on 32bit arches.

We must use separate syncp for rx and tx path as they can be run at the
same time on different cpus. Thus one sequence increment can be lost and
readers spin forever.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor8169: avoid NAPI scheduling delay.
françois romieu [Sat, 9 Jun 2012 10:53:16 +0000 (10:53 +0000)]
r8169: avoid NAPI scheduling delay.

While reworking the r8169 driver a few months ago to perform the
smallest amount of work in the irq handler, I took care of avoiding
any irq mask register operation in the slow work dedicated user
context thread. The slow work thread scheduled an extra round of NAPI
work which would ultimately set the irq mask register as required,
thus keeping such irq mask operations in the NAPI handler.
It would eventually race with the irq handler and delay NAPI execution
for - assuming no further irq - a whole ksoftirqd period. Mildly a
problem for rare link changes or corner case PCI events.

The race was always lost after the last bh disabling lock had been
removed from the work thread and people started wondering where those
pesky "NOHZ: local_softirq_pending 08" messages came from.

Actually the irq mask register _can_ be set up directly in the slow
work thread.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Reported-by: Dave Jones <davej@redhat.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodrm/radeon: fix tiling and command stream checking on evergreen v3
Jerome Glisse [Sat, 9 Jun 2012 14:57:41 +0000 (10:57 -0400)]
drm/radeon: fix tiling and command stream checking on evergreen v3

Fix regresson since the introduction of command stream checking on
evergreen (thread referenced below). Issue is cause by ddx allocating
bo with formula width*height*bpp while programming the GPU command
stream with ALIGN(height, 8). In some case (where page alignment does
not hide the extra size bo should be according to height alignment)
the kernel will reject the command stream.

This patch reprogram the command stream to slice - 1 (slice is
a derivative value from height) which avoid rejecting the command
stream while keeping the value of command stream checking from a
security point of view.

This patch also fix wrong computation of layer size for 2D tiled
surface. Which should fix issue when 2D color tiling is enabled.
This dump the radeon KMS_DRIVER_MINOR so userspace can know if
they are on a fixed kernel or not.

https://lkml.org/lkml/2012/6/3/80
https://bugs.freedesktop.org/show_bug.cgi?id=50892
https://bugs.freedesktop.org/show_bug.cgi?id=50857

!!! STABLE need a custom version of this patch for 3.4 !!!

v2: actually bump the minor version and add comment about stable
v3: do compute the height the ddx was trying to use

[airlied: drop left over debug]

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agonet: Make linux/tcp.h C++ friendly (trivial)
Paul Pluzhnikov [Sat, 9 Jun 2012 14:53:03 +0000 (07:53 -0700)]
net: Make linux/tcp.h C++ friendly (trivial)

I originally sent this patch to <trivial@kernel.org>, but Jiri Kosina did
not feel that this is fully appropriate for the trivial tree.

Using linux/tcp.h from C++ results in:

cat t.cc
#include <linux/tcp.h>
int main() { }

g++ -c t.cc

In file included from t.cc:1:
/usr/include/linux/tcp.h:72: error: '__u32 __fswab32(__u32)' cannot appear in a constant-expression
/usr/include/linux/tcp.h:72: error: a function call cannot appear in a constant-expression
...

Attached trivial patch fixes this problem.

Tested:
- the t.cc above compiles with g++ and
- the following program generates the same output before/after
  the patch:

#include <linux/tcp.h>
#include <stdio.h>

int main ()
{
#define P(a) printf("%s: %08x\n", #a, (int)a)
 P(TCP_FLAG_CWR);
 P(TCP_FLAG_ECE);
 P(TCP_FLAG_URG);
 P(TCP_FLAG_ACK);
 P(TCP_FLAG_PSH);
 P(TCP_FLAG_RST);
 P(TCP_FLAG_SYN);
 P(TCP_FLAG_FIN);
 P(TCP_RESERVED_BITS);
 P(TCP_DATA_OFFSET);
#undef P
 return 0;
}

Signed-off-by: Paul Pluzhnikov <ppluzhnikov@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovga_switcheroo: Enable/disable audio clients at the right time
Takashi Iwai [Sat, 9 Jun 2012 06:46:42 +0000 (08:46 +0200)]
vga_switcheroo: Enable/disable audio clients at the right time

The audio clients have to be disabled before disabling the VGA and
switching.  Similarly, enabling the audio client should be done at
last.  Otherwise the audio-side operation stalls, eventually leading
to Oops or lockups.

Tested-by: Jörg-Volker Peetz <jvpeetz@web.de>
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agonetdev: fix drivers/net/phy/ kernel-doc warnings
Randy Dunlap [Fri, 8 Jun 2012 14:07:19 +0000 (14:07 +0000)]
netdev: fix drivers/net/phy/ kernel-doc warnings

Fix kernel-doc warnings in drivers/net/phy:

Warning(drivers/net/phy/mdio_bus.c:109): No description found for parameter 'mdio_bus_np'
Warning(drivers/net/phy/mdio_bus.c:109): Excess function parameter 'mdio_np' description in 'of_mdio_find_bus'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/core: fix kernel-doc warnings
Randy Dunlap [Fri, 8 Jun 2012 14:01:44 +0000 (14:01 +0000)]
net/core: fix kernel-doc warnings

Fix kernel-doc warnings in net/core:

Warning(net/core/skbuff.c:3368): No description found for parameter 'delta_truesize'
Warning(net/core/filter.c:628): No description found for parameter 'pfp'
Warning(net/core/filter.c:628): Excess function parameter 'sk' description in 'sk_unattached_filter_create'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoLinux 3.5-rc2 v3.5-rc2
Linus Torvalds [Sat, 9 Jun 2012 01:40:09 +0000 (18:40 -0700)]
Linux 3.5-rc2

12 years agowriteback: Fix lock imbalance in writeback_sb_inodes()
Jan Kara [Fri, 8 Jun 2012 15:07:36 +0000 (17:07 +0200)]
writeback: Fix lock imbalance in writeback_sb_inodes()

Fix bug introduced by 169ebd90.  We have to have wb_list_lock locked when
restarting writeback loop after having waited for inode writeback.

Bug description by Ted Tso:

  I can reproduce this fairly easily by using ext4 w/o a journal, running
  under KVM with 1024megs memory, with fsstress (xfstests #13):

  [   45.153294] =====================================
  [   45.154784] [ BUG: bad unlock balance detected! ]
  [   45.155591] 3.5.0-rc1-00002-gb22b1f1 #124 Not tainted
  [   45.155591] -------------------------------------
  [   45.155591] flush-254:16/2499 is trying to release lock (&(&wb->list_lock)->rlock) at:
  [   45.155591] [<c022c3da>] writeback_sb_inodes+0x160/0x327
  [   45.155591] but there are no more locks to release!

Reported-by: Theodore Ts'o <tytso@mit.edu>
Tested-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
12 years agomm, oom: fix badness score underflow
David Rientjes [Fri, 8 Jun 2012 20:21:26 +0000 (13:21 -0700)]
mm, oom: fix badness score underflow

If the privileges given to root threads (3% of allowable memory) or a
negative value of /proc/pid/oom_score_adj happen to exceed the amount of
rss of a thread, its badness score overflows as a result of commit
a7f638f999ff ("mm, oom: normalize oom scores to oom_score_adj scale only
for userspace").

Fix this by making the type signed and return 1, meaning the thread is
still eligible for kill, if the value is negative.

Reported-by: Dave Jones <davej@redhat.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>