4 years agoBtrfs: remove ourselves from the cluster list under lock.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: remove ourselves from the cluster list under lock.

suse-commit: 67c5f24fcde73e4547a1f823b7991aa55434ec3f

4 years agoBtrfs: do not clear our orphan item runtime flag on eexist.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: do not clear our orphan item runtime flag on eexist.

suse-commit: 13e2d76fe9317361b15c95f759b4dd31d1b58d5b

4 years agoBtrfs: fix printing of non NULL terminated string.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: fix printing of non NULL terminated string.

suse-commit: f7a5782ce0748f208f326d206e2607a5949054ef

4 years agoBtrfs: fix memory leak of orphan block rsv.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: fix memory leak of orphan block rsv.

suse-commit: bc92559770b4fb48f466a8110652f054354a0809

4 years agoBtrfs: don't miss inode ref items in BTRFS_IOC_INO_LOOKUP.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: don't miss inode ref items in BTRFS_IOC_INO_LOOKUP.

suse-commit: 39e82b62134b19c089c6993bdee4c3a124361d5f

4 years agoBtrfs: add missing error code to BTRFS_IOC_INO_LOOKUP handler.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: add missing error code to BTRFS_IOC_INO_LOOKUP handler.

suse-commit: a15a7e6ca5d3d61778789b6f228c720f6583ff01

4 years agoBtrfs: move btrfs_free_qgroup_config() out of spin_lock and
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: move btrfs_free_qgroup_config() out of spin_lock and
fix comments.

suse-commit: 2e98cc8da680e6f31fd2af451c504671741b4dab

4 years agoBtrfs: fix oops when writing dirty qgroups to disk.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: fix oops when writing dirty qgroups to disk.

suse-commit: d3af8f6465c9657e1a5aa3fd792486c39590a89c

4 years agoBtrfs: fix heavy delalloc related deadlock.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: fix heavy delalloc related deadlock.

suse-commit: f287ca3bce6132b87613f756248eb7a0efc34f76

4 years agoBtrfs: fix the error handling wrt orphan items.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: fix the error handling wrt orphan items.

suse-commit: 669dd4f8efb30c93a7200514db76bb5500b80537

4 years agoBtrfs: don't allow a subvol to be deleted if it is the default
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: don't allow a subvol to be deleted if it is the default

suse-commit: bd602298f46b080ebc37588bb9ac5461f8f9471d

4 years agoBtrfs: skip subvol entries when checking if we've created a
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: skip subvol entries when checking if we've created a
dir already.

suse-commit: f59c2633aaca8f8f7dcdda59eff18262b242b1e7

4 years agoBtrfs: fix possible memory leak in find_parent_nodes().
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: fix possible memory leak in find_parent_nodes().

suse-commit: e23b82b6c9d6bd9a66d4bb0ac8ced791485ba033

4 years agoBtrfs: return ENOSPC when target space is full.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: return ENOSPC when target space is full.

suse-commit: 2b8c18577bdb664e32428a8e8e521e275f21a1e8

4 years agoBtrfs: don't ignore errors from btrfs_run_delayed_items.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: don't ignore errors from btrfs_run_delayed_items.

suse-commit: 32fa449f7692a081122ecddfc501f1017e1af787

4 years agoBtrfs: fix inode leak on kmalloc failure in tree-log.c.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: fix inode leak on kmalloc failure in tree-log.c.

suse-commit: 75c4b44b7ad15bd76ec64255d9e7dc1d48c35132

4 years agoBtrfs: stop using GFP_ATOMIC when allocating rewind ebs.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: stop using GFP_ATOMIC when allocating rewind ebs.

suse-commit: efb2fceaf0635ecf009c69c14c57dcd161e872e2

4 years agoBtrfs: deal with enomem in the rewind path.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: deal with enomem in the rewind path.

suse-commit: 511284b4ccdd44c83f10cd79d67309ae7c5222b0

4 years agoBtrfs: check our parent dir when doing a compare send.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: check our parent dir when doing a compare send.

suse-commit: f5d9eb7f77becf5bc3758072c26aaf8c40f6a9f3

4 years agoBtrfs: handle errors when doing slow caching.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: handle errors when doing slow caching.

suse-commit: e5cab417982c6afc4a955f9a3a034fe37fc52ebc

4 years agoBtrfs: add missing error handling to read_tree_block.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: add missing error handling to read_tree_block.

suse-commit: 7afb2f1aedea82b780fe40fd08ff8158142caa54

4 years agoBtrfs: add missing error check to find_parent_nodes.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: add missing error check to find_parent_nodes.

suse-commit: a5e9f4b62b74de106a60174a16d088750504516a

4 years agoBtrfs: don't bug_on when we fail when cleaning up transactions.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: don't bug_on when we fail when cleaning up transactions.

suse-commit: aefe6c558a456566b8ade19470622732286068d2

4 years agoBtrfs: change how we queue blocks for backref checking.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: change how we queue blocks for backref checking.

suse-commit: bfba7007f5c1cba9fafa72d8ee68fa7feb51fcad

4 years agoBtrfs: add missing mounting options in btrfs_show_options().
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: add missing mounting options in btrfs_show_options().

suse-commit: 470fcab1902d1b8a8aed0a7310a30f131009ac67

4 years agoBtrfs: use u64 for subvolid when parsing mount options.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: use u64 for subvolid when parsing mount options.

suse-commit: 1401cc40faf3dee90629c45fee2357e869b60bcc

4 years agoBtrfs: don't bother autodefragging if our root is going away.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: don't bother autodefragging if our root is going away.

suse-commit: eba9f64772b5027b52aaf70240f76f92258abf56

4 years agoBtrfs: cleanup reloc roots properly on error.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: cleanup reloc roots properly on error.

suse-commit: 63c26a5f3c83ce023804821cffdaea1285f9f198

4 years agoBtrfs: reset ret in record_one_backref.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: reset ret in record_one_backref.

suse-commit: e9d9b8205595c9ad93d2999dcff2203b463ed87e

4 years agobtrfs: fix get set label blocking against balance.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
btrfs: fix get set label blocking against balance.

suse-commit: 72c7dc161633ec3c3c94607fe718d6419ef016b2

4 years agoBtrfs: set qgroup_ulist to be null after calling ulist_free().
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: set qgroup_ulist to be null after calling ulist_free().

suse-commit: c385f3a43c950b55d526b1d4ecaab0b7710f7528

4 years agoBtrfs: add missing error checks to add_data_references.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: add missing error checks to add_data_references.

suse-commit: f610b1aba5964fd3ca508a428582ef8ca38c88a4

4 years agoBtrfs: Release uuid_mutex for shrink during device delete.
David Sterba [Mon, 16 Sep 2013 16:40:22 +0000 (18:40 +0200)]
Btrfs: Release uuid_mutex for shrink during device delete.

suse-commit: 27b8f470f0b54757d46e68964c9c54618771f318

4 years agoLinux 3.11.1.
Jiri Slaby [Sat, 14 Sep 2013 18:49:04 +0000 (20:49 +0200)]
Linux 3.11.1.

suse-commit: 138332147e46f04b20c7ed57069cabd1f3ad5cc8

4 years agoLinux 3.11.1
Greg Kroah-Hartman [Sat, 14 Sep 2013 14:07:01 +0000 (07:07 -0700)]
Linux 3.11.1

4 years agomwifiex: do not create AP and P2P interfaces upon driver loading
Bing Zhao [Mon, 19 Aug 2013 23:10:21 +0000 (16:10 -0700)]
mwifiex: do not create AP and P2P interfaces upon driver loading

commit 1211c961170cedb21c30d5bb7e2033c8720b38db upstream.

Bug 60747 - 1286:2044 [Microsoft Surface Pro]
    Marvell 88W8797 wifi show 3 interface under network

This issue was also reported previously by OLPC and some folks from
the community.

There are 3 network interfaces with different types being created
when mwifiex driver is loaded:

