--- /dev/null
+From 0db3fa2741ad8371c21b3a6785416a4afc0cc1d4 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <hans.verkuil@cisco.com>
+Date: Fri, 4 Oct 2013 11:01:43 -0300
+Subject: [media] cxd2820r_core: fix sparse warnings
+
+From: Hans Verkuil <hans.verkuil@cisco.com>
+
+commit 0db3fa2741ad8371c21b3a6785416a4afc0cc1d4 upstream.
+
+drivers/media/dvb-frontends/cxd2820r_core.c:34:32: error: cannot size expression
+drivers/media/dvb-frontends/cxd2820r_core.c:68:32: error: cannot size expression
+
+Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
+Acked-by: Antti Palosaari <crope@iki.fi>
+Reviewed-by: Antti Palosaari <crope@iki.fi>
+Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
+Cc: Frederik Himpe <fhimpe@telenet.be>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/dvb-frontends/cxd2820r_core.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/dvb-frontends/cxd2820r_core.c
++++ b/drivers/media/dvb-frontends/cxd2820r_core.c
+@@ -34,7 +34,7 @@ static int cxd2820r_wr_regs_i2c(struct c
+ {
+ .addr = i2c,
+ .flags = 0,
+- .len = sizeof(buf),
++ .len = len + 1,
+ .buf = buf,
+ }
+ };
+@@ -75,7 +75,7 @@ static int cxd2820r_rd_regs_i2c(struct c
+ }, {
+ .addr = i2c,
+ .flags = I2C_M_RD,
+- .len = sizeof(buf),
++ .len = len,
+ .buf = buf,
+ }
+ };
--- /dev/null
+From 3873d064b8538686bbbd4b858dc8a07db1f7f43a Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Mon, 2 Dec 2013 19:59:31 +0100
+Subject: nfs: fix do_div() warning by instead using sector_div()
+
+From: Helge Deller <deller@gmx.de>
+
+commit 3873d064b8538686bbbd4b858dc8a07db1f7f43a upstream.
+
+When compiling a 32bit kernel with CONFIG_LBDAF=n the compiler complains like
+shown below. Fix this warning by instead using sector_div() which is provided
+by the kernel.h header file.
+
+fs/nfs/blocklayout/extents.c: In function ‘normalize’:
+include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast [enabled by default]
+fs/nfs/blocklayout/extents.c:47:13: note: in expansion of macro ‘do_div’
+nfs/blocklayout/extents.c:47:2: warning: right shift count >= width of type [enabled by default]
+fs/nfs/blocklayout/extents.c:47:2: warning: passing argument 1 of ‘__div64_32’ from incompatible pointer type [enabled by default]
+include/asm-generic/div64.h:35:17: note: expected ‘uint64_t *’ but argument is of type ‘sector_t *’
+ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfs/blocklayout/extents.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/nfs/blocklayout/extents.c
++++ b/fs/nfs/blocklayout/extents.c
+@@ -44,7 +44,7 @@
+ static inline sector_t normalize(sector_t s, int base)
+ {
+ sector_t tmp = s; /* Since do_div modifies its argument */
+- return s - do_div(tmp, base);
++ return s - sector_div(tmp, base);
+ }
+
+ static inline sector_t normalize_up(sector_t s, int base)
--- /dev/null
+From f9f9ffc237dd924f048204e8799da74f9ecf40cf Mon Sep 17 00:00:00 2001
+From: Ben Segall <bsegall@google.com>
+Date: Wed, 16 Oct 2013 11:16:32 -0700
+Subject: sched: Avoid throttle_cfs_rq() racing with period_timer stopping
+
+From: Ben Segall <bsegall@google.com>
+
+commit f9f9ffc237dd924f048204e8799da74f9ecf40cf upstream.
+
+throttle_cfs_rq() doesn't check to make sure that period_timer is running,
+and while update_curr/assign_cfs_runtime does, a concurrently running
+period_timer on another cpu could cancel itself between this cpu's
+update_curr and throttle_cfs_rq(). If there are no other cfs_rqs running
+in the tg to restart the timer, this causes the cfs_rq to be stranded
+forever.
+
+Fix this by calling __start_cfs_bandwidth() in throttle if the timer is
+inactive.
+
+(Also add some sched_debug lines for cfs_bandwidth.)
+
+Tested: make a run/sleep task in a cgroup, loop switching the cgroup
+between 1ms/100ms quota and unlimited, checking for timer_active=0 and
+throttled=1 as a failure. With the throttle_cfs_rq() change commented out
+this fails, with the full patch it passes.
+
+Signed-off-by: Ben Segall <bsegall@google.com>
+Signed-off-by: Peter Zijlstra <peterz@infradead.org>
+Cc: pjt@google.com
+Link: http://lkml.kernel.org/r/20131016181632.22647.84174.stgit@sword-of-the-dawn.mtv.corp.google.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Cc: Chris J Arges <chris.j.arges@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/sched/debug.c | 8 ++++++++
+ kernel/sched/fair.c | 2 ++
+ 2 files changed, 10 insertions(+)
+
+--- a/kernel/sched/debug.c
++++ b/kernel/sched/debug.c
+@@ -224,6 +224,14 @@ void print_cfs_rq(struct seq_file *m, in
+ SEQ_printf(m, " .%-30s: %d\n", "tg->runnable_avg",
+ atomic_read(&cfs_rq->tg->runnable_avg));
+ #endif
++#ifdef CONFIG_CFS_BANDWIDTH
++ SEQ_printf(m, " .%-30s: %d\n", "tg->cfs_bandwidth.timer_active",
++ cfs_rq->tg->cfs_bandwidth.timer_active);
++ SEQ_printf(m, " .%-30s: %d\n", "throttled",
++ cfs_rq->throttled);
++ SEQ_printf(m, " .%-30s: %d\n", "throttle_count",
++ cfs_rq->throttle_count);
++#endif
+
+ print_cfs_group_stats(m, cpu, cfs_rq->tg);
+ #endif
+--- a/kernel/sched/fair.c
++++ b/kernel/sched/fair.c
+@@ -2288,6 +2288,8 @@ static void throttle_cfs_rq(struct cfs_r
+ cfs_rq->throttled_clock = rq->clock;
+ raw_spin_lock(&cfs_b->lock);
+ list_add_tail_rcu(&cfs_rq->throttled_list, &cfs_b->throttled_cfs_rq);
++ if (!cfs_b->timer_active)
++ __start_cfs_bandwidth(cfs_b);
+ raw_spin_unlock(&cfs_b->lock);
+ }
+
dm-space-map-metadata-return-on-failure-in-sm_metadata_new_block.patch
dm-table-fail-dm_table_create-on-dm_round_up-overflow.patch
dm-thin-switch-to-read-only-mode-if-a-mapping-insert-fails.patch
+nfs-fix-do_div-warning-by-instead-using-sector_div.patch
+cxd2820r_core-fix-sparse-warnings.patch
+sched-avoid-throttle_cfs_rq-racing-with-period_timer-stopping.patch
+staging-comedi-pcmuio-fix-possible-null-deref-on-detach.patch
--- /dev/null
+From 2fd2bdfccae61efe18f6b92b6a45fbf936d75b48 Mon Sep 17 00:00:00 2001
+From: Ian Abbott <abbotti@mev.co.uk>
+Date: Tue, 20 Aug 2013 11:50:19 +0100
+Subject: staging: comedi: pcmuio: fix possible NULL deref on detach
+
+From: Ian Abbott <abbotti@mev.co.uk>
+
+commit 2fd2bdfccae61efe18f6b92b6a45fbf936d75b48 upstream.
+
+pcmuio_detach() is called by the comedi core even if pcmuio_attach()
+returned an error, so `dev->private` might be `NULL`. Check for that
+before dereferencing it.
+
+Also, as pointed out by Dan Carpenter, there is no need to check the
+pointer passed to `kfree()` is non-NULL, so remove that check.
+
+Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
+Cc: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/comedi/drivers/pcmuio.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+--- a/drivers/staging/comedi/drivers/pcmuio.c
++++ b/drivers/staging/comedi/drivers/pcmuio.c
+@@ -935,12 +935,13 @@ static void pcmuio_detach(struct comedi_
+ struct pcmuio_private *devpriv = dev->private;
+ int i;
+
+- for (i = 0; i < MAX_ASICS; ++i) {
+- if (devpriv->asics[i].irq)
+- free_irq(devpriv->asics[i].irq, dev);
+- }
+- if (devpriv && devpriv->sprivs)
++ if (devpriv) {
++ for (i = 0; i < MAX_ASICS; ++i) {
++ if (devpriv->asics[i].irq)
++ free_irq(devpriv->asics[i].irq, dev);
++ }
+ kfree(devpriv->sprivs);
++ }
+ comedi_legacy_detach(dev);
+ }
+