]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jun 2015 00:57:27 +0000 (09:57 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jun 2015 00:57:27 +0000 (09:57 +0900)
added patches:
fs-omfs-add-null-terminator-in-the-end-up-the-token-list.patch
hwmon-ntc_thermistor-ensure-iio-channel-is-of-type-iio_voltage.patch
lguest-fix-out-by-one-error-in-address-checking.patch
libceph-request-a-new-osdmap-if-lingering-request-maps-to-no-osd.patch

queue-3.10/fs-omfs-add-null-terminator-in-the-end-up-the-token-list.patch [new file with mode: 0644]
queue-3.10/hwmon-ntc_thermistor-ensure-iio-channel-is-of-type-iio_voltage.patch [new file with mode: 0644]
queue-3.10/lguest-fix-out-by-one-error-in-address-checking.patch [new file with mode: 0644]
queue-3.10/libceph-request-a-new-osdmap-if-lingering-request-maps-to-no-osd.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/fs-omfs-add-null-terminator-in-the-end-up-the-token-list.patch b/queue-3.10/fs-omfs-add-null-terminator-in-the-end-up-the-token-list.patch
new file mode 100644 (file)
index 0000000..a6927db
--- /dev/null
@@ -0,0 +1,45 @@
+From dcbff39da3d815f08750552fdd04f96b51751129 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sasha.levin@oracle.com>
+Date: Thu, 28 May 2015 15:44:29 -0700
+Subject: fs, omfs: add NULL terminator in the end up the token list
+
+From: Sasha Levin <sasha.levin@oracle.com>
+
+commit dcbff39da3d815f08750552fdd04f96b51751129 upstream.
+
+match_token() expects a NULL terminator at the end of the token list so
+that it would know where to stop.  Not having one causes it to overrun
+to invalid memory.
+
+In practice, passing a mount option that omfs didn't recognize would
+sometimes panic the system.
+
+Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
+Signed-off-by: Bob Copeland <me@bobcopeland.com>
+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@linuxfoundation.org>
+
+---
+ fs/omfs/inode.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/fs/omfs/inode.c
++++ b/fs/omfs/inode.c
+@@ -361,7 +361,7 @@ nomem:
+ }
+ enum {
+-      Opt_uid, Opt_gid, Opt_umask, Opt_dmask, Opt_fmask
++      Opt_uid, Opt_gid, Opt_umask, Opt_dmask, Opt_fmask, Opt_err
+ };
+ static const match_table_t tokens = {
+@@ -370,6 +370,7 @@ static const match_table_t tokens = {
+       {Opt_umask, "umask=%o"},
+       {Opt_dmask, "dmask=%o"},
+       {Opt_fmask, "fmask=%o"},
++      {Opt_err, NULL},
+ };
+ static int parse_options(char *options, struct omfs_sb_info *sbi)
diff --git a/queue-3.10/hwmon-ntc_thermistor-ensure-iio-channel-is-of-type-iio_voltage.patch b/queue-3.10/hwmon-ntc_thermistor-ensure-iio-channel-is-of-type-iio_voltage.patch
new file mode 100644 (file)
index 0000000..bb78405
--- /dev/null
@@ -0,0 +1,48 @@
+From adba657533bdd255f7b78bc8a324091f46b294cd Mon Sep 17 00:00:00 2001
+From: Chris Lesiak <chris.lesiak@licor.com>
+Date: Tue, 26 May 2015 15:40:44 -0500
+Subject: hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE
+
+From: Chris Lesiak <chris.lesiak@licor.com>
+
+commit adba657533bdd255f7b78bc8a324091f46b294cd upstream.
+
+When configured via device tree, the associated iio device needs to be
+measuring voltage for the conversion to resistance to be correct.
+Return -EINVAL if that is not the case.
+
+Signed-off-by: Chris Lesiak <chris.lesiak@licor.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/ntc_thermistor.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/hwmon/ntc_thermistor.c
++++ b/drivers/hwmon/ntc_thermistor.c
+@@ -181,8 +181,10 @@ static struct ntc_thermistor_platform_da
+ ntc_thermistor_parse_dt(struct platform_device *pdev)
+ {
+       struct iio_channel *chan;
++      enum iio_chan_type type;
+       struct device_node *np = pdev->dev.of_node;
+       struct ntc_thermistor_platform_data *pdata;
++      int ret;
+       if (!np)
+               return NULL;
+@@ -195,6 +197,13 @@ ntc_thermistor_parse_dt(struct platform_
+       if (IS_ERR(chan))
+               return ERR_CAST(chan);
++      ret = iio_get_channel_type(chan, &type);
++      if (ret < 0)
++              return ERR_PTR(ret);
++
++      if (type != IIO_VOLTAGE)
++              return ERR_PTR(-EINVAL);
++
+       if (of_property_read_u32(np, "pullup-uv", &pdata->pullup_uv))
+               return ERR_PTR(-ENODEV);
+       if (of_property_read_u32(np, "pullup-ohm", &pdata->pullup_ohm))
diff --git a/queue-3.10/lguest-fix-out-by-one-error-in-address-checking.patch b/queue-3.10/lguest-fix-out-by-one-error-in-address-checking.patch
new file mode 100644 (file)
index 0000000..0c53d11
--- /dev/null
@@ -0,0 +1,33 @@
+From 83a35114d0e4583e6b0ca39502e68b6a92e2910c Mon Sep 17 00:00:00 2001
+From: Rusty Russell <rusty@rustcorp.com.au>
+Date: Wed, 27 May 2015 10:59:26 +0930
+Subject: lguest: fix out-by-one error in address checking.
+
+From: Rusty Russell <rusty@rustcorp.com.au>
+
+commit 83a35114d0e4583e6b0ca39502e68b6a92e2910c upstream.
+
+This bug has been there since day 1; addresses in the top guest physical
+page weren't considered valid.  You could map that page (the check in
+check_gpte() is correct), but if a guest tried to put a pagetable there
+we'd check that address manually when walking it, and kill the guest.
+
+Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/lguest/core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/lguest/core.c
++++ b/drivers/lguest/core.c
+@@ -176,7 +176,7 @@ static void unmap_switcher(void)
+ bool lguest_address_ok(const struct lguest *lg,
+                      unsigned long addr, unsigned long len)
+ {
+-      return (addr+len) / PAGE_SIZE < lg->pfn_limit && (addr+len >= addr);
++      return addr+len <= lg->pfn_limit * PAGE_SIZE && (addr+len >= addr);
+ }
+ /*
diff --git a/queue-3.10/libceph-request-a-new-osdmap-if-lingering-request-maps-to-no-osd.patch b/queue-3.10/libceph-request-a-new-osdmap-if-lingering-request-maps-to-no-osd.patch
new file mode 100644 (file)
index 0000000..13e7a0a
--- /dev/null
@@ -0,0 +1,94 @@
+From b0494532214bdfbf241e94fabab5dd46f7b82631 Mon Sep 17 00:00:00 2001
+From: Ilya Dryomov <idryomov@gmail.com>
+Date: Mon, 11 May 2015 17:53:10 +0300
+Subject: libceph: request a new osdmap if lingering request maps to no osd
+
+From: Ilya Dryomov <idryomov@gmail.com>
+
+commit b0494532214bdfbf241e94fabab5dd46f7b82631 upstream.
+
+This commit does two things.  First, if there are any homeless
+lingering requests, we now request a new osdmap even if the osdmap that
+is being processed brought no changes, i.e. if a given lingering
+request turned homeless in one of the previous epochs and remained
+homeless in the current epoch.  Not doing so leaves us with a stale
+osdmap and as a result we may miss our window for reestablishing the
+watch and lose notifies.
+
+MON=1 OSD=1:
+
+    # cat linger-needmap.sh
+    #!/bin/bash
+    rbd create --size 1 test
+    DEV=$(rbd map test)
+    ceph osd out 0
+    rbd map dne/dne # obtain a new osdmap as a side effect (!)
+    sleep 1
+    ceph osd in 0
+    rbd resize --size 2 test
+    # rbd info test | grep size -> 2M
+    # blockdev --getsize $DEV -> 1M
+
+N.B.: Not obtaining a new osdmap in between "osd out" and "osd in"
+above is enough to make it miss that resize notify, but that is a
+bug^Wlimitation of ceph watch/notify v1.
+
+Second, homeless lingering requests are now kicked just like those
+lingering requests whose mapping has changed.  This is mainly to
+recognize that a homeless lingering request makes no sense and to
+preserve the invariant that a registered lingering request is not
+sitting on any of r_req_lru_item lists.  This spares us a WARN_ON,
+which commit ba9d114ec557 ("libceph: clear r_req_lru_item in
+__unregister_linger_request()") tried to fix the _wrong_ way.
+
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Reviewed-by: Sage Weil <sage@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/ceph/osd_client.c |   31 ++++++++++++++++++++-----------
+ 1 file changed, 20 insertions(+), 11 deletions(-)
+
+--- a/net/ceph/osd_client.c
++++ b/net/ceph/osd_client.c
+@@ -1702,20 +1702,29 @@ static void kick_requests(struct ceph_os
+               err = __map_request(osdc, req,
+                                   force_resend || force_resend_writes);
+               dout("__map_request returned %d\n", err);
+-              if (err == 0)
+-                      continue;  /* no change and no osd was specified */
+               if (err < 0)
+                       continue;  /* hrm! */
+-              if (req->r_osd == NULL) {
+-                      dout("tid %llu maps to no valid osd\n", req->r_tid);
+-                      needmap++;  /* request a newer map */
+-                      continue;
+-              }
++              if (req->r_osd == NULL || err > 0) {
++                      if (req->r_osd == NULL) {
++                              dout("lingering %p tid %llu maps to no osd\n",
++                                   req, req->r_tid);
++                              /*
++                               * A homeless lingering request makes
++                               * no sense, as it's job is to keep
++                               * a particular OSD connection open.
++                               * Request a newer map and kick the
++                               * request, knowing that it won't be
++                               * resent until we actually get a map
++                               * that can tell us where to send it.
++                               */
++                              needmap++;
++                      }
+-              dout("kicking lingering %p tid %llu osd%d\n", req, req->r_tid,
+-                   req->r_osd ? req->r_osd->o_osd : -1);
+-              __register_request(osdc, req);
+-              __unregister_linger_request(osdc, req);
++                      dout("kicking lingering %p tid %llu osd%d\n", req,
++                           req->r_tid, req->r_osd ? req->r_osd->o_osd : -1);
++                      __register_request(osdc, req);
++                      __unregister_linger_request(osdc, req);
++              }
+       }
+       reset_changed_osds(osdc);
+       mutex_unlock(&osdc->request_mutex);
index dd92501deb3cdb247a68fb39eb2b32477161798b..adff3f3d68cafdfbe79a9625c8b1716a4783e7b8 100644 (file)
@@ -6,3 +6,7 @@ staging-rtl8192e-llvmlinux-remove-unused-inline-prototype.patch
 kernel-use-the-gnu89-standard-explicitly.patch
 net-socket-fix-the-wrong-returns-for-recvmsg-and-sendmsg.patch
 kvm-mmu-fix-cr4.smep-1-cr0.wp-0-with-shadow-pages.patch
+fs-omfs-add-null-terminator-in-the-end-up-the-token-list.patch
+lguest-fix-out-by-one-error-in-address-checking.patch
+libceph-request-a-new-osdmap-if-lingering-request-maps-to-no-osd.patch
+hwmon-ntc_thermistor-ensure-iio-channel-is-of-type-iio_voltage.patch