1. mlan0 (infra. STA)
2. uap0 (AP)
3. p2p0 (P2P_CLIENT)

The Network Manager attempts to use all 3 interfaces above without
filtering the managed interface type. As the result, 3 identical
interfaces are displayed under network manager. If user happens to
click on an entry under which its interface is uap0 or p2p0, the
association will fail.

Work around it by removing the creation of AP and P2P interfaces
at driver loading time. These interfaces can be added with 'iw' or
other applications manually when they are needed.

Signed-off-by: Bing Zhao <>
Signed-off-by: Avinash Patil <>
Signed-off-by: John W. Linville <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agodrivers/rtc/rtc-max77686.c: Fix wrong register
Sangjung Woo [Wed, 11 Sep 2013 21:24:21 +0000 (14:24 -0700)]
drivers/rtc/rtc-max77686.c: Fix wrong register

commit 1748cbf7f7c464593232cde914f5a103181a83b5 upstream.

Fix a read of the wrong register when checking whether the RTC timer has
reached the alarm time.

Signed-off-by: Sangjung Woo <>
Signed-off-by: Myugnjoo Ham <>
Reviewed-by: Jonghwa Lee <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Jonghwan Choi <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agocrypto: xor - Check for osxsave as well as avx in crypto/xor
John Haxby [Wed, 14 Aug 2013 15:23:18 +0000 (16:23 +0100)]
crypto: xor - Check for osxsave as well as avx in crypto/xor

commit edb6f29464afc65fc73767540b854abf63ae7144 upstream.

This affects xen pv guests with sufficiently old versions of xen and
sufficiently new hardware.  On such a system, a guest with a btrfs
root won't even boot.

Signed-off-by: John Haxby <>
Signed-off-by: Herbert Xu <>
Reported-by: Michael Marineau <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agoimx-drm: imx-drm-core: Export imx_drm_encoder_get_mux_id
Fabio Estevam [Fri, 28 Jun 2013 16:55:27 +0000 (13:55 -0300)]
imx-drm: imx-drm-core: Export imx_drm_encoder_get_mux_id

commit ea8d15832016b0d07a8121159904e6b1d21b5b8b upstream.

When building imx_v6_v7_defconfig with imx-drm drivers selected as modules, we
get the following build error:

ERROR: "imx_drm_encoder_get_mux_id" [drivers/staging/imx-drm/imx-ldb.ko] undefined!

Export the required function to avoid this problem.

Signed-off-by: Fabio Estevam <>
Acked-by: Sascha Hauer <>
Acked-by: Philipp Zabel <>
Cc: Guenter Roeck <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agoASoC: fsl: Fix module build
Fabio Estevam [Mon, 29 Jul 2013 21:37:32 +0000 (18:37 -0300)]
ASoC: fsl: Fix module build

commit 3f1a91aa25579ba5e7268a47a73d2a83e4802c62 upstream.

Building imx_v6_v7_defconfig with all audio drivers as modules results in
the folowing build error:

ERROR: "imx_pcm_fiq_init" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined!
ERROR: "imx_pcm_dma_init" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined!
ERROR: "imx_pcm_fiq_exit" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined!
ERROR: "imx_pcm_dma_exit" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined!
ERROR: "imx_pcm_dma_init" [sound/soc/fsl/snd-soc-fsl-ssi.ko] undefined!
ERROR: "imx_pcm_dma_exit" [sound/soc/fsl/snd-soc-fsl-ssi.ko] undefined!

Fix this by allowing SND_SOC_IMX_PCM_FIQ and SND_SOC_IMX_PCM_DMA to be also
built as modules and by using 'IS_ENABLED' to cover the module case.

Reported-by: Guennadi Liakhovetski <>
Signed-off-by: Fabio Estevam <>
Acked-by: Shawn Guo <>
Signed-off-by: Mark Brown <>
[Guenter Roeck: back-ported to 3.11]
Signed-off-by: Guenter Roeck <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agodrivers/misc/hpilo: Correct panic when an AUX iLO is detected
Mark Rusk [Wed, 14 Aug 2013 20:30:01 +0000 (15:30 -0500)]
drivers/misc/hpilo: Correct panic when an AUX iLO is detected

