--- /dev/null
+From 10636bc2d60942254bda149827b922c41f4cb4af Mon Sep 17 00:00:00 2001
+From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+Date: Sat, 10 Dec 2011 18:59:43 +0530
+Subject: ath9k: fix max phy rate at rate control init
+
+From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+
+commit 10636bc2d60942254bda149827b922c41f4cb4af upstream.
+
+The stations always chooses 1Mbps for all trasmitting frames,
+whenever the AP is configured to lock the supported rates.
+As the max phy rate is always set with the 4th from highest phy rate,
+this assumption might be wrong if we have less than that. Fix that.
+
+Cc: Paul Stewart <pstew@google.com>
+Reported-by: Ajay Gummalla <agummalla@google.com>
+Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/ath/ath9k/rc.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/ath/ath9k/rc.c
++++ b/drivers/net/wireless/ath/ath9k/rc.c
+@@ -1250,7 +1250,9 @@ static void ath_rc_init(struct ath_softc
+
+ ath_rc_priv->max_valid_rate = k;
+ ath_rc_sort_validrates(rate_table, ath_rc_priv);
+- ath_rc_priv->rate_max_phy = ath_rc_priv->valid_rate_index[k-4];
++ ath_rc_priv->rate_max_phy = (k > 4) ?
++ ath_rc_priv->valid_rate_index[k-4] :
++ ath_rc_priv->valid_rate_index[k-1];
+ ath_rc_priv->rate_table = rate_table;
+
+ ath_dbg(common, ATH_DBG_CONFIG,
--- /dev/null
+From e0197aae59e55c06db172bfbe1a1cdb8c0e1cab3 Mon Sep 17 00:00:00 2001
+From: Mandeep Singh Baines <msb@chromium.org>
+Date: Thu, 15 Dec 2011 11:36:43 -0800
+Subject: cgroups: fix a css_set not found bug in cgroup_attach_proc
+
+From: Mandeep Singh Baines <msb@chromium.org>
+
+commit e0197aae59e55c06db172bfbe1a1cdb8c0e1cab3 upstream.
+
+There is a BUG when migrating a PF_EXITING proc. Since css_set_prefetch()
+is not called for the PF_EXITING case, find_existing_css_set() will return
+NULL inside cgroup_task_migrate() causing a BUG.
+
+This bug is easy to reproduce. Create a zombie and echo its pid to
+cgroup.procs.
+
+$ cat zombie.c
+\#include <unistd.h>
+
+int main()
+{
+ if (fork())
+ pause();
+ return 0;
+}
+$
+
+We are hitting this bug pretty regularly on ChromeOS.
+
+This bug is already fixed by Tejun Heo's cgroup patchset which is
+targetted for the next merge window:
+
+https://lkml.org/lkml/2011/11/1/356
+
+I've create a smaller patch here which just fixes this bug so that a
+fix can be merged into the current release and stable.
+
+Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
+Downstream-Bug-Report: http://crosbug.com/23953
+Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Cc: containers@lists.linux-foundation.org
+Cc: cgroups@vger.kernel.org
+Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
+Cc: Frederic Weisbecker <fweisbec@gmail.com>
+Cc: Oleg Nesterov <oleg@redhat.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Paul Menage <paul@paulmenage.org>
+Cc: Olof Johansson <olofj@chromium.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/cgroup.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+--- a/kernel/cgroup.c
++++ b/kernel/cgroup.c
+@@ -2098,11 +2098,6 @@ int cgroup_attach_proc(struct cgroup *cg
+ continue;
+ /* get old css_set pointer */
+ task_lock(tsk);
+- if (tsk->flags & PF_EXITING) {
+- /* ignore this task if it's going away */
+- task_unlock(tsk);
+- continue;
+- }
+ oldcg = tsk->cgroups;
+ get_css_set(oldcg);
+ task_unlock(tsk);
--- /dev/null
+From 78feb35b8161acd95c33a703ed6ab6f554d29387 Mon Sep 17 00:00:00 2001
+From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
+Date: Wed, 14 Dec 2011 08:22:36 -0800
+Subject: iwlwifi: allow to switch to HT40 if not associated
+
+From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
+
+commit 78feb35b8161acd95c33a703ed6ab6f554d29387 upstream.
+
+My previous patch
+34a5b4b6af104cf18eb50748509528b9bdbc4036 iwlwifi: do not re-configure
+HT40 after associated
+
+Fix the case of HT40 after association on specified AP, but it break the
+association for some APs and cause not able to establish connection.
+We need to address HT40 before and after addociation.
+
+Reported-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
+Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
+Tested-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
++++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+@@ -620,8 +620,8 @@ int iwlagn_mac_config(struct ieee80211_h
+ if (ctx->ht.enabled) {
+ /* if HT40 is used, it should not change
+ * after associated except channel switch */
+- if (iwl_is_associated_ctx(ctx) &&
+- !ctx->ht.is_40mhz)
++ if (!ctx->ht.is_40mhz ||
++ !iwl_is_associated_ctx(ctx))
+ iwlagn_config_ht40(conf, ctx);
+ } else
+ ctx->ht.is_40mhz = false;
--- /dev/null
+From 123877b80ed62c3b897c53357b622574c023b642 Mon Sep 17 00:00:00 2001
+From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
+Date: Thu, 8 Dec 2011 15:52:00 -0800
+Subject: iwlwifi: do not set the sequence control bit is not needed
+
+From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
+
+commit 123877b80ed62c3b897c53357b622574c023b642 upstream.
+
+Check the IEEE80211_TX_CTL_ASSIGN_SEQ flag from mac80211, then decide how to
+set the TX_CMD_FLG_SEQ_CTL_MSK bit. Setting the wrong bit in BAR frame whill
+make the firmware to increment the sequence number which is incorrect and
+cause unknown behavior.
+
+Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
++++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+@@ -166,7 +166,10 @@ static void iwlagn_tx_cmd_build_basic(st
+ tx_cmd->tid_tspec = qc[0] & 0xf;
+ tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK;
+ } else {
+- tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
++ if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)
++ tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
++ else
++ tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK;
+ }
+
+ iwlagn_tx_cmd_protection(priv, info, fc, &tx_flags);
--- /dev/null
+From d1ee8878a142f81ea1b40d602c6360b752829437 Mon Sep 17 00:00:00 2001
+From: Gary Thomas <gary@mlbassoc.com>
+Date: Thu, 1 Dec 2011 08:51:09 -0300
+Subject: media: omap_vout: Fix compile error in 3.1
+
+From: Gary Thomas <gary@mlbassoc.com>
+
+commit d1ee8878a142f81ea1b40d602c6360b752829437 upstream.
+
+This patch is against the mainline v3.1 release (c3b92c8) and
+fixes a compile error when building for OMAP3+DSS+VOUT
+
+Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+Signed-off-by: Gary Thomas <gary@mlbassoc.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/omap/omap_vout.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/media/video/omap/omap_vout.c
++++ b/drivers/media/video/omap/omap_vout.c
+@@ -38,6 +38,7 @@
+ #include <linux/irq.h>
+ #include <linux/videodev2.h>
+ #include <linux/dma-mapping.h>
++#include <linux/slab.h>
+
+ #include <media/videobuf-dma-contig.h>
+ #include <media/v4l2-device.h>
--- /dev/null
+From f83f71fda27650ae43558633be93652577dbc38c Mon Sep 17 00:00:00 2001
+From: Sylwester Nawrocki <s.nawrocki@samsung.com>
+Date: Fri, 4 Nov 2011 10:07:06 -0300
+Subject: media: s5p-fimc: Use correct fourcc for RGB565 colour format
+
+From: Sylwester Nawrocki <s.nawrocki@samsung.com>
+
+commit f83f71fda27650ae43558633be93652577dbc38c upstream.
+
+With 16-bit RGB565 colour format pixels are stored by the device in memory
+in the following order:
+
+ | b3 | b2 | b1 | b0 |
+ ~+-----+-----+-----+-----+
+ | R5 G6 B5 | R5 G6 B5 |
+
+This corresponds to V4L2_PIX_FMT_RGB565 fourcc, not V4L2_PIX_FMT_RGB565X.
+This change is required to avoid trouble when setting up video pipeline
+with the s5p-tv devices, so the colour formats at both devices can be
+properly matched.
+
+Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
+Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/s5p-fimc/fimc-core.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/video/s5p-fimc/fimc-core.c
++++ b/drivers/media/video/s5p-fimc/fimc-core.c
+@@ -35,7 +35,7 @@ static char *fimc_clocks[MAX_FIMC_CLOCKS
+ static struct fimc_fmt fimc_formats[] = {
+ {
+ .name = "RGB565",
+- .fourcc = V4L2_PIX_FMT_RGB565X,
++ .fourcc = V4L2_PIX_FMT_RGB565,
+ .depth = { 16 },
+ .color = S5P_FIMC_RGB565,
+ .memplanes = 1,
--- /dev/null
+From 8653be1afd60d6e8c36139b487e375b70357d9ef Mon Sep 17 00:00:00 2001
+From: Ilya Yanok <yanok@emcraft.com>
+Date: Mon, 1 Aug 2011 23:00:28 +0200
+Subject: mfd: Fix twl-core oops while calling twl_i2c_* for unbound driver
+
+From: Ilya Yanok <yanok@emcraft.com>
+
+commit 8653be1afd60d6e8c36139b487e375b70357d9ef upstream.
+
+Check inuse variable before trying to access twl_map to prevent
+dereferencing of uninitialized variable.
+
+Signed-off-by: Ilya Yanok <yanok@emcraft.com>
+Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/mfd/twl-core.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/drivers/mfd/twl-core.c
++++ b/drivers/mfd/twl-core.c
+@@ -362,13 +362,13 @@ int twl_i2c_write(u8 mod_no, u8 *value,
+ pr_err("%s: invalid module number %d\n", DRIVER_NAME, mod_no);
+ return -EPERM;
+ }
+- sid = twl_map[mod_no].sid;
+- twl = &twl_modules[sid];
+-
+ if (unlikely(!inuse)) {
+- pr_err("%s: client %d is not initialized\n", DRIVER_NAME, sid);
++ pr_err("%s: not initialized\n", DRIVER_NAME);
+ return -EPERM;
+ }
++ sid = twl_map[mod_no].sid;
++ twl = &twl_modules[sid];
++
+ mutex_lock(&twl->xfer_lock);
+ /*
+ * [MSG1]: fill the register address data
+@@ -419,13 +419,13 @@ int twl_i2c_read(u8 mod_no, u8 *value, u
+ pr_err("%s: invalid module number %d\n", DRIVER_NAME, mod_no);
+ return -EPERM;
+ }
+- sid = twl_map[mod_no].sid;
+- twl = &twl_modules[sid];
+-
+ if (unlikely(!inuse)) {
+- pr_err("%s: client %d is not initialized\n", DRIVER_NAME, sid);
++ pr_err("%s: not initialized\n", DRIVER_NAME);
+ return -EPERM;
+ }
++ sid = twl_map[mod_no].sid;
++ twl = &twl_modules[sid];
++
+ mutex_lock(&twl->xfer_lock);
+ /* [MSG1] fill the register address data */
+ msg = &twl->xfer_msg[0];
--- /dev/null
+From 61074287c2965edf0fc75b54ae8f4ce99f182669 Mon Sep 17 00:00:00 2001
+From: Rusty Russell <rusty@rustcorp.com.au>
+Date: Thu, 15 Dec 2011 13:34:50 +1030
+Subject: mmc: vub300: fix type of firmware_rom_wait_states module parameter
+
+From: Rusty Russell <rusty@rustcorp.com.au>
+
+commit 61074287c2965edf0fc75b54ae8f4ce99f182669 upstream.
+
+You didn't mean this to be a bool.
+
+Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
+Acked-by: Tony Olech <tony.olech@elandigitalsystems.com>
+Signed-off-by: Chris Ball <cjb@laptop.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/mmc/host/vub300.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mmc/host/vub300.c
++++ b/drivers/mmc/host/vub300.c
+@@ -259,7 +259,7 @@ static int firmware_rom_wait_states = 0x
+ static int firmware_rom_wait_states = 0x1C;
+ #endif
+
+-module_param(firmware_rom_wait_states, bool, 0644);
++module_param(firmware_rom_wait_states, int, 0644);
+ MODULE_PARM_DESC(firmware_rom_wait_states,
+ "ROM wait states byte=RRRIIEEE (Reserved Internal External)");
+
--- /dev/null
+From 695c60f21c69e525a89279a5f35bae4ff237afbc Mon Sep 17 00:00:00 2001
+From: Thomas Meyer <thomas@m3y3r.de>
+Date: Mon, 19 Dec 2011 17:11:55 -0800
+Subject: nilfs2: unbreak compat ioctl
+
+From: Thomas Meyer <thomas@m3y3r.de>
+
+commit 695c60f21c69e525a89279a5f35bae4ff237afbc upstream.
+
+commit 828b1c50ae ("nilfs2: add compat ioctl") incidentally broke all
+other NILFS compat ioctls. Make them work again.
+
+Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
+Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
+Tested-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/nilfs2/ioctl.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/fs/nilfs2/ioctl.c
++++ b/fs/nilfs2/ioctl.c
+@@ -842,6 +842,19 @@ long nilfs_compat_ioctl(struct file *fil
+ case FS_IOC32_GETVERSION:
+ cmd = FS_IOC_GETVERSION;
+ break;
++ case NILFS_IOCTL_CHANGE_CPMODE:
++ case NILFS_IOCTL_DELETE_CHECKPOINT:
++ case NILFS_IOCTL_GET_CPINFO:
++ case NILFS_IOCTL_GET_CPSTAT:
++ case NILFS_IOCTL_GET_SUINFO:
++ case NILFS_IOCTL_GET_SUSTAT:
++ case NILFS_IOCTL_GET_VINFO:
++ case NILFS_IOCTL_GET_BDESCS:
++ case NILFS_IOCTL_CLEAN_SEGMENTS:
++ case NILFS_IOCTL_SYNC:
++ case NILFS_IOCTL_RESIZE:
++ case NILFS_IOCTL_SET_ALLOC_RANGE:
++ break;
+ default:
+ return -ENOIOCTLCMD;
+ }
nfs-fix-a-regression-in-nfs_file_llseek.patch
nfsv4.1-ensure-that-we-handle-_all_-sequence-status-bits.patch
selinux-fix-rcu-deref-check-warning-in-sel_netport_insert.patch
+media-omap_vout-fix-compile-error-in-3.1.patch
+nilfs2-unbreak-compat-ioctl.patch
+mmc-vub300-fix-type-of-firmware_rom_wait_states-module-parameter.patch
+cgroups-fix-a-css_set-not-found-bug-in-cgroup_attach_proc.patch
+mfd-fix-twl-core-oops-while-calling-twl_i2c_-for-unbound-driver.patch
+vfs-__read_cache_page-should-use-gfp-argument-rather-than-gfp_kernel.patch
+media-s5p-fimc-use-correct-fourcc-for-rgb565-colour-format.patch
+ath9k-fix-max-phy-rate-at-rate-control-init.patch
+iwlwifi-do-not-set-the-sequence-control-bit-is-not-needed.patch
+iwlwifi-allow-to-switch-to-ht40-if-not-associated.patch
--- /dev/null
+From e6f67b8c05f5e129e126f4409ddac6f25f58ffcb Mon Sep 17 00:00:00 2001
+From: Dave Kleikamp <dave.kleikamp@oracle.com>
+Date: Wed, 21 Dec 2011 11:05:48 -0600
+Subject: vfs: __read_cache_page should use gfp argument rather than GFP_KERNEL
+
+From: Dave Kleikamp <dave.kleikamp@oracle.com>
+
+commit e6f67b8c05f5e129e126f4409ddac6f25f58ffcb upstream.
+
+lockdep reports a deadlock in jfs because a special inode's rw semaphore
+is taken recursively. The mapping's gfp mask is GFP_NOFS, but is not
+used when __read_cache_page() calls add_to_page_cache_lru().
+
+Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
+Acked-by: Hugh Dickins <hughd@google.com>
+Acked-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ mm/filemap.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+--- a/mm/filemap.c
++++ b/mm/filemap.c
+@@ -1828,7 +1828,7 @@ repeat:
+ page = __page_cache_alloc(gfp | __GFP_COLD);
+ if (!page)
+ return ERR_PTR(-ENOMEM);
+- err = add_to_page_cache_lru(page, mapping, index, GFP_KERNEL);
++ err = add_to_page_cache_lru(page, mapping, index, gfp);
+ if (unlikely(err)) {
+ page_cache_release(page);
+ if (err == -EEXIST)
+@@ -1925,10 +1925,7 @@ static struct page *wait_on_page_read(st
+ * @gfp: the page allocator flags to use if allocating
+ *
+ * This is the same as "read_mapping_page(mapping, index, NULL)", but with
+- * any new page allocations done using the specified allocation flags. Note
+- * that the Radix tree operations will still use GFP_KERNEL, so you can't
+- * expect to do this atomically or anything like that - but you can pass in
+- * other page requirements.
++ * any new page allocations done using the specified allocation flags.
+ *
+ * If the page does not get brought uptodate, return -EIO.
+ */