]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Apr 2012 17:06:36 +0000 (10:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Apr 2012 17:06:36 +0000 (10:06 -0700)
added patches:
net-usb-cdc_eem-fix-mtu.patch
rose_dev-fix-memcpy-bug-in-rose_set_mac_address.patch
x86-bpf_jit-fix-a-bug-in-emitting-the-16-bit-immediate-operand-of-and.patch

queue-3.0/net-usb-cdc_eem-fix-mtu.patch [new file with mode: 0644]
queue-3.0/rose_dev-fix-memcpy-bug-in-rose_set_mac_address.patch [new file with mode: 0644]
queue-3.0/series [new file with mode: 0644]
queue-3.0/x86-bpf_jit-fix-a-bug-in-emitting-the-16-bit-immediate-operand-of-and.patch [new file with mode: 0644]

diff --git a/queue-3.0/net-usb-cdc_eem-fix-mtu.patch b/queue-3.0/net-usb-cdc_eem-fix-mtu.patch
new file mode 100644 (file)
index 0000000..f98dc2a
--- /dev/null
@@ -0,0 +1,36 @@
+From 8571d69919724723b3b66f4566b29424bc9eb9cf Mon Sep 17 00:00:00 2001
+From: Rabin Vincent <rabin@rab.in>
+Date: Thu, 29 Mar 2012 07:15:15 +0000
+Subject: net: usb: cdc_eem: fix mtu
+
+
+From: Rabin Vincent <rabin@rab.in>
+
+[ Upstream commit 78fb72f7936c01d5b426c03a691eca082b03f2b9 ]
+
+Make CDC EEM recalculate the hard_mtu after adjusting the
+hard_header_len.
+
+Without this, usbnet adjusts the MTU down to 1494 bytes, and the host is
+unable to receive standard 1500-byte frames from the device.
+
+Tested with the Linux USB Ethernet gadget.
+
+Cc: Oliver Neukum <oliver@neukum.name>
+Signed-off-by: Rabin Vincent <rabin@rab.in>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/usb/cdc_eem.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/usb/cdc_eem.c
++++ b/drivers/net/usb/cdc_eem.c
+@@ -93,6 +93,7 @@ static int eem_bind(struct usbnet *dev,
+       /* no jumbogram (16K) support for now */
+       dev->net->hard_header_len += EEM_HEAD + ETH_FCS_LEN;
++      dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
+       return 0;
+ }
diff --git a/queue-3.0/rose_dev-fix-memcpy-bug-in-rose_set_mac_address.patch b/queue-3.0/rose_dev-fix-memcpy-bug-in-rose_set_mac_address.patch
new file mode 100644 (file)
index 0000000..8f895c0
--- /dev/null
@@ -0,0 +1,39 @@
+From 0ae11904bcc55515d8f1765d985aa9cdfadc9fef Mon Sep 17 00:00:00 2001
+From: "danborkmann@iogearbox.net" <danborkmann@iogearbox.net>
+Date: Tue, 27 Mar 2012 22:47:43 +0000
+Subject: rose_dev: fix memcpy-bug in rose_set_mac_address
+
+
+From: "danborkmann@iogearbox.net" <danborkmann@iogearbox.net>
+
+[ Upstream commit 81213b5e8ae68e204aa7a3f83c4f9100405dbff9 ]
+
+If both addresses equal, nothing needs to be done. If the device is down,
+then we simply copy the new address to dev->dev_addr. If the device is up,
+then we add another loopback device with the new address, and if that does
+not fail, we remove the loopback device with the old address. And only
+then, we update the dev->dev_addr.
+
+Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/rose/rose_dev.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/net/rose/rose_dev.c
++++ b/net/rose/rose_dev.c
+@@ -96,11 +96,11 @@ static int rose_set_mac_address(struct n
+       struct sockaddr *sa = addr;
+       int err;
+-      if (!memcpy(dev->dev_addr, sa->sa_data, dev->addr_len))
++      if (!memcmp(dev->dev_addr, sa->sa_data, dev->addr_len))
+               return 0;
+       if (dev->flags & IFF_UP) {
+-              err = rose_add_loopback_node((rose_address *)dev->dev_addr);
++              err = rose_add_loopback_node((rose_address *)sa->sa_data);
+               if (err)
+                       return err;
diff --git a/queue-3.0/series b/queue-3.0/series
new file mode 100644 (file)
index 0000000..6f355cc
--- /dev/null
@@ -0,0 +1,3 @@
+x86-bpf_jit-fix-a-bug-in-emitting-the-16-bit-immediate-operand-of-and.patch
+rose_dev-fix-memcpy-bug-in-rose_set_mac_address.patch
+net-usb-cdc_eem-fix-mtu.patch
diff --git a/queue-3.0/x86-bpf_jit-fix-a-bug-in-emitting-the-16-bit-immediate-operand-of-and.patch b/queue-3.0/x86-bpf_jit-fix-a-bug-in-emitting-the-16-bit-immediate-operand-of-and.patch
new file mode 100644 (file)
index 0000000..8bebdff
--- /dev/null
@@ -0,0 +1,33 @@
+From fdb0d05a8632bd03784309760fb11c0d5cf0de3f Mon Sep 17 00:00:00 2001
+From: "zhuangfeiran@ict.ac.cn" <zhuangfeiran@ict.ac.cn>
+Date: Wed, 28 Mar 2012 23:27:00 +0000
+Subject: x86 bpf_jit: fix a bug in emitting the 16-bit immediate operand of AND
+
+
+From: "zhuangfeiran@ict.ac.cn" <zhuangfeiran@ict.ac.cn>
+
+[ Upstream commit 1d24fb3684f347226747c6b11ea426b7b992694e ]
+
+When K >= 0xFFFF0000, AND needs the two least significant bytes of K as
+its operand, but EMIT2() gives it the least significant byte of K and
+0x2. EMIT() should be used here to replace EMIT2().
+
+Signed-off-by: Feiran Zhuang  <zhuangfeiran@ict.ac.cn>
+Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/net/bpf_jit_comp.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/net/bpf_jit_comp.c
++++ b/arch/x86/net/bpf_jit_comp.c
+@@ -289,7 +289,7 @@ void bpf_jit_compile(struct sk_filter *f
+                                       EMIT2(0x24, K & 0xFF); /* and imm8,%al */
+                               } else if (K >= 0xFFFF0000) {
+                                       EMIT2(0x66, 0x25);      /* and imm16,%ax */
+-                                      EMIT2(K, 2);
++                                      EMIT(K, 2);
+                               } else {
+                                       EMIT1_off32(0x25, K);   /* and imm32,%eax */
+                               }