commit eefbc594abbb1b7e6e7eeadb65ae7c7538474210 upstream.

 Using an uninitialized variable 'devnum' after 'goto out;' was causing
 panic.  Just go ahead and return, we need to ignore AUX iLO devs.

 Oops: 0002 [#1] SMP
 RIP  [<ffffffffa033e270>] ilo_probe+0xec/0xe7c [hpilo]

Signed-off-by: Mark Rusk <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agoACPI / EC: Add ASUSTEK L4R to quirk list in order to validate ECDT
Lan Tianyu [Mon, 26 Aug 2013 02:19:18 +0000 (10:19 +0800)]
ACPI / EC: Add ASUSTEK L4R to quirk list in order to validate ECDT

commit 524f42fab787a9510be826ce3d736b56d454ac6d upstream.

The ECDT of ASUSTEK L4R doesn't provide correct command and data
I/O ports.  The DSDT provides the correct information instead.

For this reason, add this machine to quirk list for ECDT validation
and use the EC information from the DSDT.

[rjw: Changelog]
Reported-and-tested-by: Daniele Esposti <>
Signed-off-by: Lan Tianyu <>
Signed-off-by: Rafael J. Wysocki <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agoDrivers: hv: vmbus: Fix a bug in the handling of channel offers
K. Y. Srinivasan [Mon, 26 Aug 2013 21:08:58 +0000 (14:08 -0700)]
Drivers: hv: vmbus: Fix a bug in the handling of channel offers

commit 42dceebe34600b2d02a38baa3e869009ba3d14c7 upstream.

The channel state should be correctly set before registering the device. In the current
code the driver probe would fail for channels that have been rescinded and subsequently
re-offered. Fix the bug.

Signed-off-by: K. Y. Srinivasan <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agohwmon: (k10temp) Add support for Fam16h (Kabini)
Wei Hu [Fri, 23 Aug 2013 20:14:03 +0000 (13:14 -0700)]
hwmon: (k10temp) Add support for Fam16h (Kabini)

commit 30b146d1cb5e7560192057098eb705118bd5511f upstream.

The temperature reporting interface stays the same, so we just
add the PCI-ID to the list.

Verified on AMD Olive Hill.

Signed-off-by: Wei Hu <>
Acked-by: Clemens Ladisch <>
Signed-off-by: Guenter Roeck <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agousb: acm gadget: Null termintate strings table
Graham Williams [Wed, 28 Aug 2013 23:36:14 +0000 (16:36 -0700)]
usb: acm gadget: Null termintate strings table

commit d257221854f0b34cca3247e6c45344d0470f7398 upstream.

The gadget strings table should be null terminated.
usb_gadget_get_string() loops through the table
expecting a null at the end of the list.

Signed-off-by: Graham Williams <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agomei: me: fix hardware reset flow
Tomas Winkler [Tue, 30 Jul 2013 11:11:51 +0000 (14:11 +0300)]
mei: me: fix hardware reset flow

commit ff96066e3171acdea356b331163495957cb833d0 upstream.

Both H_IS and H_IE needs to be set to receive H_RDY

1. Assert H_IS to clear the interrupts during hw reset
and use mei_me_reg_write instead of mei_hcsr_set as the later
strips down the H_IS

2. fix interrupt disablement embarrassing typo
  hcsr |= ~H_IE -> hcsr &= ~H_IE;
this will remove the unwanted interrupt on power down

3. remove useless debug print outs

Signed-off-by: Tomas Winkler <>
Cc: Shuah Khan <>
Cc: Konstantin Khlebnikov <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agotarget: Fix se_cmd->state_list leak regression during WRITE failure
Nicholas Bellinger [Sat, 31 Aug 2013 22:12:01 +0000 (15:12 -0700)]
target: Fix se_cmd->state_list leak regression during WRITE failure

commit c130480b129fbfd7932ad7af3f4ffcea630b027f upstream.

This patch addresses a v3.11 specific regression where se_cmd->state_list
was being leaked during a fabric WRITE failure, when the fabric releases
an associated se_cmd descriptor before I/O submission occurs, and normal
fast path callbacks have a chance to call target_remove_from_state_list().

It was manifesting with Poison overwritten messages with iscsi-target
once an ImmediateData payload CRC32C failure occured.

This bug was originally introduced during v3.11-rc1 with the following

commit 0b66818ac6de67a6125ae203272fb76e79b3a20f
Author: Nicholas Bellinger <>
Date:   Thu Jun 6 01:36:41 2013 -0700

    target: Drop unnecessary CMD_T_DEV_ACTIVE check from transport_lun_remove_cmd

Signed-off-by: Nicholas Bellinger <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agoiscsi-target: Fix potential NULL pointer in solicited NOPOUT reject
Nicholas Bellinger [Sat, 24 Aug 2013 05:28:56 +0000 (22:28 -0700)]
iscsi-target: Fix potential NULL pointer in solicited NOPOUT reject

commit 28aaa950320fc7b8df3f6d2d34fa7833391a9b72 upstream.

This patch addresses a potential NULL pointer dereference regression in
iscsit_setup_nop_out() code, specifically for two cases when a solicited
NOPOUT triggers a ISCSI_REASON_PROTOCOL_ERROR reject to be generated.

This is because iscsi_cmd is expected to be NULL for solicited NOPOUT
case before iscsit_process_nop_out() locates the descriptor via TTT
using iscsit_find_cmd_from_ttt().

This regression was originally introduced in:

commit ba159914086f06532079fc15141f46ffe7e04a41
Author: Nicholas Bellinger <>
Date:   Wed Jul 3 03:48:24 2013 -0700

    iscsi-target: Fix iscsit_add_reject* usage for iser

Signed-off-by: Nicholas Bellinger <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agoiscsi-target: Fix iscsit_transport reference leak during NP thread reset
Nicholas Bellinger [Sun, 18 Aug 2013 22:07:44 +0000 (15:07 -0700)]
iscsi-target: Fix iscsit_transport reference leak during NP thread reset

commit c9a03c12464c851e691e8d5b6c9deba779c512e0 upstream.

This patch fixes a bug in __iscsi_target_login_thread() where an explicit
network portal thread reset ends up leaking the iscsit_transport module
reference, along with the associated iscsi_conn allocation.

This manifests itself with iser-target where a NP reset causes the extra
iscsit_transport reference to be taken in iscsit_conn_set_transport()
during the reset, which prevents the ib_isert module from being unloaded
after the NP thread shutdown has finished.

Signed-off-by: Nicholas Bellinger <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agoiscsi-target: Fix ImmediateData=Yes failure regression in >= v3.10
Nicholas Bellinger [Thu, 22 Aug 2013 07:05:45 +0000 (00:05 -0700)]
iscsi-target: Fix ImmediateData=Yes failure regression in >= v3.10

commit 9d86a2befceb06ee83c1a588915e6d6e0abef797 upstream.

This patch addresses a regression bug within ImmediateData=Yes failure
handling that ends up triggering an OOPs within >= v3.10 iscsi-target

The problem occurs when iscsit_process_scsi_cmd() does the call to
target_put_sess_cmd(), and once again in iscsit_get_immediate_data()
that is triggered during two different cases:

 - When iscsit_sequence_cmd() returns CMDSN_LOWER_THAN_EXP, for which
   the descriptor state will already have been set to ISTATE_REMOVE
   by iscsit_sequence_cmd(), and
 - When iscsi_cmd->sense_reason is set, for which iscsit_execute_cmd()
   will have already called transport_send_check_condition_and_sense()
   to queue the exception response.

It changes iscsit_process_scsi_cmd() to drop the early call, and makes
iscsit_get_immediate_data() call target_put_sess_cmd() from a single
location after dumping the immediate data for the failed command.

The regression was initially introduced in commit:

commit 561bf15892375597ee59d473a704a3e634c4f311
Author: Nicholas Bellinger <>
Date:   Wed Jul 3 03:58:58 2013 -0700

    iscsi-target: Fix iscsit_sequence_cmd reject handling for iser

Signed-off-by: Nicholas Bellinger <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agotarget: Fix trailing ASCII space usage in INQUIRY vendor+model
Nicholas Bellinger [Wed, 24 Jul 2013 23:15:08 +0000 (16:15 -0700)]
target: Fix trailing ASCII space usage in INQUIRY vendor+model

commit ee60bddba5a5f23e39598195d944aa0eb2d455e5 upstream.

This patch fixes spc_emulate_inquiry_std() to add trailing ASCII
spaces for INQUIRY vendor + model fields following SPC-4 text:

  "ASCII data fields described as being left-aligned shall have any
   unused bytes at the end of the field (i.e., highest offset) and
   the unused bytes shall be filled with ASCII space characters (20h)."

This addresses a problem with Falconstor NSS multipathing.

Reported-by: Tomas Molota <>
Signed-off-by: Nicholas Bellinger <>
Signed-off-by: Greg Kroah-Hartman <>
4 years agoconfig: Enable CONFIG_ZSWAP (bnc#839064).
Jeff Mahoney [Thu, 12 Sep 2013 20:55:16 +0000 (16:55 -0400)]
config: Enable CONFIG_ZSWAP (bnc#839064).

It's built-in but a no-op without zswap.enabled=1 on the kernel
command line.

suse-commit: 1441e592ea973780e0203a5cac1bf5f0104be532

4 years ago- Update
Jeff Mahoney [Thu, 12 Sep 2013 20:53:40 +0000 (16:53 -0400)]
- Update
- Update
- Update

suse-commit: fd0a17821467765e148d55578975e2e22e25d3a4

4 years agoCONFIG_RTC_DRV_CMOS=y on all x86/x86_64 flavors (bnc#755525).
Jeff Mahoney [Thu, 14 Jun 2012 17:07:01 +0000 (13:07 -0400)]
CONFIG_RTC_DRV_CMOS=y on all x86/x86_64 flavors (bnc#755525).

When rtc_cmos is module, hctosys fails to set the clock on boot, issuing
ominious error messages to the console.

suse-commit: cddcbe7f991548be1d486bb353b242b990dcc4f3

4 years agoUpdate config files to enable GFS DLM locking.
Goldwyn Rodrigues [Fri, 6 Sep 2013 13:54:37 +0000 (15:54 +0200)]
Update config files to enable GFS DLM locking.

suse-commit: 712cff033839f9adcf25b4aa23b8ddef42c3a649

4 years agoDrivers: hv: util: Fix a bug in util version negotiation code
Olaf Hering [Thu, 5 Sep 2013 09:42:00 +0000 (11:42 +0200)]
Drivers: hv: util: Fix a bug in util version negotiation code

suse-commit: 938aca5c95a8b62e743f861300e3c74178a7a320

4 years ago- Update Xen patches to final 3.11.
Jan Beulich [Wed, 4 Sep 2013 12:06:51 +0000 (14:06 +0200)]
- Update Xen patches to final 3.11.

suse-commit: e71a10355bf18ceca5832109a5b5e7431e48ca74

4 years agoUpdate to 3.11-final.
Jeff Mahoney [Tue, 3 Sep 2013 15:25:07 +0000 (11:25 -0400)]
Update to 3.11-final.

suse-commit: 7561c6fc1b6c0e660921a337d56eaddf59a62e44

4 years agoLinux 3.11
Linus Torvalds [Mon, 2 Sep 2013 20:46:10 +0000 (13:46 -0700)]
Linux 3.11

4 years agoMerge tag 'scsi-fixes' of git://
Linus Torvalds [Mon, 2 Sep 2013 17:43:13 +0000 (10:43 -0700)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fix from James Bottomley:
 "This is a bug fix for the pm80xx driver.  It turns out that when the
  new hardware support was added in 3.10 the IO command size was kept at
  the old hard coded value.  This means that the driver attaches to some
  new cards and then simply hangs the system"

* tag 'scsi-fixes' of git://
  [SCSI] pm80xx: fix Adaptec 71605H hang

4 years agoMerge branch 'x86-urgent-for-linus' of git://
Linus Torvalds [Mon, 2 Sep 2013 16:55:14 +0000 (09:55 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 boot fix from Peter Anvin:
 "A single very small boot fix for very large memory systems (> 0.5T)"

* 'x86-urgent-for-linus' of git://
  x86/mm: Fix boot crash with DEBUG_PAGE_ALLOC=y and more than 512G RAM

4 years agoMerge branch 'fixes' of git://
Linus Torvalds [Mon, 2 Sep 2013 16:54:06 +0000 (09:54 -0700)]
Merge branch 'fixes' of git://

Pull slave-dma fix from Vinod Koul:
 "A fix for resolving TI_EDMA driver's build error in allmodconfig to
  have filter function built in""

* 'fixes' of git://
  dma/Kconfig: TI_EDMA needs to be boolean

4 years agoMerge git://
Linus Torvalds [Sat, 31 Aug 2013 00:43:17 +0000 (17:43 -0700)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) There was a simplification in the ipv6 ndisc packet sending
    attempted here, which avoided using memory accounting on the
    per-netns ndisc socket for sending NDISC packets.  It did fix some
    important issues, but it causes regressions so it gets reverted here
    too.  Specifically, the problem with this change is that the IPV6
    output path really depends upon there being a valid skb->sk

    The reason we want to do this change in some form when we figure out
    how to do it right, is that if a device goes down the ndisc_sk
    socket send queue will fill up and block NDISC packets that we want
    to send to other devices too.  That's really bad behavior.

    Hopefully Thomas can come up with a better version of this change.

 2) Fix a severe TCP performance regression by reverting a change made
    to dev_pick_tx() quite some time ago.  From Eric Dumazet.

 3) TIPC returns wrongly signed error codes, fix from Erik Hugne.

 4) Fix OOPS when doing IPSEC over ipv4 tunnels due to orphaning the
    skb->sk too early.  Fix from Li Hongjun.

 5) RAW ipv4 sockets can use the wrong routing key during lookup, from
    Chris Clark.

 6) Similar to #1 revert an older change that tried to use plain
    alloc_skb() for SYN/ACK TCP packets, this broke the netfilter owner
    mark which needs to see the skb->sk for such frames.  From Phil

 7) BNX2x driver bug fixes from Ariel Elior and Yuval Mintz,
    specifically in the handling of virtual functions.

 8) IPSEC path error propagations to sockets is not done properly when
    we have v4 in v6, and v6 in v4 type rules.  Fix from Hannes Frederic

 9) Fix missing channel context release in mac80211, from Johannes Berg.

10) Fix network namespace handing wrt.  SCM_RIGHTS, from Andy

11) Fix usage of bogus NAPI weight in jme, netxen, and ps3_gelic
    drivers.  From Michal Schmidt.

12) Hopefully a complete and correct fix for the genetlink dump locking
    and module reference counting.  From Pravin B Shelar.

13) sk_busy_loop() must do a cpu_relax(), from Eliezer Tamir.

14) Fix handling of timestamp offset when restoring a snapshotted TCP
    socket.  From Andrew Vagin.

* git:// (44 commits)
  net: fec: fix time stamping logic after napi conversion
  net: bridge: convert MLDv2 Query MRC into msecs_to_jiffies for max_delay
  mISDN: return -EINVAL on error in dsp_control_req()
  net: revert 8728c544a9c ("net: dev_pick_tx() fix")
  Revert "ipv6: Don't depend on per socket memory for neighbour discovery messages"
  ipv4 tunnels: fix an oops when using ipip/sit with IPsec
  tipc: set sk_err correctly when connection fails
  tcp: tcp_make_synack() should use sock_wmalloc
  bridge: separate querier and query timer into IGMP/IPv4 and MLD/IPv6 ones
  ipv6: Don't depend on per socket memory for neighbour discovery messages
  ipv4: sendto/hdrincl: don't use destination address found in header
  tcp: don't apply tsoffset if rcv_tsecr is zero
  tcp: initialize rcv_tstamp for restored sockets
  net: xilinx: fix memleak
  net: usb: Add HP hs2434 device to ZLP exception table
  net: add cpu_relax to busy poll loop
  net: stmmac: fixed the pbl setting with DT
  genl: Hold reference on correct module while netlink-dump.
  genl: Fix genl dumpit() locking.
  xfrm: Fix potential null pointer dereference in xdst_queue_output

4 years agoMAINTAINERS: change my DT related maintainer address
Ian Campbell [Fri, 30 Aug 2013 08:50:42 +0000 (09:50 +0100)]
MAINTAINERS: change my DT related maintainer address

Filtering capabilities on my work email are pretty much non-existent and this
has turned out to be something of a firehose...

Cc: Stephen Warren <>
Cc: Rob Herring <>
Cc: Olof Johansson <>
Cc: Linus Walleij <>
Signed-off-by: Ian Campbell <>
Acked-by: Pawel Moll <>
Acked-by: Mark Rutland <>
Signed-off-by: Linus Torvalds <>
4 years agoMerge tag 'sound-3.11' of git://
Linus Torvalds [Sat, 31 Aug 2013 00:05:02 +0000 (17:05 -0700)]
Merge tag 'sound-3.11' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This contains two Oops fixes (opti9xx and HD-audio) and a simple fixup
  for an Acer laptop.  All marked as stable patches"

* tag 'sound-3.11' of git://
  ALSA: opti9xx: Fix conflicting driver object name
  ALSA: hda - Fix NULL dereference with CONFIG_SND_DYNAMIC_MINORS=n
  ALSA: hda - Add inverted digital mic fixup for Acer Aspire One

4 years agoMerge tag 'fixes-for-linus' of git://
Linus Torvalds [Fri, 30 Aug 2013 23:18:59 +0000 (16:18 -0700)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "Two straggling fixes that I had missed as they were posted a couple of
  weeks ago, causing problems with interrupts (breaking them completely)
  on the CSR SiRF platforms"

* tag 'fixes-for-linus' of git://
  arm: prima2: drop nr_irqs in mach as we moved to linear irqdomain
  irqchip: sirf: move from legacy mode to linear irqdomain

4 years agoMerge branch 'drm-fixes' of git://
Linus Torvalds [Fri, 30 Aug 2013 23:17:10 +0000 (16:17 -0700)]
Merge branch 'drm-fixes' of git://

Pull drm fixes from Dave Airlie:
 "Since we are getting to the pointy end, one i915 black screen on some
  machines, and one vmwgfx stop userspace ability to nuke the VM,

  There might be one or two ati or nouveau fixes trickle in before
  final, but I think this should pretty much be it"

* 'drm-fixes' of git://
  drm/vmwgfx: Split GMR2_REMAP commands if they are to large
  drm/i915: ivb: fix edp voltage swing reg val

4 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Fri, 30 Aug 2013 23:15:52 +0000 (16:15 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

Pull input layer updates from Dmitry Torokhov:
 "Just a couple of new IDs in Wacom and xpad drivers, i8042 is now
  disabled on ARC, and data checks in Elantech driver that were overly
  relaxed by the previous patch are now tightened"

* 'for-linus' of git://
  Input: i8042 - disable the driver on ARC platforms
  Input: xpad - add signature for Razer Onza Classic Edition
  Input: elantech - fix packet check for v3 and v4 hardware
  Input: wacom - add support for 0x300 and 0x301

4 years agonet: fec: fix time stamping logic after napi conversion
Richard Cochran [Fri, 30 Aug 2013 18:28:10 +0000 (20:28 +0200)]
net: fec: fix time stamping logic after napi conversion

Commit dc975382 "net: fec: add napi support to improve proformance"
converted the fec driver to the napi model. However, that commit
forgot to remove the call to skb_defer_rx_timestamp which is only
needed in non-napi drivers.

(The function napi_gro_receive eventually calls netif_receive_skb,
which in turn calls skb_defer_rx_timestamp.)

This patch should also be applied to the 3.9 and 3.10 kernels.

Signed-off-by: Richard Cochran <>
Signed-off-by: David S. Miller <>
4 years agonet: bridge: convert MLDv2 Query MRC into msecs_to_jiffies for max_delay
Daniel Borkmann [Thu, 29 Aug 2013 21:55:05 +0000 (23:55 +0200)]
net: bridge: convert MLDv2 Query MRC into msecs_to_jiffies for max_delay

While looking into MLDv1/v2 code, I noticed that bridging code does
not convert it's max delay into jiffies for MLDv2 messages as we do
in core IPv6' multicast code.

RFC3810, 5.1.3. Maximum Response Code says:

  The Maximum Response Code field specifies the maximum time allowed
  before sending a responding Report. The actual time allowed, called
  the Maximum Response Delay, is represented in units of milliseconds,
  and is derived from the Maximum Response Code as follows: [...]

As we update timers that work with jiffies, we need to convert it.

Signed-off-by: Daniel Borkmann <>
Cc: Linus Lüssing <>
Cc: Hannes Frederic Sowa <>
Signed-off-by: David S. Miller <>
4 years agomISDN: return -EINVAL on error in dsp_control_req()
Dan Carpenter [Thu, 29 Aug 2013 08:47:00 +0000 (11:47 +0300)]
mISDN: return -EINVAL on error in dsp_control_req()

If skb->len is too short then we should return an error.  Otherwise we
read beyond the end of skb->data for several bytes.

Signed-off-by: Dan Carpenter <>
Signed-off-by: David S. Miller <>
4 years agonet: revert 8728c544a9c ("net: dev_pick_tx() fix")
Eric Dumazet [Thu, 29 Aug 2013 01:10:43 +0000 (18:10 -0700)]
net: revert 8728c544a9c ("net: dev_pick_tx() fix")

commit 8728c544a9cbdc ("net: dev_pick_tx() fix") and commit
b6fe83e9525a ("bonding: refine IFF_XMIT_DST_RELEASE capability")
are quite incompatible : Queue selection is disabled because skb
dst was dropped before entering bonding device.

This causes major performance regression, mainly because TCP packets
for a given flow can be sent to multiple queues.

This is particularly visible when using the new FQ packet scheduler
with MQ + FQ setup on the slaves.

We can safely revert the first commit now that 416186fbf8c5b
("net: Split core bits of netdev_pick_tx into __netdev_pick_tx")
properly caps the queue_index.

Reported-by: Xi Wang <>
Diagnosed-by: Xi Wang <>
Signed-off-by: Eric Dumazet <>
Cc: Tom Herbert <>
Cc: Alexander Duyck <>
Cc: Denys Fedorysychenko <>
Signed-off-by: David S. Miller <>
4 years agoRevert "ipv6: Don't depend on per socket memory for neighbour discovery messages"
David S. Miller [Fri, 30 Aug 2013 21:39:33 +0000 (17:39 -0400)]
Revert "ipv6: Don't depend on per socket memory for neighbour discovery messages"

This reverts commit 1f324e38870cc09659cf23bc626f1b8869e201f2.

It seems to cause regressions, and in particular the output path
really depends upon there being a socket attached to skb->sk for
checks such as sk_mc_loop(skb->sk) for example.  See ip6_output_finish2().

Reported-by: Stephen Warren <>
Reported-by: Fabio Estevam <>
Signed-off-by: David S. Miller <>
4 years agoipv4 tunnels: fix an oops when using ipip/sit with IPsec
Li Hongjun [Wed, 28 Aug 2013 09:54:50 +0000 (11:54 +0200)]
ipv4 tunnels: fix an oops when using ipip/sit with IPsec

Since commit 3d7b46cd20e3 (ip_tunnel: push generic protocol handling to
ip_tunnel module.), an Oops is triggered when an xfrm policy is configured on
an IPv4 over IPv4 tunnel.

xfrm4_policy_check() calls __xfrm_policy_check2(), which uses skb_dst(skb). But
this field is NULL because iptunnel_pull_header() calls skb_dst_drop(skb).

Signed-off-by: Li Hongjun <>
Signed-off-by: Nicolas Dichtel <>
Signed-off-by: David S. Miller <>
4 years agotipc: set sk_err correctly when connection fails
Erik Hugne [Wed, 28 Aug 2013 07:29:58 +0000 (09:29 +0200)]
tipc: set sk_err correctly when connection fails

Should a connect fail, if the publication/server is unavailable or
due to some other error, a positive value will be returned and errno
is never set. If the application code checks for an explicit zero
return from connect (success) or a negative return (failure), it
will not catch the error and subsequent send() calls will fail as
shown from the strace snippet below.

socket(0x1e /* PF_??? */, SOCK_SEQPACKET, 0) = 3
connect(3, {sa_family=0x1e /* AF_??? */, sa_data="\2\1\322\4\0\0\322\4\0\0\0\0\0\0"}, 16) = 111
sendto(3, "test", 4, 0, NULL, 0)        = -1 EPIPE (Broken pipe)

The reason for this behaviour is that TIPC wrongly inverts error
codes set in sk_err.

Signed-off-by: Erik Hugne <>
Signed-off-by: David S. Miller <>
4 years agotcp: tcp_make_synack() should use sock_wmalloc
Phil Oester [Tue, 27 Aug 2013 23:41:40 +0000 (16:41 -0700)]
tcp: tcp_make_synack() should use sock_wmalloc

In commit 90ba9b19 (tcp: tcp_make_synack() can use alloc_skb()), Eric changed
the call to sock_wmalloc in tcp_make_synack to alloc_skb.  In doing so,
the netfilter owner match lost its ability to block the SYNACK packet on
outbound listening sockets.  Revert the change, restoring the owner match

This closes netfilter bugzilla #847.

Signed-off-by: Phil Oester <>
Signed-off-by: David S. Miller <>
4 years agobridge: separate querier and query timer into IGMP/IPv4 and MLD/IPv6 ones
Linus Lüssing [Fri, 30 Aug 2013 15:28:17 +0000 (17:28 +0200)]
bridge: separate querier and query timer into IGMP/IPv4 and MLD/IPv6 ones

Currently we would still potentially suffer multicast packet loss if there
is just either an IGMP or an MLD querier: For the former case, we would
possibly drop IPv6 multicast packets, for the latter IPv4 ones. This is
because we are currently assuming that if either an IGMP or MLD querier
is present that the other one is present, too.

This patch makes the behaviour and fix added in
"bridge: disable snooping if there is no querier" (b00589af3b04)
to also work if there is either just an IGMP or an MLD querier on the
link: It refines the deactivation of the snooping to be protocol
specific by using separate timers for the snooped IGMP and MLD queries
as well as separate timers for our internal IGMP and MLD queriers.

Signed-off-by: Linus Lüssing <>
Signed-off-by: David S. Miller <>
4 years agoMerge branch 'for-3.11-fixes' of git://
Linus Torvalds [Fri, 30 Aug 2013 00:03:48 +0000 (17:03 -0700)]
Merge branch 'for-3.11-fixes' of git://git./linux/kernel/git/tj/cgroup

Pull cgroup fix from Tejun Heo:
 "During the percpu reference counting update which was merged during
  v3.11-rc1, the cgroup destruction path was updated so that a cgroup in
  the process of dying may linger on the children list, which was
  necessary as the cgroup should still be included in child/descendant
  iteration while percpu ref is being killed.

  Unfortunately, I forgot to update cgroup destruction path accordingly
  and cgroup destruction may fail spuriously with -EBUSY due to
  lingering dying children even when there's no live child left - e.g.
  "rmdir parent/child parent" will usually fail.

  This can be easily fixed by iterating through the children list to
  verify that there's no live child left.  While this is very late in
  the release cycle, this bug is very visible to userland and I believe
  the fix is relatively safe.

  Thanks Hugh for spotting and providing fix for the issue"

* 'for-3.11-fixes' of git://
  cgroup: fix rmdir EBUSY regression in 3.11

4 years agoMerge branch 'for-3.11-fixes' of git://
Linus Torvalds [Fri, 30 Aug 2013 00:02:48 +0000 (17:02 -0700)]
Merge branch 'for-3.11-fixes' of git://git./linux/kernel/git/tj/wq

Pull workqueue fix from Tejun Heo:
 "This contains one fix which could lead to system-wide lockup on
  !PREEMPT kernels.  It's very late in the cycle but this definitely is
  a -stable material.

  The problem is that workqueue worker tasks may process unlimited
  number of work items back-to-back without every yielding inbetween.
  This usually isn't noticeable but a work item which re-queues itself
  waiting for someone else to do something can deadlock with
  stop_machine.  stop_machine will ensure nothing else happens on all
  other cpus and the requeueing work item will reqeueue itself
  indefinitely without ever yielding and thus preventing the CPU from
  entering stop_machine.

  Kudos to Jamie Liu for spotting and diagnosing the problem.  This can
  be trivially fixed by adding cond_resched() after processing each work

* 'for-3.11-fixes' of git://
  workqueue: cond_resched() after processing each work item

4 years agoMerge tag 'nfs-for-3.11-5' of git://
Linus Torvalds [Fri, 30 Aug 2013 00:00:40 +0000 (17:00 -0700)]
Merge tag 'nfs-for-3.11-5' of git://

Pull NFS client bugfix from Trond Myklebust:
 "Stable patch to fix a highmem-related data corruption issue on 32-bit
  ARM platforms"

* tag 'nfs-for-3.11-5' of git://
  SUNRPC: Fix memory corruption issue on 32-bit highmem systems

4 years agodrm/vmwgfx: Split GMR2_REMAP commands if they are to large
Jakob Bornecrantz [Thu, 29 Aug 2013 00:32:53 +0000 (02:32 +0200)]
drm/vmwgfx: Split GMR2_REMAP commands if they are to large

This fixes the piglit test texturing/max-texture-size
causing the VM to die due to a too large SVGA command.

Signed-off-by: Jakob Bornecrantz <>
Reviewed-by: Biran Paul <>
Reviewed-by: Zack Rusin <>
Signed-off-by: Dave Airlie <>
4 years agoMerge tag 'drm-intel-fixes-2013-08-30' of git://
Dave Airlie [Thu, 29 Aug 2013 23:02:57 +0000 (09:02 +1000)]
Merge tag 'drm-intel-fixes-2013-08-30' of git:// into drm-fixes

Just a one-line patch to fix a black screen issue on rare ivb machines,
cc: stable. Normally I'd just shovel this into the -next pull request this
late in the -rc cycle, but Linus was making noises about not getting real
fixes which are cc: stable. So here we go ;-)

* tag 'drm-intel-fixes-2013-08-30' of git://
  drm/i915: ivb: fix edp voltage swing reg val

4 years agodrm/i915: ivb: fix edp voltage swing reg val
Imre Deak [Fri, 23 Aug 2013 20:50:23 +0000 (23:50 +0300)]
drm/i915: ivb: fix edp voltage swing reg val

Fix the typo introduced in

commit 1a2eb4604b85c5efb343da8a4dcf41288fcfca85
Author: Keith Packard <>
Date:   Wed Nov 16 16:26:07 2011 -0800

    drm/i915: Hook up Ivybridge eDP

This fixes eDP link-training failures and cases where all voltage swing
/pre-emphasis levels were tried and failed during clock recovery and -
as a fallback - we go on to do channel equalization with the last voltage
swing/pre-emphasis level which will succeed. Both issues can lead to a
blank screen.

- improve commit message

Tested-by: Jeremy Moles <>
Signed-off-by: Imre Deak <>
Reviewed-by: Paulo Zanoni <>
Signed-off-by: Daniel Vetter <>
4 years agoMerge branch 'master' of git://
David S. Miller [Thu, 29 Aug 2013 20:05:30 +0000 (16:05 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/klassert/ipsec

Steffen Klassert says:

This pull request fixes some issues that arise when 6in4 or 4in6 tunnels
are used in combination with IPsec, all from Hannes Frederic Sowa and a
null pointer dereference when queueing packets to the policy hold queue.

1) We might access the local error handler of the wrong address family if
   6in4 or 4in6 tunnel is protected by ipsec. Fix this by addind a pointer
   to the correct local_error to xfrm_state_afinet.

2) Add a helper function to always refer to the correct interpretation
   of skb->sk.

3) Call skb_reset_inner_headers to record the position of the inner headers
   when adding a new one in various ipv6 tunnels. This is needed to identify
   the addresses where to send back errors in the xfrm layer.

4) Dereference inner ipv6 header if encapsulated to always call the
   right error handler.

5) Choose protocol family by skb protocol to not call the wrong
   xfrm{4,6}_local_error handler in case an ipv6 sockets is used
   in ipv4 mode.

6) Partly revert "xfrm: introduce helper for safe determination of mtu"
   because this introduced pmtu discovery problems.

7) Set skb->protocol on tcp, raw and ip6_append_data genereated skbs.
   We need this to get the correct mtu informations in xfrm.

8) Fix null pointer dereference in xdst_queue_output.

Signed-off-by: David S. Miller <>
4 years agoipv6: Don't depend on per socket memory for neighbour discovery messages
Thomas Graf [Tue, 27 Aug 2013 23:07:25 +0000 (01:07 +0200)]
ipv6: Don't depend on per socket memory for neighbour discovery messages

Allocating skbs when sending out neighbour discovery messages
currently uses sock_alloc_send_skb() based on a per net namespace
socket and thus share a socket wmem buffer space.

If a netdevice is temporarily unable to transmit due to carrier
loss or for other reasons, the queued up ndisc messages will cosnume
all of the wmem space and will thus prevent from any more skbs to
be allocated even for netdevices that are able to transmit packets.

The number of neighbour discovery messages sent is very limited,
simply use alloc_skb() and don't depend on any socket wmem space any

This patch has orginally been posted by Eric Dumazet in a modified

Signed-off-by: Thomas Graf <>
Cc: Eric Dumazet <>
Acked-by: Hannes Frederic Sowa <>
Acked-by: Eric Dumazet <>
Signed-off-by: David S. Miller <>
4 years agoipv4: sendto/hdrincl: don't use destination address found in header
Chris Clark [Tue, 27 Aug 2013 18:02:15 +0000 (12:02 -0600)]
ipv4: sendto/hdrincl: don't use destination address found in header

ipv4: raw_sendmsg: don't use header's destination address

A sendto() regression was bisected and found to start with commit
f8126f1d5136be1 (ipv4: Adjust semantics of rt->rt_gateway.)

The problem is that it tries to ARP-lookup the constructed packet's
destination address rather than the explicitly provided address.

Fix this using FLOWI_FLAG_KNOWN_NH so that given nexthop is used.

cf. commit 2ad5b9e4bd314fc685086b99e90e5de3bc59e26b

Reported-by: Chris Clark <>
Bisected-by: Chris Clark <>
Tested-by: Chris Clark <>
Suggested-by: Julian Anastasov <>
Signed-off-by: Chris Clark <>
Signed-off-by: David S. Miller <>
4 years agotcp: don't apply tsoffset if rcv_tsecr is zero
Andrew Vagin [Tue, 27 Aug 2013 08:21:55 +0000 (12:21 +0400)]
tcp: don't apply tsoffset if rcv_tsecr is zero

The zero value means that tsecr is not valid, so it's a special case.

tsoffset is used to customize tcp_time_stamp for one socket.
tsoffset is usually zero, it's used when a socket was moved from one
host to another host.

Currently this issue affects logic of tcp_rcv_rtt_measure_ts. Due to
incorrect value of rcv_tsecr, tcp_rcv_rtt_measure_ts sets rto to

Cc: Pavel Emelyanov <>
Cc: Eric Dumazet <>
Cc: "David S. Miller" <>
Cc: Alexey Kuznetsov <>
Cc: James Morris <>
Cc: Hideaki YOSHIFUJI <>
Cc: Patrick McHardy <>
Reported-by: Cyrill Gorcunov <>
Signed-off-by: Andrey Vagin <>
Signed-off-by: David S. Miller <>
4 years agotcp: initialize rcv_tstamp for restored sockets
Andrew Vagin [Tue, 27 Aug 2013 08:20:40 +0000 (12:20 +0400)]
tcp: initialize rcv_tstamp for restored sockets

u32 rcv_tstamp;     /* timestamp of last received ACK */

Its value used in tcp_retransmit_timer, which closes socket
if the last ack was received more then TCP_RTO_MAX ago.

Currently rcv_tstamp is initialized to zero and if tcp_retransmit_timer
is called before receiving a first ack, the connection is closed.

This patch initializes rcv_tstamp to a timestamp, when a socket was

Cc: Pavel Emelyanov <>
Cc: Eric Dumazet <>
Cc: "David S. Miller" <>
Cc: Alexey Kuznetsov <>
Cc: James Morris <>
Cc: Hideaki YOSHIFUJI <>
Cc: Patrick McHardy <>
Reported-by: Cyrill Gorcunov <>
Signed-off-by: Andrey Vagin <>
Signed-off-by: David S. Miller <>
4 years agoarm: prima2: drop nr_irqs in mach as we moved to linear irqdomain
Barry Song [Tue, 6 Aug 2013 05:37:14 +0000 (13:37 +0800)]
arm: prima2: drop nr_irqs in mach as we moved to linear irqdomain

we don't need nr_irqs in machine any more after we move to
linear irqdomain for sirfsoc irqchip, so drop them.

Signed-off-by: Barry Song <>
Signed-off-by: Olof Johansson <>
4 years agoirqchip: sirf: move from legacy mode to linear irqdomain
Barry Song [Tue, 6 Aug 2013 05:37:13 +0000 (13:37 +0800)]
irqchip: sirf: move from legacy mode to linear irqdomain

the series of patches for irqdomain core in 3.11 has broken sirf
irq which uses legacy mapping. all users fail in the new kernel
while setupping irq.

this patch moves to linear irqdomain and drop old legacy irqdomain
codes since we don't need it any more, and at the same time, it
also fixes the broken interrupts of sirfsoc in 3.11.

on the other hand, we actually only have 64 interrupt sources for
prima2 and atlas6, but there are 128 interrupt souces for marco
which uses GIC. in the legacy codes, sirf gpio also uses legacy
irqdomain, so to make gpio interrupt mapping not depend on the
prima2/atlas6/marco an use unified marco,we enlarge prima2/atlas6
interrupt number to 128. here we don't need this workaround any
more as sirf gpio also moved to linear mode before. so we move
SIRFSOC_NUM_IRQS back to 64 too.

Signed-off-by: Barry Song <>
Signed-off-by: Olof Johansson <>
4 years agoInput: i8042 - disable the driver on ARC platforms
Mischa Jonker [Thu, 29 Aug 2013 16:29:40 +0000 (09:29 -0700)]
Input: i8042 - disable the driver on ARC platforms

It causes crashes when enabled, and we don't have such a peripheral
anyway on ARC platforms.

Signed-off-by: Mischa Jonker <>
Signed-off-by: Dmitry Torokhov <>
4 years agocgroup: fix rmdir EBUSY regression in 3.11
Hugh Dickins [Wed, 28 Aug 2013 23:31:23 +0000 (16:31 -0700)]
cgroup: fix rmdir EBUSY regression in 3.11

On 3.11-rc we are seeing cgroup directories left behind when they should
have been removed.  Here's a trivial reproducer:

cd /sys/fs/cgroup/memory
mkdir parent parent/child; rmdir parent/child parent
rmdir: failed to remove `parent': Device or resource busy

It's because cgroup_destroy_locked() (step 1 of destruction) leaves
cgroup on parent's children list, letting cgroup_offline_fn() (step 2 of
destruction) remove it; but step 2 is run by work queue, which may not
yet have removed the children when parent destruction checks the list.

Fix that by checking through a non-empty list of children: if every one
of them has already been marked CGRP_DEAD, then it's safe to proceed:
those children are invisible to userspace, and should not obstruct rmdir.

(I didn't see any reason to keep the cgrp->children checks under the
unrelated css_set_lock, so moved them out.)

tj: Flattened nested ifs a bit and updated comment so that it's
    correct on both for-3.11-fixes and for-3.12.

Signed-off-by: Hugh Dickins <>
Signed-off-by: Tejun Heo <>
4 years agoworkqueue: cond_resched() after processing each work item
Tejun Heo [Wed, 28 Aug 2013 21:33:37 +0000 (17:33 -0400)]
workqueue: cond_resched() after processing each work item

If !PREEMPT, a kworker running work items back to back can hog CPU.
This becomes dangerous when a self-requeueing work item which is
waiting for something to happen races against stop_machine.  Such
self-requeueing work item would requeue itself indefinitely hogging
the kworker and CPU it's running on while stop_machine would wait for
that CPU to enter stop_machine while preventing anything else from
happening on all other CPUs.  The two would deadlock.

Jamie Liu reports that this deadlock scenario exists around
scsi_requeue_run_queue() and libata port multiplier support, where one
port may exclude command processing from other ports.  With the right
timing, scsi_requeue_run_queue() can end up requeueing itself trying
to execute an IO which is asked to be retried while another device has
an exclusive access, which in turn can't make forward progress due to

Fix it by invoking cond_resched() after executing each work item.

Signed-off-by: Tejun Heo <>
Reported-by: Jamie Liu <>
 kernel/workqueue.c |    9 +++++++++
 1 file changed, 9 insertions(+)

4 years agoMerge branch 'akpm' (patches from Andrew Morton)
Linus Torvalds [Thu, 29 Aug 2013 02:31:33 +0000 (19:31 -0700)]
Merge branch 'akpm' (patches from Andrew Morton)

Merge fixes from Andrew Morton:
 "Five fixes.

  err, make that six.  let me try again"

* emailed patches from Andrew Morton <>:
  fs/ocfs2/super.c: Use bigger nodestr to accomodate 32-bit node numbers
  memcg: check that kmem_cache has memcg_params before accessing it
  drivers/base/memory.c: fix show_mem_removable() to handle missing sections
  IPC: bugfix for msgrcv with msgtyp < 0
  Omnikey Cardman 4000: pull in ioctl.h in user header
  timer_list: correct the iterator for timer_list

4 years agofs/ocfs2/super.c: Use bigger nodestr to accomodate 32-bit node numbers
Goldwyn Rodrigues [Wed, 28 Aug 2013 23:35:21 +0000 (16:35 -0700)]
fs/ocfs2/super.c: Use bigger nodestr to accomodate 32-bit node numbers

While using pacemaker/corosync, the node numbers are generated using IP
address as opposed to serial node number generation.  This may not fit
in a 8-byte string.  Use a bigger string to print the complete node

Signed-off-by: Goldwyn Rodrigues <>
Cc: Mark Fasheh <>
Cc: Joel Becker <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
4 years agomemcg: check that kmem_cache has memcg_params before accessing it
Andrey Vagin [Wed, 28 Aug 2013 23:35:20 +0000 (16:35 -0700)]
memcg: check that kmem_cache has memcg_params before accessing it

If the system had a few memory groups and all of them were destroyed,
memcg_limited_groups_array_size has non-zero value, but all new caches
are created without memcg_params, because memcg_kmem_enabled() returns

We try to enumirate child caches in a few places and all of them are
potentially dangerous.

For example my kernel is compiled with CONFIG_SLAB and it crashed when I
tryed to mount a NFS share after a few experiments with kmemcg.

  BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
  IP: [<ffffffff8118166a>] do_tune_cpucache+0x8a/0xd0
  PGD b942a067 PUD b999f067 PMD 0
  Oops: 0000 [#1] SMP
  Modules linked in: fscache(+) ip6table_filter ip6_tables iptable_filter ip_tables i2c_piix4 pcspkr virtio_net virtio_balloon i2c_core floppy
  CPU: 0 PID: 357 Comm: modprobe Not tainted 3.11.0-rc7+ #59
  Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
  task: ffff8800b9f98240 ti: ffff8800ba32e000 task.ti: ffff8800ba32e000
  RIP: 0010:[<ffffffff8118166a>]  [<ffffffff8118166a>] do_tune_cpucache+0x8a/0xd0
  RSP: 0018:ffff8800ba32fb70  EFLAGS: 00010246
  RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000006
  RDX: 0000000000000000 RSI: ffff8800b9f98910 RDI: 0000000000000246
  RBP: ffff8800ba32fba0 R08: 0000000000000002 R09: 0000000000000004
  R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000010
  R13: 0000000000000008 R14: 00000000000000d0 R15: ffff8800375d0200
  FS:  00007f55f1378740(0000) GS:ffff8800bfa00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
  CR2: 00007f24feba57a0 CR3: 0000000037b51000 CR4: 00000000000006f0
  Call Trace:
    fscache_init+0x19b/0x230 [fscache]

Signed-off-by: Andrey Vagin <>
Cc: Pekka Enberg <>
Cc: Christoph Lameter <>
Cc: Glauber Costa <>
Cc: Joonsoo Kim <>
Cc: Michal Hocko <>
Cc: Johannes Weiner <>
Cc: <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
4 years agodrivers/base/memory.c: fix show_mem_removable() to handle missing sections
Russ Anderson [Wed, 28 Aug 2013 23:35:18 +0000 (16:35 -0700)]
drivers/base/memory.c: fix show_mem_removable() to handle missing sections

"cat /sys/devices/system/memory/memory*/removable" crashed the system.

The problem is that show_mem_removable() is passing a
bad pfn to is_mem_section_removable(), which causes

    if (!node_online(page_to_nid(page)))

to blow up.  Why is it passing in a bad pfn?

The reason is that show_mem_removable() will loop sections_per_block
times.  sections_per_block is 16, but mem->section_count is 8,
indicating holes in this memory block.  Checking that the memory section
is present before checking to see if the memory section is removable
fixes the problem.

   harp5-sys:~ # cat /sys/devices/system/memory/memory*/removable
   BUG: unable to handle kernel paging request at ffffea00c3200000
   IP: [<ffffffff81117ed1>] is_pageblock_removable_nolock+0x1/0x90
   PGD 83ffd4067 PUD 37bdfce067 PMD 0
   Oops: 0000 [#1] SMP
   Modules linked in: autofs4 binfmt_misc rdma_ucm rdma_cm iw_cm ib_addr ib_srp scsi_transport_srp scsi_tgt ib_ipoib ib_cm ib_uverbs ib_umad iw_cxgb3 cxgb3 mdio mlx4_en mlx4_ib ib_sa mlx4_core ib_mthca ib_mad ib_core fuse nls_iso8859_1 nls_cp437 vfat fat joydev loop hid_generic usbhid hid hwperf(O) numatools(O) dm_mod iTCO_wdt ipv6 iTCO_vendor_support igb i2c_i801 ioatdma i2c_algo_bit ehci_pci pcspkr lpc_ich i2c_core ehci_hcd ptp sg mfd_core dca rtc_cmos pps_core mperf button xhci_hcd sd_mod crc_t10dif usbcore usb_common scsi_dh_emc scsi_dh_hp_sw scsi_dh_alua scsi_dh_rdac scsi_dh gru(O) xvma(O) xfs crc32c libcrc32c thermal sata_nv processor piix mptsas mptscsih scsi_transport_sas mptbase megaraid_sas fan thermal_sys hwmon ext3 jbd ata_piix ahci libahci libata scsi_mod
   CPU: 4 PID: 5991 Comm: cat Tainted: G           O 3.11.0-rc5-rja-uv+ #10
   Hardware name: SGI UV2000/ROMLEY, BIOS SGI UV 2000/3000 series BIOS 01/15/2013
   task: ffff88081f034580 ti: ffff880820022000 task.ti: ffff880820022000
   RIP: 0010:[<ffffffff81117ed1>]  [<ffffffff81117ed1>] is_pageblock_removable_nolock+0x1/0x90
   RSP: 0018:ffff880820023df8  EFLAGS: 00010287
   RAX: 0000000000040000 RBX: ffffea00c3200000 RCX: 0000000000000004
   RDX: ffffea00c30b0000 RSI: 00000000001c0000 RDI: ffffea00c3200000
   RBP: ffff880820023e38 R08: 0000000000000000 R09: 0000000000000001
   R10: 0000000000000000 R11: 0000000000000001 R12: ffffea00c33c0000
   R13: 0000160000000000 R14: 6db6db6db6db6db7 R15: 0000000000000001
   FS:  00007ffff7fb2700(0000) GS:ffff88083fc80000(0000) knlGS:0000000000000000
   CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
   CR2: ffffea00c3200000 CR3: 000000081b954000 CR4: 00000000000407e0
   Call Trace:

Signed-off-by: Russ Anderson <>
Cc: Greg Kroah-Hartman <>
Cc: "Rafael J. Wysocki" <>
Cc: Yinghai Lu <>
Reviewed-by: Yasuaki Ishimatsu <>
Cc: <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
4 years agoIPC: bugfix for msgrcv with msgtyp < 0
Svenning Sørensen [Wed, 28 Aug 2013 23:35:17 +0000 (16:35 -0700)]
IPC: bugfix for msgrcv with msgtyp < 0

According to 'man msgrcv': "If msgtyp is less than 0, the first message of
the lowest type that is less than or equal to the absolute value of msgtyp
shall be received."

Bug: The kernel only returns a message if its type is 1; other messages
with type < abs(msgtype) will never get returned.

Fix: After having traversed the list to find the first message with the
lowest type, we need to actually return that message.

This regression was introduced by commit daaf74cf0867 ("ipc: refactor
msg list search into separate function")

Signed-off-by: Svenning Soerensen <>
Reviewed-by: Peter Hurley <>
Cc: <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
4 years agoOmnikey Cardman 4000: pull in ioctl.h in user header
Mike Frysinger [Wed, 28 Aug 2013 23:35:16 +0000 (16:35 -0700)]
Omnikey Cardman 4000: pull in ioctl.h in user header

This file uses the ioctl helpers (_IOR/_IOW/etc...), so include ioctl.h
for the definitions.

Signed-off-by: Mike Frysinger <>
Cc: Harald Welte <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
4 years agotimer_list: correct the iterator for timer_list
Nathan Zimmer [Wed, 28 Aug 2013 23:35:14 +0000 (16:35 -0700)]
timer_list: correct the iterator for timer_list

Correct an issue with /proc/timer_list reported by Holger.

When reading from the proc file with a sufficiently small buffer, 2k so
not really that small, there was one could get hung trying to read the
file a chunk at a time.

The timer_list_start function failed to account for the possibility that
the offset was adjusted outside the timer_list_next.

Signed-off-by: Nathan Zimmer <>
Reported-by: Holger Hans Peter Freyther <>
Cc: John Stultz <>
Cc: Thomas Gleixner <>
Cc: Berke Durak <>
Cc: Jeff Layton <>
Tested-by: Al Viro <>
Cc: <> # 3.10.x
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>