* [PATCH 3.10 00/62] 3.10.27-stable review
@ 2014-01-14 0:26 Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 01/62] irqchip: renesas-irqc: Fix irqc_probe error handling Greg Kroah-Hartman
` (60 more replies)
0 siblings, 61 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, torvalds, akpm, stable
This is the start of the stable review cycle for the 3.10.27 release.
There are 62 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Thu Jan 16 00:26:56 UTC 2014.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.10.27-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 3.10.27-rc1
Paul Turner <pjt@google.com>
sched: Guarantee new group-entities always have weight
Ben Segall <bsegall@google.com>
sched: Fix hrtimer_cancel()/rq->lock deadlock
Ben Segall <bsegall@google.com>
sched: Fix cfs_bandwidth misuse of hrtimer_expires_remaining
Ben Segall <bsegall@google.com>
sched: Fix race on toggling cfs_bandwidth_used
Linus Torvalds <torvalds@linux-foundation.org>
x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround
Daniel Borkmann <dborkman@redhat.com>
netfilter: nf_nat: fix access to uninitialized buffer in IRC NAT helper
Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
SCSI: sd: Reduce buffer size for vpd request
Dirk Brandewie <dirk.j.brandewie@intel.com>
intel_pstate: Add X86_FEATURE_APERFMPERF to cpu match parameters.
Felix Fietkau <nbd@openwrt.org>
mac80211: move "bufferable MMPDU" check to fix AP mode scan
Lan Tianyu <tianyu.lan@intel.com>
ACPI / Battery: Add a _BIX quirk for NEC LZ750/LS
Jiang Liu <jiang.liu@linux.intel.com>
ACPI / TPM: fix memory leak when walking ACPI namespace
Thomas Gleixner <tglx@linutronix.de>
mfd: rtsx_pcr: Disable interrupts before cancelling delayed works
Andrew Bresticker <abrestic@chromium.org>
clk: exynos5250: fix sysmmu_mfc{l,r} gate clocks
Abhilash Kesavan <a.kesavan@samsung.com>
clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg clock
Seung-Woo Kim <sw0312.kim@samsung.com>
clk: samsung: exynos4: Correct SRC_MFC register
James Hogan <james.hogan@imgtec.com>
clk: clk-divider: fix divisor > 255 bug
Simon Guinot <sguinot@lacie.com>
ahci: add PCI ID for Marvell 88SE9170 SATA controller
John David Anglin <dave.anglin@bell.net>
parisc: Ensure full cache coherency for kmap/kunmap
Ilia Mirkin <imirkin@alum.mit.edu>
drm/nouveau/bios: make jump conditional
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
ARM: shmobile: mackerel: Fix coherent DMA mask
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
ARM: shmobile: armadillo: Fix coherent DMA mask
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
ARM: shmobile: kzm9g: Fix coherent DMA mask
Abhilash Kesavan <a.kesavan@samsung.com>
ARM: dts: exynos5250: Fix MDMA0 clock number
Russell King <rmk+kernel@arm.linux.org.uk>
ARM: fix "bad mode in ... handler" message for undefined instructions
Russell King <rmk+kernel@arm.linux.org.uk>
ARM: fix footbridge clockevent device
Simon Horman <horms@verge.net.au>
net: Loosen constraints for recalculating checksum in skb_segment()
Curt Brune <curt@cumulusnetworks.com>
bridge: use spin_lock_bh() in br_multicast_set_hash_max
David S. Miller <davem@davemloft.net>
netpoll: Fix missing TXQ unlock and and OOPS.
Daniel Borkmann <dborkman@redhat.com>
net: llc: fix use after free in llc_ui_recvmsg
Jason Wang <jasowang@redhat.com>
virtio-net: fix refill races during restore
Michael S. Tsirkin <mst@redhat.com>
virtio_net: don't leak memory or block when too many frags
Michael S. Tsirkin <mst@redhat.com>
virtio-net: make all RX paths handle errors consistently
Michael S. Tsirkin <mst@redhat.com>
virtio_net: fix error handling for mergeable buffers
David S. Miller <davem@davemloft.net>
vlan: Fix header ops passthru when doing TX VLAN offload.
Florian Westphal <fw@strlen.de>
net: rose: restore old recvmsg behavior
Sasha Levin <sasha.levin@oracle.com>
rds: prevent dereference of a NULL device
Li RongQing <roy.qing.li@gmail.com>
ipv6: always set the new created dst's from in ip6_rt_copy
Eric Dumazet <edumazet@google.com>
net: fec: fix potential use after free
Salva Peiró <speiro@ai2.upv.es>
hamradio/yam: fix info leak in ioctl
Wenliang Fan <fanwlexca@gmail.com>
drivers/net/hamradio: Integer overflow in hdlcdrv_ioctl()
Daniel Borkmann <dborkman@redhat.com>
net: inet_diag: zero out uninitialized idiag_{src,dst} fields
Timo Teräs <timo.teras@iki.fi>
ip_gre: fix msg_name parsing for recvfrom/recvmsg
Sasha Levin <sasha.levin@oracle.com>
net: unix: allow bind to fail on mutex lock
Hannes Frederic Sowa <hannes@stressinduktion.org>
ipv6: fix illegal mac_header comparison on 32bit
Jason Wang <jasowang@redhat.com>
netvsc: don't flush peers notifying work during setting mtu
Nat Gurumoorthy <natg@google.com>
tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0
Sasha Levin <sasha.levin@oracle.com>
net: unix: allow set_peek_off to fail
Changli Gao <xiaosuo@gmail.com>
net: drop_monitor: fix the value of maxattr
Hannes Frederic Sowa <hannes@stressinduktion.org>
ipv6: don't count addrconf generated routes against gc limit
Daniel Borkmann <dborkman@redhat.com>
packet: fix send path when running with proto == 0
Andrey Vagin <avagin@openvz.org>
virtio: delete napi structures from netdev before releasing memory
Jason Wang <jasowang@redhat.com>
macvtap: signal truncated packets
Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
tun: update file current position
Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
macvtap: update file current position
Vlad Yasevich <vyasevic@redhat.com>
macvtap: Do not double-count received packets
Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
rds: prevent BUG_ON triggered on congestion update to loopback
Eric Dumazet <edumazet@google.com>
net: do not pretend FRAGLIST support
Kamala R <kamala@aristanetworks.com>
IPv6: Fixed support for blackhole and prohibit routes
Nestor Lopez Casado <nlopezcasad@logitech.com>
HID: Revert "Revert "HID: Fix logitech-dj: missing Unifying device issue""
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
gpio-rcar: R-Car GPIO IRQ share interrupt
Magnus Damm <damm@opensource.se>
clocksource: em_sti: Set cpu_possible_mask to fix SMP broadcast
Axel Lin <axel.lin@ingics.com>
irqchip: renesas-irqc: Fix irqc_probe error handling
-------------
Diffstat:
Documentation/networking/packet_mmap.txt | 10 ++
Makefile | 4 +-
arch/arm/boot/dts/exynos5250.dtsi | 2 +-
arch/arm/kernel/traps.c | 8 +-
arch/arm/mach-footbridge/dc21285-timer.c | 5 +-
arch/arm/mach-shmobile/board-armadillo800eva.c | 4 +-
arch/arm/mach-shmobile/board-kzm9g.c | 2 +-
arch/arm/mach-shmobile/board-mackerel.c | 4 +-
arch/parisc/include/asm/cacheflush.h | 12 +--
arch/parisc/include/asm/page.h | 5 +-
arch/parisc/kernel/cache.c | 35 -------
arch/x86/include/asm/fpu-internal.h | 13 +--
drivers/acpi/battery.c | 21 +++-
drivers/ata/ahci.c | 3 +
drivers/char/tpm/tpm_ppi.c | 15 +--
drivers/clk/clk-divider.c | 2 +-
drivers/clk/samsung/clk-exynos4.c | 2 +-
drivers/clk/samsung/clk-exynos5250.c | 7 +-
drivers/clocksource/em_sti.c | 2 +-
drivers/cpufreq/intel_pstate.c | 3 +-
drivers/gpio/gpio-rcar.c | 2 +-
drivers/gpu/drm/nouveau/core/subdev/bios/init.c | 6 +-
drivers/hid/hid-logitech-dj.c | 45 ++++++++
drivers/hid/hid-logitech-dj.h | 1 +
drivers/irqchip/irq-renesas-irqc.c | 4 +-
drivers/mfd/rtsx_pcr.c | 10 +-
drivers/net/ethernet/broadcom/tg3.c | 3 +
drivers/net/ethernet/freescale/fec_main.c | 4 +-
drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 +-
drivers/net/ethernet/tehuti/tehuti.c | 1 -
drivers/net/ethernet/xilinx/ll_temac_main.c | 2 +-
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +-
drivers/net/hamradio/hdlcdrv.c | 2 +
drivers/net/hamradio/yam.c | 1 +
drivers/net/hyperv/netvsc_drv.c | 1 -
drivers/net/macvtap.c | 20 ++--
drivers/net/tun.c | 2 +
drivers/net/virtio_net.c | 119 +++++++++++++++-------
drivers/scsi/sd.c | 5 +-
include/linux/net.h | 2 +-
include/linux/netdevice.h | 9 ++
include/linux/skbuff.h | 5 +
kernel/sched/core.c | 9 +-
kernel/sched/fair.c | 48 ++++++---
kernel/sched/sched.h | 3 +-
net/8021q/vlan_dev.c | 19 +++-
net/bridge/br_multicast.c | 4 +-
net/core/drop_monitor.c | 1 -
net/core/neighbour.c | 2 +-
net/core/netpoll.c | 11 +-
net/core/skbuff.c | 3 +-
net/core/sock.c | 2 +-
net/ipv4/inet_diag.c | 16 +++
net/ipv4/ip_gre.c | 1 +
net/ipv6/route.c | 34 +++----
net/ipv6/udp_offload.c | 2 +-
net/llc/af_llc.c | 5 +-
net/mac80211/tx.c | 23 +++--
net/netfilter/nf_nat_irc.c | 32 +++++-
net/packet/af_packet.c | 65 +++++++-----
net/rds/ib.c | 3 +-
net/rds/ib_send.c | 5 +-
net/rose/af_rose.c | 16 +--
net/unix/af_unix.c | 16 ++-
64 files changed, 479 insertions(+), 248 deletions(-)
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 01/62] irqchip: renesas-irqc: Fix irqc_probe error handling
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 02/62] clocksource: em_sti: Set cpu_possible_mask to fix SMP broadcast Greg Kroah-Hartman
` (59 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Axel Lin, Simon Horman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Axel Lin <axel.lin@ingics.com>
commit dfaf820a13ec160f06556e08dab423818ba87f14 upstream.
The code in goto err3 path is wrong because it will call fee_irq() with k == 0,
which means it does free_irq(p->irq[-1].requested_irq, &p->irq[-1]);
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/irqchip/irq-renesas-irqc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -248,8 +248,8 @@ static int irqc_probe(struct platform_de
return 0;
err3:
- for (; k >= 0; k--)
- free_irq(p->irq[k - 1].requested_irq, &p->irq[k - 1]);
+ while (--k >= 0)
+ free_irq(p->irq[k].requested_irq, &p->irq[k]);
irq_domain_remove(p->irq_domain);
err2:
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 02/62] clocksource: em_sti: Set cpu_possible_mask to fix SMP broadcast
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 01/62] irqchip: renesas-irqc: Fix irqc_probe error handling Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 03/62] gpio-rcar: R-Car GPIO IRQ share interrupt Greg Kroah-Hartman
` (58 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Magnus Damm, Simon Horman,
Stephen Boyd, Daniel Lezcano
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Magnus Damm <damm@opensource.se>
commit 2199a5574b6d94b9ca26c6345356f45ec60fef8b upstream.
Update the STI driver by setting cpu_possible_mask to make EMEV2
SMP work as expected together with the ARM broadcast timer.
This breakage was introduced by:
f7db706 ARM: 7674/1: smp: Avoid dummy clockevent being preferred over real hardware clock-event
Without this fix SMP operation is broken on EMEV2 since no
broadcast timer interrupts trigger on the secondary CPU cores.
Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/clocksource/em_sti.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/clocksource/em_sti.c
+++ b/drivers/clocksource/em_sti.c
@@ -301,7 +301,7 @@ static void em_sti_register_clockevent(s
ced->name = dev_name(&p->pdev->dev);
ced->features = CLOCK_EVT_FEAT_ONESHOT;
ced->rating = 200;
- ced->cpumask = cpumask_of(0);
+ ced->cpumask = cpu_possible_mask;
ced->set_next_event = em_sti_clock_event_next;
ced->set_mode = em_sti_clock_event_mode;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 03/62] gpio-rcar: R-Car GPIO IRQ share interrupt
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 01/62] irqchip: renesas-irqc: Fix irqc_probe error handling Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 02/62] clocksource: em_sti: Set cpu_possible_mask to fix SMP broadcast Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 04/62] HID: Revert "Revert "HID: Fix logitech-dj: missing Unifying device issue"" Greg Kroah-Hartman
` (57 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Kuninori Morimoto, Simon Horman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
commit c234962b808f289237a40e4ce5fc1c8066d1c9d0 upstream.
R-Car H1 or Gen2 GPIO interrupts are assigned per each GPIO domain,
but, Gen1 E1/M1 GPIO interrupts are shared for all GPIO domain.
gpio-rcar driver needs IRQF_SHARED flags for these.
This patch was tested on Bock-W board
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpio/gpio-rcar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -333,7 +333,7 @@ static int gpio_rcar_probe(struct platfo
}
if (devm_request_irq(&pdev->dev, irq->start,
- gpio_rcar_irq_handler, 0, name, p)) {
+ gpio_rcar_irq_handler, IRQF_SHARED, name, p)) {
dev_err(&pdev->dev, "failed to request IRQ\n");
ret = -ENOENT;
goto err1;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 04/62] HID: Revert "Revert "HID: Fix logitech-dj: missing Unifying device issue""
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (2 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 03/62] gpio-rcar: R-Car GPIO IRQ share interrupt Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 05/62] IPv6: Fixed support for blackhole and prohibit routes Greg Kroah-Hartman
` (56 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Nestor Lopez Casado, Jiri Kosina
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nestor Lopez Casado <nlopezcasad@logitech.com>
commit c63e0e370028d7e4033bd40165f18499872b5183 upstream.
This reverts commit 8af6c08830b1ae114d1a8b548b1f8b056e068887.
This patch re-adds the workaround introduced by 596264082f10dd4
which was reverted by 8af6c08830b1ae114.
The original patch 596264 was needed to overcome a situation where
the hid-core would drop incoming reports while probe() was being
executed.
This issue was solved by c849a6143bec520af which added
hid_device_io_start() and hid_device_io_stop() that enable a specific
hid driver to opt-in for input reports while its probe() is being
executed.
Commit a9dd22b730857347 modified hid-logitech-dj so as to use the
functionality added to hid-core. Having done that, workaround 596264
was no longer necessary and was reverted by 8af6c08.
We now encounter a different problem that ends up 'again' thwarting
the Unifying receiver enumeration. The problem is time and usb controller
dependent. Ocasionally the reports sent to the usb receiver to start
the paired devices enumeration fail with -EPIPE and the receiver never
gets to enumerate the paired devices.
With dcd9006b1b053c7b1c the problem was "hidden" as the call to the usb
driver became asynchronous and none was catching the error from the
failing URB.
As the root cause for this failing SET_REPORT is not understood yet,
-possibly a race on the usb controller drivers or a problem with the
Unifying receiver- reintroducing this workaround solves the problem.
Overall what this workaround does is: If an input report from an
unknown device is received, then a (re)enumeration is performed.
related bug:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1194649
Signed-off-by: Nestor Lopez Casado <nlopezcasad@logitech.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hid/hid-logitech-dj.c | 45 ++++++++++++++++++++++++++++++++++++++++++
drivers/hid/hid-logitech-dj.h | 1
2 files changed, 46 insertions(+)
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -192,6 +192,7 @@ static struct hid_ll_driver logi_dj_ll_d
static int logi_dj_output_hidraw_report(struct hid_device *hid, u8 * buf,
size_t count,
unsigned char report_type);
+static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev);
static void logi_dj_recv_destroy_djhid_device(struct dj_receiver_dev *djrcv_dev,
struct dj_report *dj_report)
@@ -232,6 +233,7 @@ static void logi_dj_recv_add_djhid_devic
if (dj_report->report_params[DEVICE_PAIRED_PARAM_SPFUNCTION] &
SPFUNCTION_DEVICE_LIST_EMPTY) {
dbg_hid("%s: device list is empty\n", __func__);
+ djrcv_dev->querying_devices = false;
return;
}
@@ -242,6 +244,12 @@ static void logi_dj_recv_add_djhid_devic
return;
}
+ if (djrcv_dev->paired_dj_devices[dj_report->device_index]) {
+ /* The device is already known. No need to reallocate it. */
+ dbg_hid("%s: device is already known\n", __func__);
+ return;
+ }
+
dj_hiddev = hid_allocate_device();
if (IS_ERR(dj_hiddev)) {
dev_err(&djrcv_hdev->dev, "%s: hid_allocate_device failed\n",
@@ -305,6 +313,7 @@ static void delayedwork_callback(struct
struct dj_report dj_report;
unsigned long flags;
int count;
+ int retval;
dbg_hid("%s\n", __func__);
@@ -337,6 +346,25 @@ static void delayedwork_callback(struct
logi_dj_recv_destroy_djhid_device(djrcv_dev, &dj_report);
break;
default:
+ /* A normal report (i. e. not belonging to a pair/unpair notification)
+ * arriving here, means that the report arrived but we did not have a
+ * paired dj_device associated to the report's device_index, this
+ * means that the original "device paired" notification corresponding
+ * to this dj_device never arrived to this driver. The reason is that
+ * hid-core discards all packets coming from a device while probe() is
+ * executing. */
+ if (!djrcv_dev->paired_dj_devices[dj_report.device_index]) {
+ /* ok, we don't know the device, just re-ask the
+ * receiver for the list of connected devices. */
+ retval = logi_dj_recv_query_paired_devices(djrcv_dev);
+ if (!retval) {
+ /* everything went fine, so just leave */
+ break;
+ }
+ dev_err(&djrcv_dev->hdev->dev,
+ "%s:logi_dj_recv_query_paired_devices "
+ "error:%d\n", __func__, retval);
+ }
dbg_hid("%s: unexpected report type\n", __func__);
}
}
@@ -367,6 +395,12 @@ static void logi_dj_recv_forward_null_re
if (!djdev) {
dbg_hid("djrcv_dev->paired_dj_devices[dj_report->device_index]"
" is NULL, index %d\n", dj_report->device_index);
+ kfifo_in(&djrcv_dev->notif_fifo, dj_report, sizeof(struct dj_report));
+
+ if (schedule_work(&djrcv_dev->work) == 0) {
+ dbg_hid("%s: did not schedule the work item, was already "
+ "queued\n", __func__);
+ }
return;
}
@@ -397,6 +431,12 @@ static void logi_dj_recv_forward_report(
if (dj_device == NULL) {
dbg_hid("djrcv_dev->paired_dj_devices[dj_report->device_index]"
" is NULL, index %d\n", dj_report->device_index);
+ kfifo_in(&djrcv_dev->notif_fifo, dj_report, sizeof(struct dj_report));
+
+ if (schedule_work(&djrcv_dev->work) == 0) {
+ dbg_hid("%s: did not schedule the work item, was already "
+ "queued\n", __func__);
+ }
return;
}
@@ -444,6 +484,10 @@ static int logi_dj_recv_query_paired_dev
struct dj_report *dj_report;
int retval;
+ /* no need to protect djrcv_dev->querying_devices */
+ if (djrcv_dev->querying_devices)
+ return 0;
+
dj_report = kzalloc(sizeof(struct dj_report), GFP_KERNEL);
if (!dj_report)
return -ENOMEM;
@@ -455,6 +499,7 @@ static int logi_dj_recv_query_paired_dev
return retval;
}
+
static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev,
unsigned timeout)
{
--- a/drivers/hid/hid-logitech-dj.h
+++ b/drivers/hid/hid-logitech-dj.h
@@ -101,6 +101,7 @@ struct dj_receiver_dev {
struct work_struct work;
struct kfifo notif_fifo;
spinlock_t lock;
+ bool querying_devices;
};
struct dj_device {
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 05/62] IPv6: Fixed support for blackhole and prohibit routes
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (3 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 04/62] HID: Revert "Revert "HID: Fix logitech-dj: missing Unifying device issue"" Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 06/62] net: do not pretend FRAGLIST support Greg Kroah-Hartman
` (55 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Kamala R, Hannes Frederic Sowa,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kamala R <kamala@aristanetworks.com>
[ Upstream commit 7150aede5dd241539686e17d9592f5ebd28a2cda ]
The behaviour of blackhole and prohibit routes has been corrected by setting
the input and output pointers of the dst variable appropriately. For
blackhole routes, they are set to dst_discard and to ip6_pkt_discard and
ip6_pkt_discard_out respectively for prohibit routes.
ipv6: ip6_pkt_prohibit(_out) should not depend on
CONFIG_IPV6_MULTIPLE_TABLES
We need ip6_pkt_prohibit(_out) available without
CONFIG_IPV6_MULTIPLE_TABLES
Signed-off-by: Kamala R <kamala@aristanetworks.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv6/route.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -84,6 +84,8 @@ static int ip6_dst_gc(struct dst_ops *
static int ip6_pkt_discard(struct sk_buff *skb);
static int ip6_pkt_discard_out(struct sk_buff *skb);
+static int ip6_pkt_prohibit(struct sk_buff *skb);
+static int ip6_pkt_prohibit_out(struct sk_buff *skb);
static void ip6_link_failure(struct sk_buff *skb);
static void ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
struct sk_buff *skb, u32 mtu);
@@ -233,9 +235,6 @@ static const struct rt6_info ip6_null_en
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
-static int ip6_pkt_prohibit(struct sk_buff *skb);
-static int ip6_pkt_prohibit_out(struct sk_buff *skb);
-
static const struct rt6_info ip6_prohibit_entry_template = {
.dst = {
.__refcnt = ATOMIC_INIT(1),
@@ -1498,21 +1497,24 @@ int ip6_route_add(struct fib6_config *cf
goto out;
}
}
- rt->dst.output = ip6_pkt_discard_out;
- rt->dst.input = ip6_pkt_discard;
rt->rt6i_flags = RTF_REJECT|RTF_NONEXTHOP;
switch (cfg->fc_type) {
case RTN_BLACKHOLE:
rt->dst.error = -EINVAL;
+ rt->dst.output = dst_discard;
+ rt->dst.input = dst_discard;
break;
case RTN_PROHIBIT:
rt->dst.error = -EACCES;
+ rt->dst.output = ip6_pkt_prohibit_out;
+ rt->dst.input = ip6_pkt_prohibit;
break;
case RTN_THROW:
- rt->dst.error = -EAGAIN;
- break;
default:
- rt->dst.error = -ENETUNREACH;
+ rt->dst.error = (cfg->fc_type == RTN_THROW) ? -EAGAIN
+ : -ENETUNREACH;
+ rt->dst.output = ip6_pkt_discard_out;
+ rt->dst.input = ip6_pkt_discard;
break;
}
goto install_route;
@@ -2077,8 +2079,6 @@ static int ip6_pkt_discard_out(struct sk
return ip6_pkt_drop(skb, ICMPV6_NOROUTE, IPSTATS_MIB_OUTNOROUTES);
}
-#ifdef CONFIG_IPV6_MULTIPLE_TABLES
-
static int ip6_pkt_prohibit(struct sk_buff *skb)
{
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_INNOROUTES);
@@ -2090,8 +2090,6 @@ static int ip6_pkt_prohibit_out(struct s
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
-#endif
-
/*
* Allocate a dst for local (unicast / anycast) address.
*/
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 06/62] net: do not pretend FRAGLIST support
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (4 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 05/62] IPv6: Fixed support for blackhole and prohibit routes Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 07/62] rds: prevent BUG_ON triggered on congestion update to loopback Greg Kroah-Hartman
` (54 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Eric Dumazet,
Thadeu Lima de Souza Cascardo, Anirudha Sarangi, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 28e24c62ab3062e965ef1b3bcc244d50aee7fa85 ]
Few network drivers really supports frag_list : virtual drivers.
Some drivers wrongly advertise NETIF_F_FRAGLIST feature.
If skb with a frag_list is given to them, packet on the wire will be
corrupt.
Remove this flag, as core networking stack will make sure to
provide packets that can be sent without corruption.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Cc: Anirudha Sarangi <anirudh@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 +-
drivers/net/ethernet/tehuti/tehuti.c | 1 -
drivers/net/ethernet/xilinx/ll_temac_main.c | 2 +-
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +-
4 files changed, 3 insertions(+), 4 deletions(-)
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -3023,7 +3023,7 @@ static struct ehea_port *ehea_setup_sing
dev->hw_features = NETIF_F_SG | NETIF_F_TSO |
NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_CTAG_TX;
- dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_TSO |
+ dev->features = NETIF_F_SG | NETIF_F_TSO |
NETIF_F_HIGHDMA | NETIF_F_IP_CSUM |
NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX |
NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_RXCSUM;
--- a/drivers/net/ethernet/tehuti/tehuti.c
+++ b/drivers/net/ethernet/tehuti/tehuti.c
@@ -2019,7 +2019,6 @@ bdx_probe(struct pci_dev *pdev, const st
ndev->features = NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO
| NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX |
NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_RXCSUM
- /*| NETIF_F_FRAGLIST */
;
ndev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG |
NETIF_F_TSO | NETIF_F_HW_VLAN_CTAG_TX;
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -1016,7 +1016,7 @@ static int temac_of_probe(struct platfor
dev_set_drvdata(&op->dev, ndev);
SET_NETDEV_DEV(ndev, &op->dev);
ndev->flags &= ~IFF_MULTICAST; /* clear multicast */
- ndev->features = NETIF_F_SG | NETIF_F_FRAGLIST;
+ ndev->features = NETIF_F_SG;
ndev->netdev_ops = &temac_netdev_ops;
ndev->ethtool_ops = &temac_ethtool_ops;
#if 0
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -1488,7 +1488,7 @@ static int axienet_of_probe(struct platf
SET_NETDEV_DEV(ndev, &op->dev);
ndev->flags &= ~IFF_MULTICAST; /* clear multicast */
- ndev->features = NETIF_F_SG | NETIF_F_FRAGLIST;
+ ndev->features = NETIF_F_SG;
ndev->netdev_ops = &axienet_netdev_ops;
ndev->ethtool_ops = &axienet_ethtool_ops;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 07/62] rds: prevent BUG_ON triggered on congestion update to loopback
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (5 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 06/62] net: do not pretend FRAGLIST support Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 08/62] macvtap: Do not double-count received packets Greg Kroah-Hartman
` (53 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Josh Hunt, Honggang Li, Bang Nguyen,
Venkat Venkatsubra, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
[ Upstream commit 18fc25c94eadc52a42c025125af24657a93638c0 ]
After congestion update on a local connection, when rds_ib_xmit returns
less bytes than that are there in the message, rds_send_xmit calls
back rds_ib_xmit with an offset that causes BUG_ON(off & RDS_FRAG_SIZE)
to trigger.
For a 4Kb PAGE_SIZE rds_ib_xmit returns min(8240,4096)=4096 when actually
the message contains 8240 bytes. rds_send_xmit thinks there is more to send
and calls rds_ib_xmit again with a data offset "off" of 4096-48(rds header)
=4048 bytes thus hitting the BUG_ON(off & RDS_FRAG_SIZE) [RDS_FRAG_SIZE=4k].
The commit 6094628bfd94323fc1cea05ec2c6affd98c18f7f
"rds: prevent BUG_ON triggering on congestion map updates" introduced
this regression. That change was addressing the triggering of a different
BUG_ON in rds_send_xmit() on PowerPC architecture with 64Kbytes PAGE_SIZE:
BUG_ON(ret != 0 &&
conn->c_xmit_sg == rm->data.op_nents);
This was the sequence it was going through:
(rds_ib_xmit)
/* Do not send cong updates to IB loopback */
if (conn->c_loopback
&& rm->m_inc.i_hdr.h_flags & RDS_FLAG_CONG_BITMAP) {
rds_cong_map_updated(conn->c_fcong, ~(u64) 0);
return sizeof(struct rds_header) + RDS_CONG_MAP_BYTES;
}
rds_ib_xmit returns 8240
rds_send_xmit:
c_xmit_data_off = 0 + 8240 - 48 (rds header accounted only the first time)
= 8192
c_xmit_data_off < 65536 (sg->length), so calls rds_ib_xmit again
rds_ib_xmit returns 8240
rds_send_xmit:
c_xmit_data_off = 8192 + 8240 = 16432, calls rds_ib_xmit again
and so on (c_xmit_data_off 24672,32912,41152,49392,57632)
rds_ib_xmit returns 8240
On this iteration this sequence causes the BUG_ON in rds_send_xmit:
while (ret) {
tmp = min_t(int, ret, sg->length - conn->c_xmit_data_off);
[tmp = 65536 - 57632 = 7904]
conn->c_xmit_data_off += tmp;
[c_xmit_data_off = 57632 + 7904 = 65536]
ret -= tmp;
[ret = 8240 - 7904 = 336]
if (conn->c_xmit_data_off == sg->length) {
conn->c_xmit_data_off = 0;
sg++;
conn->c_xmit_sg++;
BUG_ON(ret != 0 &&
conn->c_xmit_sg == rm->data.op_nents);
[c_xmit_sg = 1, rm->data.op_nents = 1]
What the current fix does:
Since the congestion update over loopback is not actually transmitted
as a message, all that rds_ib_xmit needs to do is let the caller think
the full message has been transmitted and not return partial bytes.
It will return 8240 (RDS_CONG_MAP_BYTES+48) when PAGE_SIZE is 4Kb.
And 64Kb+48 when page size is 64Kb.
Reported-by: Josh Hunt <joshhunt00@gmail.com>
Tested-by: Honggang Li <honli@redhat.com>
Acked-by: Bang Nguyen <bang.nguyen@oracle.com>
Signed-off-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/rds/ib_send.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/net/rds/ib_send.c
+++ b/net/rds/ib_send.c
@@ -552,9 +552,8 @@ int rds_ib_xmit(struct rds_connection *c
&& rm->m_inc.i_hdr.h_flags & RDS_FLAG_CONG_BITMAP) {
rds_cong_map_updated(conn->c_fcong, ~(u64) 0);
scat = &rm->data.op_sg[sg];
- ret = sizeof(struct rds_header) + RDS_CONG_MAP_BYTES;
- ret = min_t(int, ret, scat->length - conn->c_xmit_data_off);
- return ret;
+ ret = max_t(int, RDS_CONG_MAP_BYTES, scat->length);
+ return sizeof(struct rds_header) + ret;
}
/* FIXME we may overallocate here */
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 08/62] macvtap: Do not double-count received packets
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (6 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 07/62] rds: prevent BUG_ON triggered on congestion update to loopback Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 09/62] macvtap: update file current position Greg Kroah-Hartman
` (52 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Vlad Yasevich, Michael S. Tsirkin,
Jason Wang, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vlad Yasevich <vyasevic@redhat.com>
[ Upstream commit 006da7b07bc4d3a7ffabad17cf639eec6849c9dc ]
Currently macvlan will count received packets after calling each
vlans receive handler. Macvtap attempts to count the packet
yet again when the user reads the packet from the tap socket.
This code doesn't do this consistently either. Remove the
counting from macvtap and let only macvlan count received
packets.
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/macvtap.c | 7 -------
1 file changed, 7 deletions(-)
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -797,7 +797,6 @@ static ssize_t macvtap_put_user(struct m
const struct sk_buff *skb,
const struct iovec *iv, int len)
{
- struct macvlan_dev *vlan;
int ret;
int vnet_hdr_len = 0;
int vlan_offset = 0;
@@ -851,12 +850,6 @@ static ssize_t macvtap_put_user(struct m
copied += len;
done:
- rcu_read_lock_bh();
- vlan = rcu_dereference_bh(q->vlan);
- if (vlan)
- macvlan_count_rx(vlan, copied - vnet_hdr_len, ret == 0, 0);
- rcu_read_unlock_bh();
-
return ret ? ret : copied;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 09/62] macvtap: update file current position
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (7 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 08/62] macvtap: Do not double-count received packets Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 10/62] tun: " Greg Kroah-Hartman
` (51 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Zhi Yong Wu, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
[ Upstream commit e6ebc7f16ca1434a334647aa56399c546be4e64b ]
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/macvtap.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -903,6 +903,8 @@ static ssize_t macvtap_aio_read(struct k
ret = macvtap_do_read(q, iocb, iv, len, file->f_flags & O_NONBLOCK);
ret = min_t(ssize_t, ret, len); /* XXX copied from tun.c. Why? */
+ if (ret > 0)
+ iocb->ki_pos = ret;
out:
return ret;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 10/62] tun: update file current position
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (8 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 09/62] macvtap: update file current position Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 11/62] macvtap: signal truncated packets Greg Kroah-Hartman
` (50 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Zhi Yong Wu, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
[ Upstream commit d0b7da8afa079ffe018ab3e92879b7138977fc8f ]
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/tun.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1412,6 +1412,8 @@ static ssize_t tun_chr_aio_read(struct k
ret = tun_do_read(tun, tfile, iocb, iv, len,
file->f_flags & O_NONBLOCK);
ret = min_t(ssize_t, ret, len);
+ if (ret > 0)
+ iocb->ki_pos = ret;
out:
tun_put(tun);
return ret;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 11/62] macvtap: signal truncated packets
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (9 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 10/62] tun: " Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 12/62] virtio: delete napi structures from netdev before releasing memory Greg Kroah-Hartman
` (49 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Vlad Yasevich, Zhi Yong Wu,
Michael S. Tsirkin, Jason Wang, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Wang <jasowang@redhat.com>
[ Upstream commit ce232ce01d61b184202bb185103d119820e1260c ]
macvtap_put_user() never return a value grater than iov length, this in fact
bypasses the truncated checking in macvtap_recvmsg(). Fix this by always
returning the size of packet plus the possible vlan header to let the trunca
checking work.
Cc: Vlad Yasevich <vyasevich@gmail.com>
Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/macvtap.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -800,7 +800,7 @@ static ssize_t macvtap_put_user(struct m
int ret;
int vnet_hdr_len = 0;
int vlan_offset = 0;
- int copied;
+ int copied, total;
if (q->flags & IFF_VNET_HDR) {
struct virtio_net_hdr vnet_hdr;
@@ -815,7 +815,8 @@ static ssize_t macvtap_put_user(struct m
if (memcpy_toiovecend(iv, (void *)&vnet_hdr, 0, sizeof(vnet_hdr)))
return -EFAULT;
}
- copied = vnet_hdr_len;
+ total = copied = vnet_hdr_len;
+ total += skb->len;
if (!vlan_tx_tag_present(skb))
len = min_t(int, skb->len, len);
@@ -830,6 +831,7 @@ static ssize_t macvtap_put_user(struct m
vlan_offset = offsetof(struct vlan_ethhdr, h_vlan_proto);
len = min_t(int, skb->len + VLAN_HLEN, len);
+ total += VLAN_HLEN;
copy = min_t(int, vlan_offset, len);
ret = skb_copy_datagram_const_iovec(skb, 0, iv, copied, copy);
@@ -847,10 +849,9 @@ static ssize_t macvtap_put_user(struct m
}
ret = skb_copy_datagram_const_iovec(skb, vlan_offset, iv, copied, len);
- copied += len;
done:
- return ret ? ret : copied;
+ return ret ? ret : total;
}
static ssize_t macvtap_do_read(struct macvtap_queue *q, struct kiocb *iocb,
@@ -902,7 +903,7 @@ static ssize_t macvtap_aio_read(struct k
}
ret = macvtap_do_read(q, iocb, iv, len, file->f_flags & O_NONBLOCK);
- ret = min_t(ssize_t, ret, len); /* XXX copied from tun.c. Why? */
+ ret = min_t(ssize_t, ret, len);
if (ret > 0)
iocb->ki_pos = ret;
out:
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 12/62] virtio: delete napi structures from netdev before releasing memory
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (10 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 11/62] macvtap: signal truncated packets Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 13/62] packet: fix send path when running with proto == 0 Greg Kroah-Hartman
` (48 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Rusty Russell, Michael S. Tsirkin,
Andrey Vagin, Jason Wang, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrey Vagin <avagin@openvz.org>
[ Upstream commit d4fb84eefe5164f6a6ea51d0a9e26280c661a0dd ]
free_netdev calls netif_napi_del too, but it's too late, because napi
structures are placed on vi->rq. netif_napi_add() is called from
virtnet_alloc_queues.
general protection fault: 0000 [#1] SMP
Dumping ftrace buffer:
(ftrace buffer empty)
Modules linked in: ip6table_filter ip6_tables iptable_filter ip_tables virtio_balloon pcspkr virtio_net(-) i2c_pii
CPU: 1 PID: 347 Comm: rmmod Not tainted 3.13.0-rc2+ #171
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
task: ffff8800b779c420 ti: ffff8800379e0000 task.ti: ffff8800379e0000
RIP: 0010:[<ffffffff81322e19>] [<ffffffff81322e19>] __list_del_entry+0x29/0xd0
RSP: 0018:ffff8800379e1dd0 EFLAGS: 00010a83
RAX: 6b6b6b6b6b6b6b6b RBX: ffff8800379c2fd0 RCX: dead000000200200
RDX: 6b6b6b6b6b6b6b6b RSI: 0000000000000001 RDI: ffff8800379c2fd0
RBP: ffff8800379e1dd0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: ffff8800379c2f90
R13: ffff880037839160 R14: 0000000000000000 R15: 00000000013352f0
FS: 00007f1400e34740(0000) GS:ffff8800bfb00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00007f464124c763 CR3: 00000000b68cf000 CR4: 00000000000006e0
Stack:
ffff8800379e1df0 ffffffff8155beab 6b6b6b6b6b6b6b2b ffff8800378391c0
ffff8800379e1e18 ffffffff8156499b ffff880037839be0 ffff880037839d20
ffff88003779d3f0 ffff8800379e1e38 ffffffffa003477c ffff88003779d388
Call Trace:
[<ffffffff8155beab>] netif_napi_del+0x1b/0x80
[<ffffffff8156499b>] free_netdev+0x8b/0x110
[<ffffffffa003477c>] virtnet_remove+0x7c/0x90 [virtio_net]
[<ffffffff813ae323>] virtio_dev_remove+0x23/0x80
[<ffffffff813f62ef>] __device_release_driver+0x7f/0xf0
[<ffffffff813f6ca0>] driver_detach+0xc0/0xd0
[<ffffffff813f5f28>] bus_remove_driver+0x58/0xd0
[<ffffffff813f72ec>] driver_unregister+0x2c/0x50
[<ffffffff813ae65e>] unregister_virtio_driver+0xe/0x10
[<ffffffffa0036942>] virtio_net_driver_exit+0x10/0x6ce [virtio_net]
[<ffffffff810d7cf2>] SyS_delete_module+0x172/0x220
[<ffffffff810a732d>] ? trace_hardirqs_on+0xd/0x10
[<ffffffff810f5d4c>] ? __audit_syscall_entry+0x9c/0xf0
[<ffffffff81677f69>] system_call_fastpath+0x16/0x1b
Code: 00 00 55 48 8b 17 48 b9 00 01 10 00 00 00 ad de 48 8b 47 08 48 89 e5 48 39 ca 74 29 48 b9 00 02 20 00 00 00
RIP [<ffffffff81322e19>] __list_del_entry+0x29/0xd0
RSP <ffff8800379e1dd0>
---[ end trace d5931cd3f87c9763 ]---
Fixes: 986a4f4d452d (virtio_net: multiqueue support)
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/virtio_net.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1285,6 +1285,11 @@ static void virtnet_config_changed(struc
static void virtnet_free_queues(struct virtnet_info *vi)
{
+ int i;
+
+ for (i = 0; i < vi->max_queue_pairs; i++)
+ netif_napi_del(&vi->rq[i].napi);
+
kfree(vi->rq);
kfree(vi->sq);
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 13/62] packet: fix send path when running with proto == 0
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (11 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 12/62] virtio: delete napi structures from netdev before releasing memory Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 14/62] ipv6: dont count addrconf generated routes against gc limit Greg Kroah-Hartman
` (47 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Daniel Borkmann, Salam Noureddine,
Jesper Dangaard Brouer, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <dborkman@redhat.com>
[ Upstream commit 66e56cd46b93ef407c60adcac62cf33b06119d50 ]
Commit e40526cb20b5 introduced a cached dev pointer, that gets
hooked into register_prot_hook(), __unregister_prot_hook() to
update the device used for the send path.
We need to fix this up, as otherwise this will not work with
sockets created with protocol = 0, plus with sll_protocol = 0
passed via sockaddr_ll when doing the bind.
So instead, assign the pointer directly. The compiler can inline
these helper functions automagically.
While at it, also assume the cached dev fast-path as likely(),
and document this variant of socket creation as it seems it is
not widely used (seems not even the author of TX_RING was aware
of that in his reference example [1]). Tested with reproducer
from e40526cb20b5.
[1] http://wiki.ipxwarzone.com/index.php5?title=Linux_packet_mmap#Example
Fixes: e40526cb20b5 ("packet: fix use after free race in send path when dev is released")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Tested-by: Salam Noureddine <noureddine@aristanetworks.com>
Tested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/networking/packet_mmap.txt | 10 ++++
net/packet/af_packet.c | 65 +++++++++++++++++++------------
2 files changed, 50 insertions(+), 25 deletions(-)
--- a/Documentation/networking/packet_mmap.txt
+++ b/Documentation/networking/packet_mmap.txt
@@ -123,6 +123,16 @@ Transmission process is similar to captu
[shutdown] close() --------> destruction of the transmission socket and
deallocation of all associated resources.
+Socket creation and destruction is also straight forward, and is done
+the same way as in capturing described in the previous paragraph:
+
+ int fd = socket(PF_PACKET, mode, 0);
+
+The protocol can optionally be 0 in case we only want to transmit
+via this socket, which avoids an expensive call to packet_rcv().
+In this case, you also need to bind(2) the TX_RING with sll_protocol = 0
+set. Otherwise, htons(ETH_P_ALL) or any other protocol, for example.
+
Binding the socket to your network interface is mandatory (with zero copy) to
know the header size of frames used in the circular buffer.
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -237,6 +237,30 @@ struct packet_skb_cb {
static void __fanout_unlink(struct sock *sk, struct packet_sock *po);
static void __fanout_link(struct sock *sk, struct packet_sock *po);
+static struct net_device *packet_cached_dev_get(struct packet_sock *po)
+{
+ struct net_device *dev;
+
+ rcu_read_lock();
+ dev = rcu_dereference(po->cached_dev);
+ if (likely(dev))
+ dev_hold(dev);
+ rcu_read_unlock();
+
+ return dev;
+}
+
+static void packet_cached_dev_assign(struct packet_sock *po,
+ struct net_device *dev)
+{
+ rcu_assign_pointer(po->cached_dev, dev);
+}
+
+static void packet_cached_dev_reset(struct packet_sock *po)
+{
+ RCU_INIT_POINTER(po->cached_dev, NULL);
+}
+
/* register_prot_hook must be invoked with the po->bind_lock held,
* or from a context in which asynchronous accesses to the packet
* socket is not possible (packet_create()).
@@ -246,12 +270,10 @@ static void register_prot_hook(struct so
struct packet_sock *po = pkt_sk(sk);
if (!po->running) {
- if (po->fanout) {
+ if (po->fanout)
__fanout_link(sk, po);
- } else {
+ else
dev_add_pack(&po->prot_hook);
- rcu_assign_pointer(po->cached_dev, po->prot_hook.dev);
- }
sock_hold(sk);
po->running = 1;
@@ -270,12 +292,11 @@ static void __unregister_prot_hook(struc
struct packet_sock *po = pkt_sk(sk);
po->running = 0;
- if (po->fanout) {
+
+ if (po->fanout)
__fanout_unlink(sk, po);
- } else {
+ else
__dev_remove_pack(&po->prot_hook);
- RCU_INIT_POINTER(po->cached_dev, NULL);
- }
__sock_put(sk);
@@ -2048,19 +2069,6 @@ static int tpacket_fill_skb(struct packe
return tp_len;
}
-static struct net_device *packet_cached_dev_get(struct packet_sock *po)
-{
- struct net_device *dev;
-
- rcu_read_lock();
- dev = rcu_dereference(po->cached_dev);
- if (dev)
- dev_hold(dev);
- rcu_read_unlock();
-
- return dev;
-}
-
static int tpacket_snd(struct packet_sock *po, struct msghdr *msg)
{
struct sk_buff *skb;
@@ -2077,7 +2085,7 @@ static int tpacket_snd(struct packet_soc
mutex_lock(&po->pg_vec_lock);
- if (saddr == NULL) {
+ if (likely(saddr == NULL)) {
dev = packet_cached_dev_get(po);
proto = po->num;
addr = NULL;
@@ -2231,7 +2239,7 @@ static int packet_snd(struct socket *soc
* Get and verify the address.
*/
- if (saddr == NULL) {
+ if (likely(saddr == NULL)) {
dev = packet_cached_dev_get(po);
proto = po->num;
addr = NULL;
@@ -2440,6 +2448,8 @@ static int packet_release(struct socket
spin_lock(&po->bind_lock);
unregister_prot_hook(sk, false);
+ packet_cached_dev_reset(po);
+
if (po->prot_hook.dev) {
dev_put(po->prot_hook.dev);
po->prot_hook.dev = NULL;
@@ -2495,14 +2505,17 @@ static int packet_do_bind(struct sock *s
spin_lock(&po->bind_lock);
unregister_prot_hook(sk, true);
+
po->num = protocol;
po->prot_hook.type = protocol;
if (po->prot_hook.dev)
dev_put(po->prot_hook.dev);
- po->prot_hook.dev = dev;
+ po->prot_hook.dev = dev;
po->ifindex = dev ? dev->ifindex : 0;
+ packet_cached_dev_assign(po, dev);
+
if (protocol == 0)
goto out_unlock;
@@ -2615,7 +2628,8 @@ static int packet_create(struct net *net
po = pkt_sk(sk);
sk->sk_family = PF_PACKET;
po->num = proto;
- RCU_INIT_POINTER(po->cached_dev, NULL);
+
+ packet_cached_dev_reset(po);
sk->sk_destruct = packet_sock_destruct;
sk_refcnt_debug_inc(sk);
@@ -3369,6 +3383,7 @@ static int packet_notifier(struct notifi
sk->sk_error_report(sk);
}
if (msg == NETDEV_UNREGISTER) {
+ packet_cached_dev_reset(po);
po->ifindex = -1;
if (po->prot_hook.dev)
dev_put(po->prot_hook.dev);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 14/62] ipv6: dont count addrconf generated routes against gc limit
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (12 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 13/62] packet: fix send path when running with proto == 0 Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 15/62] net: drop_monitor: fix the value of maxattr Greg Kroah-Hartman
` (46 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Brett Ciphery, Hannes Frederic Sowa,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
[ Upstream commit a3300ef4bbb1f1e33ff0400e1e6cf7733d988f4f ]
Brett Ciphery reported that new ipv6 addresses failed to get installed
because the addrconf generated dsts where counted against the dst gc
limit. We don't need to count those routes like we currently don't count
administratively added routes.
Because the max_addresses check enforces a limit on unbounded address
generation first in case someone plays with router advertisments, we
are still safe here.
Reported-by: Brett Ciphery <brett.ciphery@windriver.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv6/route.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2099,12 +2099,10 @@ struct rt6_info *addrconf_dst_alloc(stru
bool anycast)
{
struct net *net = dev_net(idev->dev);
- struct rt6_info *rt = ip6_dst_alloc(net, net->loopback_dev, 0, NULL);
-
- if (!rt) {
- net_warn_ratelimited("Maximum number of routes reached, consider increasing route/max_size\n");
+ struct rt6_info *rt = ip6_dst_alloc(net, net->loopback_dev,
+ DST_NOCOUNT, NULL);
+ if (!rt)
return ERR_PTR(-ENOMEM);
- }
in6_dev_hold(idev);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 15/62] net: drop_monitor: fix the value of maxattr
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (13 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 14/62] ipv6: dont count addrconf generated routes against gc limit Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 16/62] net: unix: allow set_peek_off to fail Greg Kroah-Hartman
` (45 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Changli Gao <xiaosuo@gmail.com>
[ Upstream commit d323e92cc3f4edd943610557c9ea1bb4bb5056e8 ]
maxattr in genl_family should be used to save the max attribute
type, but not the max command type. Drop monitor doesn't support
any attributes, so we should leave it as zero.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/core/drop_monitor.c | 1 -
1 file changed, 1 deletion(-)
--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -64,7 +64,6 @@ static struct genl_family net_drop_monit
.hdrsize = 0,
.name = "NET_DM",
.version = 2,
- .maxattr = NET_DM_CMD_MAX,
};
static DEFINE_PER_CPU(struct per_cpu_dm_data, dm_cpu_data);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 16/62] net: unix: allow set_peek_off to fail
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (14 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 15/62] net: drop_monitor: fix the value of maxattr Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 17/62] tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0 Greg Kroah-Hartman
` (44 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Sasha Levin, Pavel Emelyanov,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sasha Levin <sasha.levin@oracle.com>
[ Upstream commit 12663bfc97c8b3fdb292428105dd92d563164050 ]
unix_dgram_recvmsg() will hold the readlock of the socket until recv
is complete.
In the same time, we may try to setsockopt(SO_PEEK_OFF) which will hang until
unix_dgram_recvmsg() will complete (which can take a while) without allowing
us to break out of it, triggering a hung task spew.
Instead, allow set_peek_off to fail, this way userspace will not hang.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/net.h | 2 +-
net/core/sock.c | 2 +-
net/unix/af_unix.c | 8 ++++++--
3 files changed, 8 insertions(+), 4 deletions(-)
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -180,7 +180,7 @@ struct proto_ops {
int offset, size_t size, int flags);
ssize_t (*splice_read)(struct socket *sock, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len, unsigned int flags);
- void (*set_peek_off)(struct sock *sk, int val);
+ int (*set_peek_off)(struct sock *sk, int val);
};
#define DECLARE_SOCKADDR(type, dst, src) \
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -885,7 +885,7 @@ set_rcvbuf:
case SO_PEEK_OFF:
if (sock->ops->set_peek_off)
- sock->ops->set_peek_off(sk, val);
+ ret = sock->ops->set_peek_off(sk, val);
else
ret = -EOPNOTSUPP;
break;
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -529,13 +529,17 @@ static int unix_seqpacket_sendmsg(struct
static int unix_seqpacket_recvmsg(struct kiocb *, struct socket *,
struct msghdr *, size_t, int);
-static void unix_set_peek_off(struct sock *sk, int val)
+static int unix_set_peek_off(struct sock *sk, int val)
{
struct unix_sock *u = unix_sk(sk);
- mutex_lock(&u->readlock);
+ if (mutex_lock_interruptible(&u->readlock))
+ return -EINTR;
+
sk->sk_peek_off = val;
mutex_unlock(&u->readlock);
+
+ return 0;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 17/62] tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (15 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 16/62] net: unix: allow set_peek_off to fail Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 18/62] netvsc: dont flush peers notifying work during setting mtu Greg Kroah-Hartman
` (43 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Nat Gurumoorthy, Michael Chan,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nat Gurumoorthy <natg@google.com>
[ Upstream commit 388d3335575f4c056dcf7138a30f1454e2145cd8 ]
The new tg3 driver leaves REG_BASE_ADDR (PCI config offset 120)
uninitialized. From power on reset this register may have garbage in it. The
Register Base Address register defines the device local address of a
register. The data pointed to by this location is read or written using
the Register Data register (PCI config offset 128). When REG_BASE_ADDR has
garbage any read or write of Register Data Register (PCI 128) will cause the
PCI bus to lock up. The TCO watchdog will fire and bring down the system.
Signed-off-by: Nat Gurumoorthy <natg@google.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/broadcom/tg3.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -16297,6 +16297,9 @@ static int tg3_get_invariants(struct tg3
/* Clear this out for sanity. */
tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0);
+ /* Clear TG3PCI_REG_BASE_ADDR to prevent hangs. */
+ tw32(TG3PCI_REG_BASE_ADDR, 0);
+
pci_read_config_dword(tp->pdev, TG3PCI_PCISTATE,
&pci_state_reg);
if ((pci_state_reg & PCISTATE_CONV_PCI_MODE) == 0 &&
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 18/62] netvsc: dont flush peers notifying work during setting mtu
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (16 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 17/62] tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0 Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 19/62] ipv6: fix illegal mac_header comparison on 32bit Greg Kroah-Hartman
` (42 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Yaju Cao, K. Y. Srinivasan,
Haiyang Zhang, Jason Wang, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Wang <jasowang@redhat.com>
[ Upstream commit 50dc875f2e6e2e04aed3b3033eb0ac99192d6d02 ]
There's a possible deadlock if we flush the peers notifying work during setting
mtu:
[ 22.991149] ======================================================
[ 22.991173] [ INFO: possible circular locking dependency detected ]
[ 22.991198] 3.10.0-54.0.1.el7.x86_64.debug #1 Not tainted
[ 22.991219] -------------------------------------------------------
[ 22.991243] ip/974 is trying to acquire lock:
[ 22.991261] ((&(&net_device_ctx->dwork)->work)){+.+.+.}, at: [<ffffffff8108af95>] flush_work+0x5/0x2e0
[ 22.991307]
but task is already holding lock:
[ 22.991330] (rtnl_mutex){+.+.+.}, at: [<ffffffff81539deb>] rtnetlink_rcv+0x1b/0x40
[ 22.991367]
which lock already depends on the new lock.
[ 22.991398]
the existing dependency chain (in reverse order) is:
[ 22.991426]
-> #1 (rtnl_mutex){+.+.+.}:
[ 22.991449] [<ffffffff810dfdd9>] __lock_acquire+0xb19/0x1260
[ 22.991477] [<ffffffff810e0d12>] lock_acquire+0xa2/0x1f0
[ 22.991501] [<ffffffff81673659>] mutex_lock_nested+0x89/0x4f0
[ 22.991529] [<ffffffff815392b7>] rtnl_lock+0x17/0x20
[ 22.991552] [<ffffffff815230b2>] netdev_notify_peers+0x12/0x30
[ 22.991579] [<ffffffffa0340212>] netvsc_send_garp+0x22/0x30 [hv_netvsc]
[ 22.991610] [<ffffffff8108d251>] process_one_work+0x211/0x6e0
[ 22.991637] [<ffffffff8108d83b>] worker_thread+0x11b/0x3a0
[ 22.991663] [<ffffffff81095e5d>] kthread+0xed/0x100
[ 22.991686] [<ffffffff81681c6c>] ret_from_fork+0x7c/0xb0
[ 22.991715]
-> #0 ((&(&net_device_ctx->dwork)->work)){+.+.+.}:
[ 22.991715] [<ffffffff810de817>] check_prevs_add+0x967/0x970
[ 22.991715] [<ffffffff810dfdd9>] __lock_acquire+0xb19/0x1260
[ 22.991715] [<ffffffff810e0d12>] lock_acquire+0xa2/0x1f0
[ 22.991715] [<ffffffff8108afde>] flush_work+0x4e/0x2e0
[ 22.991715] [<ffffffff8108e1b5>] __cancel_work_timer+0x95/0x130
[ 22.991715] [<ffffffff8108e303>] cancel_delayed_work_sync+0x13/0x20
[ 22.991715] [<ffffffffa03404e4>] netvsc_change_mtu+0x84/0x200 [hv_netvsc]
[ 22.991715] [<ffffffff815233d4>] dev_set_mtu+0x34/0x80
[ 22.991715] [<ffffffff8153bc2a>] do_setlink+0x23a/0xa00
[ 22.991715] [<ffffffff8153d054>] rtnl_newlink+0x394/0x5e0
[ 22.991715] [<ffffffff81539eac>] rtnetlink_rcv_msg+0x9c/0x260
[ 22.991715] [<ffffffff8155cdd9>] netlink_rcv_skb+0xa9/0xc0
[ 22.991715] [<ffffffff81539dfa>] rtnetlink_rcv+0x2a/0x40
[ 22.991715] [<ffffffff8155c41d>] netlink_unicast+0xdd/0x190
[ 22.991715] [<ffffffff8155c807>] netlink_sendmsg+0x337/0x750
[ 22.991715] [<ffffffff8150d219>] sock_sendmsg+0x99/0xd0
[ 22.991715] [<ffffffff8150d63e>] ___sys_sendmsg+0x39e/0x3b0
[ 22.991715] [<ffffffff8150eba2>] __sys_sendmsg+0x42/0x80
[ 22.991715] [<ffffffff8150ebf2>] SyS_sendmsg+0x12/0x20
[ 22.991715] [<ffffffff81681d19>] system_call_fastpath+0x16/0x1b
This is because we hold the rtnl_lock() before ndo_change_mtu() and try to flush
the work in netvsc_change_mtu(), in the mean time, netdev_notify_peers() may be
called from worker and also trying to hold the rtnl_lock. This will lead the
flush won't succeed forever. Solve this by not canceling and flushing the work,
this is safe because the transmission done by NETDEV_NOTIFY_PEERS was
synchronized with the netif_tx_disable() called by netvsc_change_mtu().
Reported-by: Yaju Cao <yacao@redhat.com>
Tested-by: Yaju Cao <yacao@redhat.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/hyperv/netvsc_drv.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -328,7 +328,6 @@ static int netvsc_change_mtu(struct net_
return -EINVAL;
nvdev->start_remove = true;
- cancel_delayed_work_sync(&ndevctx->dwork);
cancel_work_sync(&ndevctx->work);
netif_tx_disable(ndev);
rndis_filter_device_remove(hdev);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 19/62] ipv6: fix illegal mac_header comparison on 32bit
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (17 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 18/62] netvsc: dont flush peers notifying work during setting mtu Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 20/62] net: unix: allow bind to fail on mutex lock Greg Kroah-Hartman
` (41 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hannes Frederic Sowa
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/skbuff.h | 5 +++++
net/ipv6/udp_offload.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1741,6 +1741,11 @@ static inline void skb_set_mac_header(st
}
#endif /* NET_SKBUFF_DATA_USES_OFFSET */
+static inline void skb_pop_mac_header(struct sk_buff *skb)
+{
+ skb->mac_header = skb->network_header;
+}
+
static inline void skb_probe_transport_header(struct sk_buff *skb,
const int offset_hint)
{
--- a/net/ipv6/udp_offload.c
+++ b/net/ipv6/udp_offload.c
@@ -85,7 +85,7 @@ static struct sk_buff *udp6_ufo_fragment
/* Check if there is enough headroom to insert fragment header. */
tnl_hlen = skb_tnl_header_len(skb);
- if (skb->mac_header < (tnl_hlen + frag_hdr_sz)) {
+ if (skb_mac_header(skb) < skb->head + tnl_hlen + frag_hdr_sz) {
if (gso_pskb_expand_head(skb, tnl_hlen + frag_hdr_sz))
goto out;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 20/62] net: unix: allow bind to fail on mutex lock
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (18 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 19/62] ipv6: fix illegal mac_header comparison on 32bit Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 22/62] net: inet_diag: zero out uninitialized idiag_{src,dst} fields Greg Kroah-Hartman
` (40 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Sasha Levin, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sasha Levin <sasha.levin@oracle.com>
[ Upstream commit 37ab4fa7844a044dc21fde45e2a0fc2f3c3b6490 ]
This is similar to the set_peek_off patch where calling bind while the
socket is stuck in unix_dgram_recvmsg() will block and cause a hung task
spew after a while.
This is also the last place that did a straightforward mutex_lock(), so
there shouldn't be any more of these patches.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/unix/af_unix.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -717,7 +717,9 @@ static int unix_autobind(struct socket *
int err;
unsigned int retries = 0;
- mutex_lock(&u->readlock);
+ err = mutex_lock_interruptible(&u->readlock);
+ if (err)
+ return err;
err = 0;
if (u->addr)
@@ -876,7 +878,9 @@ static int unix_bind(struct socket *sock
goto out;
addr_len = err;
- mutex_lock(&u->readlock);
+ err = mutex_lock_interruptible(&u->readlock);
+ if (err)
+ goto out;
err = -EINVAL;
if (u->addr)
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 22/62] net: inet_diag: zero out uninitialized idiag_{src,dst} fields
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (19 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 20/62] net: unix: allow bind to fail on mutex lock Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 23/62] drivers/net/hamradio: Integer overflow in hdlcdrv_ioctl() Greg Kroah-Hartman
` (39 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Jakub Zawadzki, Daniel Borkmann,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <dborkman@redhat.com>
[ Upstream commit b1aac815c0891fe4a55a6b0b715910142227700f ]
Jakub reported while working with nlmon netlink sniffer that parts of
the inet_diag_sockid are not initialized when r->idiag_family != AF_INET6.
That is, fields of r->id.idiag_src[1 ... 3], r->id.idiag_dst[1 ... 3].
In fact, it seems that we can leak 6 * sizeof(u32) byte of kernel [slab]
memory through this. At least, in udp_dump_one(), we allocate a skb in ...
rep = nlmsg_new(sizeof(struct inet_diag_msg) + ..., GFP_KERNEL);
... and then pass that to inet_sk_diag_fill() that puts the whole struct
inet_diag_msg into the skb, where we only fill out r->id.idiag_src[0],
r->id.idiag_dst[0] and leave the rest untouched:
r->id.idiag_src[0] = inet->inet_rcv_saddr;
r->id.idiag_dst[0] = inet->inet_daddr;
struct inet_diag_msg embeds struct inet_diag_sockid that is correctly /
fully filled out in IPv6 case, but for IPv4 not.
So just zero them out by using plain memset (for this little amount of
bytes it's probably not worth the extra check for idiag_family == AF_INET).
Similarly, fix also other places where we fill that out.
Reported-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/inet_diag.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -106,6 +106,10 @@ int inet_sk_diag_fill(struct sock *sk, s
r->id.idiag_sport = inet->inet_sport;
r->id.idiag_dport = inet->inet_dport;
+
+ memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src));
+ memset(&r->id.idiag_dst, 0, sizeof(r->id.idiag_dst));
+
r->id.idiag_src[0] = inet->inet_rcv_saddr;
r->id.idiag_dst[0] = inet->inet_daddr;
@@ -240,12 +244,19 @@ static int inet_twsk_diag_fill(struct in
r->idiag_family = tw->tw_family;
r->idiag_retrans = 0;
+
r->id.idiag_if = tw->tw_bound_dev_if;
sock_diag_save_cookie(tw, r->id.idiag_cookie);
+
r->id.idiag_sport = tw->tw_sport;
r->id.idiag_dport = tw->tw_dport;
+
+ memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src));
+ memset(&r->id.idiag_dst, 0, sizeof(r->id.idiag_dst));
+
r->id.idiag_src[0] = tw->tw_rcv_saddr;
r->id.idiag_dst[0] = tw->tw_daddr;
+
r->idiag_state = tw->tw_substate;
r->idiag_timer = 3;
r->idiag_expires = DIV_ROUND_UP(tmo * 1000, HZ);
@@ -732,8 +743,13 @@ static int inet_diag_fill_req(struct sk_
r->id.idiag_sport = inet->inet_sport;
r->id.idiag_dport = ireq->rmt_port;
+
+ memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src));
+ memset(&r->id.idiag_dst, 0, sizeof(r->id.idiag_dst));
+
r->id.idiag_src[0] = ireq->loc_addr;
r->id.idiag_dst[0] = ireq->rmt_addr;
+
r->idiag_expires = jiffies_to_msecs(tmo);
r->idiag_rqueue = 0;
r->idiag_wqueue = 0;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 23/62] drivers/net/hamradio: Integer overflow in hdlcdrv_ioctl()
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (20 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 22/62] net: inet_diag: zero out uninitialized idiag_{src,dst} fields Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 25/62] net: fec: fix potential use after free Greg Kroah-Hartman
` (38 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Wenliang Fan, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wenliang Fan <fanwlexca@gmail.com>
[ Upstream commit e9db5c21d3646a6454fcd04938dd215ac3ab620a ]
The local variable 'bi' comes from userspace. If userspace passed a
large number to 'bi.data.calibrate', there would be an integer overflow
in the following line:
s->hdlctx.calibrate = bi.data.calibrate * s->par.bitrate / 16;
Signed-off-by: Wenliang Fan <fanwlexca@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/hamradio/hdlcdrv.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/net/hamradio/hdlcdrv.c
+++ b/drivers/net/hamradio/hdlcdrv.c
@@ -571,6 +571,8 @@ static int hdlcdrv_ioctl(struct net_devi
case HDLCDRVCTL_CALIBRATE:
if(!capable(CAP_SYS_RAWIO))
return -EPERM;
+ if (bi.data.calibrate > INT_MAX / s->par.bitrate)
+ return -EINVAL;
s->hdlctx.calibrate = bi.data.calibrate * s->par.bitrate / 16;
return 0;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 25/62] net: fec: fix potential use after free
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (21 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 23/62] drivers/net/hamradio: Integer overflow in hdlcdrv_ioctl() Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 26/62] ipv6: always set the new created dsts from in ip6_rt_copy Greg Kroah-Hartman
` (37 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Eric Dumazet, Frank Li,
Richard Cochran, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 7a2a84518cfb263d2c4171b3d63671f88316adb2 ]
skb_tx_timestamp(skb) should be called _before_ TX completion
has a chance to trigger, otherwise it is too late and we access
freed memory.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: de5fb0a05348 ("net: fec: put tx to napi poll function to fix dead lock")
Cc: Frank Li <Frank.Li@freescale.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/freescale/fec_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -371,6 +371,8 @@ fec_enet_start_xmit(struct sk_buff *skb,
else
bdp = fec_enet_get_nextdesc(bdp, fep->bufdesc_ex);
+ skb_tx_timestamp(skb);
+
fep->cur_tx = bdp;
if (fep->cur_tx == fep->dirty_tx)
@@ -379,8 +381,6 @@ fec_enet_start_xmit(struct sk_buff *skb,
/* Trigger transmission start */
writel(0, fep->hwp + FEC_X_DES_ACTIVE);
- skb_tx_timestamp(skb);
-
return NETDEV_TX_OK;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 26/62] ipv6: always set the new created dsts from in ip6_rt_copy
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (22 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 25/62] net: fec: fix potential use after free Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 27/62] rds: prevent dereference of a NULL device Greg Kroah-Hartman
` (36 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Hannes Frederic Sowa, Gao feng,
Li RongQing, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li RongQing <roy.qing.li@gmail.com>
[ Upstream commit 24f5b855e17df7e355eacd6c4a12cc4d6a6c9ff0 ]
ip6_rt_copy only sets dst.from if ort has flag RTF_ADDRCONF and RTF_DEFAULT.
but the prefix routes which did get installed by hand locally can have an
expiration, and no any flag combination which can ensure a potential from
does never expire, so we should always set the new created dst's from.
This also fixes the new created dst is always expired since the ort, which
is created by RA, maybe has RTF_EXPIRES and RTF_ADDRCONF, but no RTF_DEFAULT.
Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
CC: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv6/route.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1838,9 +1838,7 @@ static struct rt6_info *ip6_rt_copy(stru
else
rt->rt6i_gateway = *dest;
rt->rt6i_flags = ort->rt6i_flags;
- if ((ort->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) ==
- (RTF_DEFAULT | RTF_ADDRCONF))
- rt6_set_from(rt, ort);
+ rt6_set_from(rt, ort);
rt->rt6i_metric = 0;
#ifdef CONFIG_IPV6_SUBTREES
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 27/62] rds: prevent dereference of a NULL device
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (23 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 26/62] ipv6: always set the new created dsts from in ip6_rt_copy Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 28/62] net: rose: restore old recvmsg behavior Greg Kroah-Hartman
` (35 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Sasha Levin, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sasha Levin <sasha.levin@oracle.com>
[ Upstream commit c2349758acf1874e4c2b93fe41d072336f1a31d0 ]
Binding might result in a NULL device, which is dereferenced
causing this BUG:
[ 1317.260548] BUG: unable to handle kernel NULL pointer dereference at 000000000000097
4
[ 1317.261847] IP: [<ffffffff84225f52>] rds_ib_laddr_check+0x82/0x110
[ 1317.263315] PGD 418bcb067 PUD 3ceb21067 PMD 0
[ 1317.263502] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
[ 1317.264179] Dumping ftrace buffer:
[ 1317.264774] (ftrace buffer empty)
[ 1317.265220] Modules linked in:
[ 1317.265824] CPU: 4 PID: 836 Comm: trinity-child46 Tainted: G W 3.13.0-rc4-
next-20131218-sasha-00013-g2cebb9b-dirty #4159
[ 1317.267415] task: ffff8803ddf33000 ti: ffff8803cd31a000 task.ti: ffff8803cd31a000
[ 1317.268399] RIP: 0010:[<ffffffff84225f52>] [<ffffffff84225f52>] rds_ib_laddr_check+
0x82/0x110
[ 1317.269670] RSP: 0000:ffff8803cd31bdf8 EFLAGS: 00010246
[ 1317.270230] RAX: 0000000000000000 RBX: ffff88020b0dd388 RCX: 0000000000000000
[ 1317.270230] RDX: ffffffff8439822e RSI: 00000000000c000a RDI: 0000000000000286
[ 1317.270230] RBP: ffff8803cd31be38 R08: 0000000000000000 R09: 0000000000000000
[ 1317.270230] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[ 1317.270230] R13: 0000000054086700 R14: 0000000000a25de0 R15: 0000000000000031
[ 1317.270230] FS: 00007ff40251d700(0000) GS:ffff88022e200000(0000) knlGS:000000000000
0000
[ 1317.270230] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 1317.270230] CR2: 0000000000000974 CR3: 00000003cd478000 CR4: 00000000000006e0
[ 1317.270230] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1317.270230] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000090602
[ 1317.270230] Stack:
[ 1317.270230] 0000000054086700 5408670000a25de0 5408670000000002 0000000000000000
[ 1317.270230] ffffffff84223542 00000000ea54c767 0000000000000000 ffffffff86d26160
[ 1317.270230] ffff8803cd31be68 ffffffff84223556 ffff8803cd31beb8 ffff8800c6765280
[ 1317.270230] Call Trace:
[ 1317.270230] [<ffffffff84223542>] ? rds_trans_get_preferred+0x42/0xa0
[ 1317.270230] [<ffffffff84223556>] rds_trans_get_preferred+0x56/0xa0
[ 1317.270230] [<ffffffff8421c9c3>] rds_bind+0x73/0xf0
[ 1317.270230] [<ffffffff83e4ce62>] SYSC_bind+0x92/0xf0
[ 1317.270230] [<ffffffff812493f8>] ? context_tracking_user_exit+0xb8/0x1d0
[ 1317.270230] [<ffffffff8119313d>] ? trace_hardirqs_on+0xd/0x10
[ 1317.270230] [<ffffffff8107a852>] ? syscall_trace_enter+0x32/0x290
[ 1317.270230] [<ffffffff83e4cece>] SyS_bind+0xe/0x10
[ 1317.270230] [<ffffffff843a6ad0>] tracesys+0xdd/0xe2
[ 1317.270230] Code: 00 8b 45 cc 48 8d 75 d0 48 c7 45 d8 00 00 00 00 66 c7 45 d0 02 00
89 45 d4 48 89 df e8 78 49 76 ff 41 89 c4 85 c0 75 0c 48 8b 03 <80> b8 74 09 00 00 01 7
4 06 41 bc 9d ff ff ff f6 05 2a b6 c2 02
[ 1317.270230] RIP [<ffffffff84225f52>] rds_ib_laddr_check+0x82/0x110
[ 1317.270230] RSP <ffff8803cd31bdf8>
[ 1317.270230] CR2: 0000000000000974
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/rds/ib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -338,7 +338,8 @@ static int rds_ib_laddr_check(__be32 add
ret = rdma_bind_addr(cm_id, (struct sockaddr *)&sin);
/* due to this, we will claim to support iWARP devices unless we
check node_type. */
- if (ret || cm_id->device->node_type != RDMA_NODE_IB_CA)
+ if (ret || !cm_id->device ||
+ cm_id->device->node_type != RDMA_NODE_IB_CA)
ret = -EADDRNOTAVAIL;
rdsdebug("addr %pI4 ret %d node type %d\n",
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 28/62] net: rose: restore old recvmsg behavior
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (24 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 27/62] rds: prevent dereference of a NULL device Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 29/62] vlan: Fix header ops passthru when doing TX VLAN offload Greg Kroah-Hartman
` (34 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Florian Westphal,
Hannes Frederic Sowa, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <fw@strlen.de>
[ Upstream commit f81152e35001e91997ec74a7b4e040e6ab0acccf ]
recvmsg handler in net/rose/af_rose.c performs size-check ->msg_namelen.
After commit f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
(net: rework recvmsg handler msg_name and msg_namelen logic), we now
always take the else branch due to namelen being initialized to 0.
Digging in netdev-vger-cvs git repo shows that msg_namelen was
initialized with a fixed-size since at least 1995, so the else branch
was never taken.
Compile tested only.
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/rose/af_rose.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -1253,6 +1253,7 @@ static int rose_recvmsg(struct kiocb *io
if (msg->msg_name) {
struct sockaddr_rose *srose;
+ struct full_sockaddr_rose *full_srose = msg->msg_name;
memset(msg->msg_name, 0, sizeof(struct full_sockaddr_rose));
srose = msg->msg_name;
@@ -1260,18 +1261,9 @@ static int rose_recvmsg(struct kiocb *io
srose->srose_addr = rose->dest_addr;
srose->srose_call = rose->dest_call;
srose->srose_ndigis = rose->dest_ndigis;
- if (msg->msg_namelen >= sizeof(struct full_sockaddr_rose)) {
- struct full_sockaddr_rose *full_srose = (struct full_sockaddr_rose *)msg->msg_name;
- for (n = 0 ; n < rose->dest_ndigis ; n++)
- full_srose->srose_digis[n] = rose->dest_digis[n];
- msg->msg_namelen = sizeof(struct full_sockaddr_rose);
- } else {
- if (rose->dest_ndigis >= 1) {
- srose->srose_ndigis = 1;
- srose->srose_digi = rose->dest_digis[0];
- }
- msg->msg_namelen = sizeof(struct sockaddr_rose);
- }
+ for (n = 0 ; n < rose->dest_ndigis ; n++)
+ full_srose->srose_digis[n] = rose->dest_digis[n];
+ msg->msg_namelen = sizeof(struct full_sockaddr_rose);
}
skb_free_datagram(sk, skb);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 29/62] vlan: Fix header ops passthru when doing TX VLAN offload.
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (25 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 28/62] net: rose: restore old recvmsg behavior Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 30/62] virtio_net: fix error handling for mergeable buffers Greg Kroah-Hartman
` (33 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: "David S. Miller" <davem@davemloft.net>
[ Upstream commit 2205369a314e12fcec4781cc73ac9c08fc2b47de ]
When the vlan code detects that the real device can do TX VLAN offloads
in hardware, it tries to arrange for the real device's header_ops to
be invoked directly.
But it does so illegally, by simply hooking the real device's
header_ops up to the VLAN device.
This doesn't work because we will end up invoking a set of header_ops
routines which expect a device type which matches the real device, but
will see a VLAN device instead.
Fix this by providing a pass-thru set of header_ops which will arrange
to pass the proper real device instead.
To facilitate this add a dev_rebuild_header(). There are
implementations which provide a ->cache and ->create but not a
->rebuild (f.e. PLIP). So we need a helper function just like
dev_hard_header() to avoid crashes.
Use this helper in the one existing place where the
header_ops->rebuild was being invoked, the neighbour code.
With lots of help from Florian Westphal.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/netdevice.h | 9 +++++++++
net/8021q/vlan_dev.c | 19 ++++++++++++++++++-
net/core/neighbour.c | 2 +-
3 files changed, 28 insertions(+), 2 deletions(-)
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1772,6 +1772,15 @@ static inline int dev_parse_header(const
return dev->header_ops->parse(skb, haddr);
}
+static inline int dev_rebuild_header(struct sk_buff *skb)
+{
+ const struct net_device *dev = skb->dev;
+
+ if (!dev->header_ops || !dev->header_ops->rebuild)
+ return 0;
+ return dev->header_ops->rebuild(skb);
+}
+
typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len);
extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf);
static inline int unregister_gifconf(unsigned int family)
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -549,6 +549,23 @@ static const struct header_ops vlan_head
.parse = eth_header_parse,
};
+static int vlan_passthru_hard_header(struct sk_buff *skb, struct net_device *dev,
+ unsigned short type,
+ const void *daddr, const void *saddr,
+ unsigned int len)
+{
+ struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
+ struct net_device *real_dev = vlan->real_dev;
+
+ return dev_hard_header(skb, real_dev, type, daddr, saddr, len);
+}
+
+static const struct header_ops vlan_passthru_header_ops = {
+ .create = vlan_passthru_hard_header,
+ .rebuild = dev_rebuild_header,
+ .parse = eth_header_parse,
+};
+
static struct device_type vlan_type = {
.name = "vlan",
};
@@ -592,7 +609,7 @@ static int vlan_dev_init(struct net_devi
dev->needed_headroom = real_dev->needed_headroom;
if (real_dev->features & NETIF_F_HW_VLAN_CTAG_TX) {
- dev->header_ops = real_dev->header_ops;
+ dev->header_ops = &vlan_passthru_header_ops;
dev->hard_header_len = real_dev->hard_header_len;
} else {
dev->header_ops = &vlan_header_ops;
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1274,7 +1274,7 @@ int neigh_compat_output(struct neighbour
if (dev_hard_header(skb, dev, ntohs(skb->protocol), NULL, NULL,
skb->len) < 0 &&
- dev->header_ops->rebuild(skb))
+ dev_rebuild_header(skb))
return 0;
return dev_queue_xmit(skb);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 30/62] virtio_net: fix error handling for mergeable buffers
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (26 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 29/62] vlan: Fix header ops passthru when doing TX VLAN offload Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 31/62] virtio-net: make all RX paths handle errors consistently Greg Kroah-Hartman
` (32 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Rusty Russell, Michael Dalton,
Eric Dumazet, Jason Wang, David S. Miller, Michael S. Tsirkin
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Michael S. Tsirkin" <mst@redhat.com>
Eric Dumazet noticed that if we encounter an error
when processing a mergeable buffer, we don't
dequeue all of the buffers from this packet,
the result is almost sure to be loss of networking.
Fix this issue.
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Michael Dalton <mwdalton@google.com>
Acked-by: Michael Dalton <mwdalton@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 8fc3b9e9a229778e5af3aa453c44f1a3857ba769)
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/virtio_net.c | 66 ++++++++++++++++++++++++++++++++---------------
1 file changed, 46 insertions(+), 20 deletions(-)
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -294,26 +294,33 @@ static struct sk_buff *page_to_skb(struc
return skb;
}
-static int receive_mergeable(struct receive_queue *rq, struct sk_buff *skb)
+static struct sk_buff *receive_mergeable(struct net_device *dev,
+ struct receive_queue *rq,
+ void *buf,
+ unsigned int len)
{
- struct skb_vnet_hdr *hdr = skb_vnet_hdr(skb);
- struct page *page;
- int num_buf, i, len;
+ struct skb_vnet_hdr *hdr = page_address(buf);
+ int num_buf = hdr->mhdr.num_buffers;
+ struct page *page = buf;
+ struct sk_buff *skb = page_to_skb(rq, page, len);
+ int i;
+
+ if (unlikely(!skb))
+ goto err_skb;
- num_buf = hdr->mhdr.num_buffers;
while (--num_buf) {
i = skb_shinfo(skb)->nr_frags;
if (i >= MAX_SKB_FRAGS) {
pr_debug("%s: packet too long\n", skb->dev->name);
skb->dev->stats.rx_length_errors++;
- return -EINVAL;
+ return NULL;
}
page = virtqueue_get_buf(rq->vq, &len);
if (!page) {
- pr_debug("%s: rx error: %d buffers missing\n",
- skb->dev->name, hdr->mhdr.num_buffers);
- skb->dev->stats.rx_length_errors++;
- return -EINVAL;
+ pr_debug("%s: rx error: %d buffers %d missing\n",
+ dev->name, hdr->mhdr.num_buffers, num_buf);
+ dev->stats.rx_length_errors++;
+ goto err_buf;
}
if (len > PAGE_SIZE)
@@ -323,7 +330,25 @@ static int receive_mergeable(struct rece
--rq->num;
}
- return 0;
+ return skb;
+err_skb:
+ give_pages(rq, page);
+ while (--num_buf) {
+ buf = virtqueue_get_buf(rq->vq, &len);
+ if (unlikely(!buf)) {
+ pr_debug("%s: rx error: %d buffers missing\n",
+ dev->name, num_buf);
+ dev->stats.rx_length_errors++;
+ break;
+ }
+ page = buf;
+ give_pages(rq, page);
+ --rq->num;
+ }
+err_buf:
+ dev->stats.rx_dropped++;
+ dev_kfree_skb(skb);
+ return NULL;
}
static void receive_buf(struct receive_queue *rq, void *buf, unsigned int len)
@@ -351,17 +376,18 @@ static void receive_buf(struct receive_q
skb_trim(skb, len);
} else {
page = buf;
- skb = page_to_skb(rq, page, len);
- if (unlikely(!skb)) {
- dev->stats.rx_dropped++;
- give_pages(rq, page);
- return;
- }
- if (vi->mergeable_rx_bufs)
- if (receive_mergeable(rq, skb)) {
- dev_kfree_skb(skb);
+ if (vi->mergeable_rx_bufs) {
+ skb = receive_mergeable(dev, rq, page, len);
+ if (unlikely(!skb))
+ return;
+ } else {
+ skb = page_to_skb(rq, page, len);
+ if (unlikely(!skb)) {
+ dev->stats.rx_dropped++;
+ give_pages(rq, page);
return;
}
+ }
}
hdr = skb_vnet_hdr(skb);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 31/62] virtio-net: make all RX paths handle errors consistently
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (27 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 30/62] virtio_net: fix error handling for mergeable buffers Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 32/62] virtio_net: dont leak memory or block when too many frags Greg Kroah-Hartman
` (31 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Jason Wang, David S. Miller,
Michael Dalton, Michael S. Tsirkin
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Michael S. Tsirkin" <mst@redhat.com>
receive mergeable now handles errors internally.
Do same for big and small packet paths, otherwise
the logic is too hard to follow.
Cc: Jason Wang <jasowang@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Acked-by: Michael Dalton <mwdalton@google.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit f121159d72091f25afb22007c833e60a6845e912)
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/virtio_net.c | 56 ++++++++++++++++++++++++++++++-----------------
1 file changed, 36 insertions(+), 20 deletions(-)
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -294,6 +294,34 @@ static struct sk_buff *page_to_skb(struc
return skb;
}
+static struct sk_buff *receive_small(void *buf, unsigned int len)
+{
+ struct sk_buff * skb = buf;
+
+ len -= sizeof(struct virtio_net_hdr);
+ skb_trim(skb, len);
+
+ return skb;
+}
+
+static struct sk_buff *receive_big(struct net_device *dev,
+ struct receive_queue *rq,
+ void *buf)
+{
+ struct page *page = buf;
+ struct sk_buff *skb = page_to_skb(rq, page, 0);
+
+ if (unlikely(!skb))
+ goto err;
+
+ return skb;
+
+err:
+ dev->stats.rx_dropped++;
+ give_pages(rq, page);
+ return NULL;
+}
+
static struct sk_buff *receive_mergeable(struct net_device *dev,
struct receive_queue *rq,
void *buf,
@@ -357,7 +385,6 @@ static void receive_buf(struct receive_q
struct net_device *dev = vi->dev;
struct virtnet_stats *stats = this_cpu_ptr(vi->stats);
struct sk_buff *skb;
- struct page *page;
struct skb_vnet_hdr *hdr;
if (unlikely(len < sizeof(struct virtio_net_hdr) + ETH_HLEN)) {
@@ -369,26 +396,15 @@ static void receive_buf(struct receive_q
dev_kfree_skb(buf);
return;
}
+ if (vi->mergeable_rx_bufs)
+ skb = receive_mergeable(dev, rq, buf, len);
+ else if (vi->big_packets)
+ skb = receive_big(dev, rq, buf);
+ else
+ skb = receive_small(buf, len);
- if (!vi->mergeable_rx_bufs && !vi->big_packets) {
- skb = buf;
- len -= sizeof(struct virtio_net_hdr);
- skb_trim(skb, len);
- } else {
- page = buf;
- if (vi->mergeable_rx_bufs) {
- skb = receive_mergeable(dev, rq, page, len);
- if (unlikely(!skb))
- return;
- } else {
- skb = page_to_skb(rq, page, len);
- if (unlikely(!skb)) {
- dev->stats.rx_dropped++;
- give_pages(rq, page);
- return;
- }
- }
- }
+ if (unlikely(!skb))
+ return;
hdr = skb_vnet_hdr(skb);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 32/62] virtio_net: dont leak memory or block when too many frags
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (28 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 31/62] virtio-net: make all RX paths handle errors consistently Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 33/62] virtio-net: fix refill races during restore Greg Kroah-Hartman
` (30 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Michael Dalton, Michael S. Tsirkin
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Michael S. Tsirkin" <mst@redhat.com>
We leak an skb when there are too many frags,
we also stop processing the packet in the middle,
the result is almost sure to be loss of networking.
Reported-by: Michael Dalton <mwdalton@google.com>
Acked-by: Michael Dalton <mwdalton@google.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -341,7 +341,7 @@ static struct sk_buff *receive_mergeable
if (i >= MAX_SKB_FRAGS) {
pr_debug("%s: packet too long\n", skb->dev->name);
skb->dev->stats.rx_length_errors++;
- return NULL;
+ goto err_frags;
}
page = virtqueue_get_buf(rq->vq, &len);
if (!page) {
@@ -362,6 +362,7 @@ static struct sk_buff *receive_mergeable
err_skb:
give_pages(rq, page);
while (--num_buf) {
+err_frags:
buf = virtqueue_get_buf(rq->vq, &len);
if (unlikely(!buf)) {
pr_debug("%s: rx error: %d buffers missing\n",
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 33/62] virtio-net: fix refill races during restore
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (29 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 32/62] virtio_net: dont leak memory or block when too many frags Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 34/62] net: llc: fix use after free in llc_ui_recvmsg Greg Kroah-Hartman
` (29 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Amit Shah, Rusty Russell,
Michael S. Tsirkin, Eric Dumazet, Jason Wang, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Wang <jasowang@redhat.com>
[ Upstream commit 6cd4ce0099da7702f885b6fa9ebb49e3831d90b4 ]
During restoring, try_fill_recv() was called with neither napi lock nor napi
disabled. This can lead two try_fill_recv() was called in the same time. Fix
this by refilling before trying to enable napi.
Fixes 0741bcb5584f9e2390ae6261573c4de8314999f2
(virtio: net: Add freeze, restore handlers to support S4).
Cc: Amit Shah <amit.shah@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/virtio_net.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1745,16 +1745,17 @@ static int virtnet_restore(struct virtio
if (err)
return err;
- if (netif_running(vi->dev))
+ if (netif_running(vi->dev)) {
+ for (i = 0; i < vi->curr_queue_pairs; i++)
+ if (!try_fill_recv(&vi->rq[i], GFP_KERNEL))
+ schedule_delayed_work(&vi->refill, 0);
+
for (i = 0; i < vi->max_queue_pairs; i++)
virtnet_napi_enable(&vi->rq[i]);
+ }
netif_device_attach(vi->dev);
- for (i = 0; i < vi->curr_queue_pairs; i++)
- if (!try_fill_recv(&vi->rq[i], GFP_KERNEL))
- schedule_delayed_work(&vi->refill, 0);
-
mutex_lock(&vi->config_lock);
vi->config_enable = true;
mutex_unlock(&vi->config_lock);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 34/62] net: llc: fix use after free in llc_ui_recvmsg
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (30 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 33/62] virtio-net: fix refill races during restore Greg Kroah-Hartman
@ 2014-01-14 0:26 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 35/62] netpoll: Fix missing TXQ unlock and and OOPS Greg Kroah-Hartman
` (28 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:26 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Daniel Borkmann, Stephen Hemminger,
Arnaldo Carvalho de Melo, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <dborkman@redhat.com>
[ Upstream commit 4d231b76eef6c4a6bd9c96769e191517765942cb ]
While commit 30a584d944fb fixes datagram interface in LLC, a use
after free bug has been introduced for SOCK_STREAM sockets that do
not make use of MSG_PEEK.
The flow is as follow ...
if (!(flags & MSG_PEEK)) {
...
sk_eat_skb(sk, skb, false);
...
}
...
if (used + offset < skb->len)
continue;
... where sk_eat_skb() calls __kfree_skb(). Therefore, cache
original length and work on skb_len to check partial reads.
Fixes: 30a584d944fb ("[LLX]: SOCK_DGRAM interface fixes")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/llc/af_llc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -715,7 +715,7 @@ static int llc_ui_recvmsg(struct kiocb *
unsigned long cpu_flags;
size_t copied = 0;
u32 peek_seq = 0;
- u32 *seq;
+ u32 *seq, skb_len;
unsigned long used;
int target; /* Read at least this many bytes */
long timeo;
@@ -812,6 +812,7 @@ static int llc_ui_recvmsg(struct kiocb *
}
continue;
found_ok_skb:
+ skb_len = skb->len;
/* Ok so how much can we use? */
used = skb->len - offset;
if (len < used)
@@ -844,7 +845,7 @@ static int llc_ui_recvmsg(struct kiocb *
}
/* Partial read */
- if (used + offset < skb->len)
+ if (used + offset < skb_len)
continue;
} while (len > 0);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 35/62] netpoll: Fix missing TXQ unlock and and OOPS.
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (31 preceding siblings ...)
2014-01-14 0:26 ` [PATCH 3.10 34/62] net: llc: fix use after free in llc_ui_recvmsg Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 36/62] bridge: use spin_lock_bh() in br_multicast_set_hash_max Greg Kroah-Hartman
` (27 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ahmed Tamrawi, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: "David S. Miller" <davem@davemloft.net>
[ Upstream commit aca5f58f9ba803ec8c2e6bcf890db17589e8dfcc ]
The VLAN tag handling code in netpoll_send_skb_on_dev() has two problems.
1) It exits without unlocking the TXQ.
2) It then tries to queue a NULL skb to npinfo->txq.
Reported-by: Ahmed Tamrawi <atamrawi@iastate.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/core/netpoll.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -386,8 +386,14 @@ void netpoll_send_skb_on_dev(struct netp
!vlan_hw_offload_capable(netif_skb_features(skb),
skb->vlan_proto)) {
skb = __vlan_put_tag(skb, skb->vlan_proto, vlan_tx_tag_get(skb));
- if (unlikely(!skb))
- break;
+ if (unlikely(!skb)) {
+ /* This is actually a packet drop, but we
+ * don't want the code at the end of this
+ * function to try and re-queue a NULL skb.
+ */
+ status = NETDEV_TX_OK;
+ goto unlock_txq;
+ }
skb->vlan_tci = 0;
}
@@ -395,6 +401,7 @@ void netpoll_send_skb_on_dev(struct netp
if (status == NETDEV_TX_OK)
txq_trans_update(txq);
}
+ unlock_txq:
__netif_tx_unlock(txq);
if (status == NETDEV_TX_OK)
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 36/62] bridge: use spin_lock_bh() in br_multicast_set_hash_max
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (32 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 35/62] netpoll: Fix missing TXQ unlock and and OOPS Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 37/62] net: Loosen constraints for recalculating checksum in skb_segment() Greg Kroah-Hartman
` (26 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Curt Brune, Scott Feldman,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Curt Brune <curt@cumulusnetworks.com>
[ Upstream commit fe0d692bbc645786bce1a98439e548ae619269f5 ]
br_multicast_set_hash_max() is called from process context in
net/bridge/br_sysfs_br.c by the sysfs store_hash_max() function.
br_multicast_set_hash_max() calls spin_lock(&br->multicast_lock),
which can deadlock the CPU if a softirq that also tries to take the
same lock interrupts br_multicast_set_hash_max() while the lock is
held . This can happen quite easily when any of the bridge multicast
timers expire, which try to take the same lock.
The fix here is to use spin_lock_bh(), preventing other softirqs from
executing on this CPU.
Steps to reproduce:
1. Create a bridge with several interfaces (I used 4).
2. Set the "multicast query interval" to a low number, like 2.
3. Enable the bridge as a multicast querier.
4. Repeatedly set the bridge hash_max parameter via sysfs.
# brctl addbr br0
# brctl addif br0 eth1 eth2 eth3 eth4
# brctl setmcqi br0 2
# brctl setmcquerier br0 1
# while true ; do echo 4096 > /sys/class/net/br0/bridge/hash_max; done
Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/bridge/br_multicast.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1839,7 +1839,7 @@ int br_multicast_set_hash_max(struct net
u32 old;
struct net_bridge_mdb_htable *mdb;
- spin_lock(&br->multicast_lock);
+ spin_lock_bh(&br->multicast_lock);
if (!netif_running(br->dev))
goto unlock;
@@ -1871,7 +1871,7 @@ rollback:
}
unlock:
- spin_unlock(&br->multicast_lock);
+ spin_unlock_bh(&br->multicast_lock);
return err;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 37/62] net: Loosen constraints for recalculating checksum in skb_segment()
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (33 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 36/62] bridge: use spin_lock_bh() in br_multicast_set_hash_max Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 38/62] ARM: fix footbridge clockevent device Greg Kroah-Hartman
` (25 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Simon Horman, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Simon Horman <horms@verge.net.au>
[ Upstream commit 1cdbcb7957cf9e5f841dbcde9b38fd18a804208b ]
This is a generic solution to resolve a specific problem that I have observed.
If the encapsulation of an skb changes then ability to offload checksums
may also change. In particular it may be necessary to perform checksumming
in software.
An example of such a case is where a non-GRE packet is received but
is to be encapsulated and transmitted as GRE.
Another example relates to my proposed support for for packets
that are non-MPLS when received but MPLS when transmitted.
The cost of this change is that the value of the csum variable may be
checked when it previously was not. In the case where the csum variable is
true this is pure overhead. In the case where the csum variable is false it
leads to software checksumming, which I believe also leads to correct
checksums in transmitted packets for the cases described above.
Further analysis:
This patch relies on the return value of can_checksum_protocol()
being correct and in turn the return value of skb_network_protocol(),
used to provide the protocol parameter of can_checksum_protocol(),
being correct. It also relies on the features passed to skb_segment()
and in turn to can_checksum_protocol() being correct.
I believe that this problem has not been observed for VLANs because it
appears that almost all drivers, the exception being xgbe, set
vlan_features such that that the checksum offload support for VLAN packets
is greater than or equal to that of non-VLAN packets.
I wonder if the code in xgbe may be an oversight and the hardware does
support checksumming of VLAN packets. If so it may be worth updating the
vlan_features of the driver as this patch will force such checksums to be
performed in software rather than hardware.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/core/skbuff.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2854,7 +2854,7 @@ struct sk_buff *skb_segment(struct sk_bu
doffset + tnl_hlen);
if (fskb != skb_shinfo(skb)->frag_list)
- continue;
+ goto perform_csum_check;
if (!sg) {
nskb->ip_summed = CHECKSUM_NONE;
@@ -2918,6 +2918,7 @@ skip_fraglist:
nskb->len += nskb->data_len;
nskb->truesize += nskb->data_len;
+perform_csum_check:
if (!csum) {
nskb->csum = skb_checksum(nskb, doffset,
nskb->len - doffset, 0);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 38/62] ARM: fix footbridge clockevent device
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (34 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 37/62] net: Loosen constraints for recalculating checksum in skb_segment() Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 39/62] ARM: fix "bad mode in ... handler" message for undefined instructions Greg Kroah-Hartman
` (24 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Russell King
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Russell King <rmk+kernel@arm.linux.org.uk>
commit 4ff859fe1dc0da0f87bbdfff78f527898878fa4a upstream.
The clockevents code was being told that the footbridge clock event
device ticks at 16x the rate which it actually does. This leads to
timekeeping problems since it allows the clocksource to wrap before
the kernel notices. Fix this by using the correct clock.
Fixes: 4e8d76373c9fd ("ARM: footbridge: convert to clockevents/clocksource")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/mach-footbridge/dc21285-timer.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/arch/arm/mach-footbridge/dc21285-timer.c
+++ b/arch/arm/mach-footbridge/dc21285-timer.c
@@ -96,11 +96,12 @@ static struct irqaction footbridge_timer
void __init footbridge_timer_init(void)
{
struct clock_event_device *ce = &ckevt_dc21285;
+ unsigned rate = DIV_ROUND_CLOSEST(mem_fclk_21285, 16);
- clocksource_register_hz(&cksrc_dc21285, (mem_fclk_21285 + 8) / 16);
+ clocksource_register_hz(&cksrc_dc21285, rate);
setup_irq(ce->irq, &footbridge_timer_irq);
ce->cpumask = cpumask_of(smp_processor_id());
- clockevents_config_and_register(ce, mem_fclk_21285, 0x4, 0xffffff);
+ clockevents_config_and_register(ce, rate, 0x4, 0xffffff);
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 39/62] ARM: fix "bad mode in ... handler" message for undefined instructions
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (35 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 38/62] ARM: fix footbridge clockevent device Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 40/62] ARM: dts: exynos5250: Fix MDMA0 clock number Greg Kroah-Hartman
` (23 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Russell King
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Russell King <rmk+kernel@arm.linux.org.uk>
commit 29c350bf28da333e41e30497b649fe335712a2ab upstream.
The array was missing the final entry for the undefined instruction
exception handler; this commit adds it.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/kernel/traps.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -35,7 +35,13 @@
#include <asm/tls.h>
#include <asm/system_misc.h>
-static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" };
+static const char *handler[]= {
+ "prefetch abort",
+ "data abort",
+ "address exception",
+ "interrupt",
+ "undefined instruction",
+};
void *vectors_page;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 40/62] ARM: dts: exynos5250: Fix MDMA0 clock number
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (36 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 39/62] ARM: fix "bad mode in ... handler" message for undefined instructions Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 41/62] ARM: shmobile: kzm9g: Fix coherent DMA mask Greg Kroah-Hartman
` (22 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Abhilash Kesavan, Mike Turquette,
Tomasz Figa
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abhilash Kesavan <a.kesavan@samsung.com>
commit 8777539479abd7b3efeb691685415dc2b057d0e0 upstream.
Due to incorrect clock specified in MDMA0 node, using MDMA0 controller
could cause system failures, due to wrong clock being controlled. This
patch fixes this by specifying correct clock.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
[t.figa: Corrected commit message and description.]
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/boot/dts/exynos5250.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -545,7 +545,7 @@
compatible = "arm,pl330", "arm,primecell";
reg = <0x10800000 0x1000>;
interrupts = <0 33 0>;
- clocks = <&clock 271>;
+ clocks = <&clock 346>;
clock-names = "apb_pclk";
#dma-cells = <1>;
#dma-channels = <8>;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 41/62] ARM: shmobile: kzm9g: Fix coherent DMA mask
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (37 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 40/62] ARM: dts: exynos5250: Fix MDMA0 clock number Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 42/62] ARM: shmobile: armadillo: " Greg Kroah-Hartman
` (21 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Laurent Pinchart, Simon Horman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
commit 4f387323853c495ac589210832fad4503f75a0e7 upstream.
Commit 4dcfa60071b3d23f0181f27d8519f12e37cefbb9 ("ARM: DMA-API: better
handing of DMA masks for coherent allocations") added an additional
check to the coherent DMA mask that results in an error when the mask is
larger than what dma_addr_t can address.
Set the LCDC coherent DMA mask to DMA_BIT_MASK(32) instead of ~0 to fix
the problem.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/mach-shmobile/board-kzm9g.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -332,7 +332,7 @@ static struct platform_device lcdc_devic
.resource = lcdc_resources,
.dev = {
.platform_data = &lcdc_info,
- .coherent_dma_mask = ~0,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
},
};
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 42/62] ARM: shmobile: armadillo: Fix coherent DMA mask
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (38 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 41/62] ARM: shmobile: kzm9g: Fix coherent DMA mask Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 43/62] ARM: shmobile: mackerel: " Greg Kroah-Hartman
` (20 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Laurent Pinchart, Simon Horman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
commit dcd740b645003b866d7eb30d13d34d0729cce9db upstream.
Commit 4dcfa60071b3d23f0181f27d8519f12e37cefbb9 ("ARM: DMA-API: better
handing of DMA masks for coherent allocations") added an additional
check to the coherent DMA mask that results in an error when the mask is
larger than what dma_addr_t can address.
Set the LCDC coherent DMA mask to DMA_BIT_MASK(32) instead of ~0 to fix
the problem.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/mach-shmobile/board-armadillo800eva.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -437,7 +437,7 @@ static struct platform_device lcdc0_devi
.id = 0,
.dev = {
.platform_data = &lcdc0_info,
- .coherent_dma_mask = ~0,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
},
};
@@ -534,7 +534,7 @@ static struct platform_device hdmi_lcdc_
.id = 1,
.dev = {
.platform_data = &hdmi_lcdc_info,
- .coherent_dma_mask = ~0,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
},
};
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 43/62] ARM: shmobile: mackerel: Fix coherent DMA mask
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (39 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 42/62] ARM: shmobile: armadillo: " Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 45/62] parisc: Ensure full cache coherency for kmap/kunmap Greg Kroah-Hartman
` (19 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Laurent Pinchart, Simon Horman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
commit b6328a6b7ba57fc84c38248f6f0e387e1170f1a8 upstream.
Commit 4dcfa60071b3d23f0181f27d8519f12e37cefbb9 ("ARM: DMA-API: better
handing of DMA masks for coherent allocations") added an additional
check to the coherent DMA mask that results in an error when the mask is
larger than what dma_addr_t can address.
Set the LCDC coherent DMA mask to DMA_BIT_MASK(32) instead of ~0 to fix
the problem.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/mach-shmobile/board-mackerel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -421,7 +421,7 @@ static struct platform_device lcdc_devic
.resource = lcdc_resources,
.dev = {
.platform_data = &lcdc_info,
- .coherent_dma_mask = ~0,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
},
};
@@ -497,7 +497,7 @@ static struct platform_device hdmi_lcdc_
.id = 1,
.dev = {
.platform_data = &hdmi_lcdc_info,
- .coherent_dma_mask = ~0,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
},
};
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 45/62] parisc: Ensure full cache coherency for kmap/kunmap
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (40 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 43/62] ARM: shmobile: mackerel: " Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 46/62] ahci: add PCI ID for Marvell 88SE9170 SATA controller Greg Kroah-Hartman
` (18 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, John David Anglin, Helge Deller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: John David Anglin <dave.anglin@bell.net>
commit f8dae00684d678afa13041ef170cecfd1297ed40 upstream.
Helge Deller noted a few weeks ago problems with the AIO support on
parisc. This change is the result of numerous iterations on how best to
deal with this problem.
The solution adopted here is to provide full cache coherency in a
uniform manner on all parisc systems. This involves calling
flush_dcache_page() on kmap operations and flush_kernel_dcache_page() on
kunmap operations. As a result, the copy_user_page() and
clear_user_page() functions can be removed and the overall code is
simpler.
The change ensures that both userspace and kernel aliases to a mapped
page are invalidated and flushed. This is necessary for the correct
operation of PA8800 and PA8900 based systems which do not support
inequivalent aliases.
With this change, I have observed no cache related issues on c8000 and
rp3440. It is now possible for example to do kernel builds with "-j64"
on four way systems.
On systems using XFS file systems, the patch recently posted by Mikulas
Patocka to "fix crash using XFS on loopback" is needed to avoid a hang
caused by an uninitialized lock passed to flush_dcache_page() in the
page struct.
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/parisc/include/asm/cacheflush.h | 12 ++++--------
arch/parisc/include/asm/page.h | 5 ++---
arch/parisc/kernel/cache.c | 35 -----------------------------------
3 files changed, 6 insertions(+), 46 deletions(-)
--- a/arch/parisc/include/asm/cacheflush.h
+++ b/arch/parisc/include/asm/cacheflush.h
@@ -125,42 +125,38 @@ flush_anon_page(struct vm_area_struct *v
void mark_rodata_ro(void);
#endif
-#ifdef CONFIG_PA8X00
-/* Only pa8800, pa8900 needs this */
-
#include <asm/kmap_types.h>
#define ARCH_HAS_KMAP
-void kunmap_parisc(void *addr);
-
static inline void *kmap(struct page *page)
{
might_sleep();
+ flush_dcache_page(page);
return page_address(page);
}
static inline void kunmap(struct page *page)
{
- kunmap_parisc(page_address(page));
+ flush_kernel_dcache_page_addr(page_address(page));
}
static inline void *kmap_atomic(struct page *page)
{
pagefault_disable();
+ flush_dcache_page(page);
return page_address(page);
}
static inline void __kunmap_atomic(void *addr)
{
- kunmap_parisc(addr);
+ flush_kernel_dcache_page_addr(addr);
pagefault_enable();
}
#define kmap_atomic_prot(page, prot) kmap_atomic(page)
#define kmap_atomic_pfn(pfn) kmap_atomic(pfn_to_page(pfn))
#define kmap_atomic_to_page(ptr) virt_to_page(ptr)
-#endif
#endif /* _PARISC_CACHEFLUSH_H */
--- a/arch/parisc/include/asm/page.h
+++ b/arch/parisc/include/asm/page.h
@@ -28,9 +28,8 @@ struct page;
void clear_page_asm(void *page);
void copy_page_asm(void *to, void *from);
-void clear_user_page(void *vto, unsigned long vaddr, struct page *pg);
-void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
- struct page *pg);
+#define clear_user_page(vto, vaddr, page) clear_page_asm(vto)
+#define copy_user_page(vto, vfrom, vaddr, page) copy_page_asm(vto, vfrom)
/* #define CONFIG_PARISC_TMPALIAS */
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -388,41 +388,6 @@ void flush_kernel_dcache_page_addr(void
}
EXPORT_SYMBOL(flush_kernel_dcache_page_addr);
-void clear_user_page(void *vto, unsigned long vaddr, struct page *page)
-{
- clear_page_asm(vto);
- if (!parisc_requires_coherency())
- flush_kernel_dcache_page_asm(vto);
-}
-EXPORT_SYMBOL(clear_user_page);
-
-void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
- struct page *pg)
-{
- /* Copy using kernel mapping. No coherency is needed
- (all in kmap/kunmap) on machines that don't support
- non-equivalent aliasing. However, the `from' page
- needs to be flushed before it can be accessed through
- the kernel mapping. */
- preempt_disable();
- flush_dcache_page_asm(__pa(vfrom), vaddr);
- preempt_enable();
- copy_page_asm(vto, vfrom);
- if (!parisc_requires_coherency())
- flush_kernel_dcache_page_asm(vto);
-}
-EXPORT_SYMBOL(copy_user_page);
-
-#ifdef CONFIG_PA8X00
-
-void kunmap_parisc(void *addr)
-{
- if (parisc_requires_coherency())
- flush_kernel_dcache_page_addr(addr);
-}
-EXPORT_SYMBOL(kunmap_parisc);
-#endif
-
void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
{
unsigned long flags;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 46/62] ahci: add PCI ID for Marvell 88SE9170 SATA controller
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (41 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 45/62] parisc: Ensure full cache coherency for kmap/kunmap Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 47/62] clk: clk-divider: fix divisor > 255 bug Greg Kroah-Hartman
` (17 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Simon Guinot, Tejun Heo
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Simon Guinot <sguinot@lacie.com>
commit e098f5cbe9d410e7878b50f524dce36cc83ec40e upstream.
This patch adds support for the PCI ID provided by the Marvell 88SE9170
SATA controller.
Signed-off-by: Simon Guinot <sguinot@lacie.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/ata/ahci.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -427,6 +427,9 @@ static const struct pci_device_id ahci_p
.driver_data = board_ahci_yes_fbs }, /* 88se9128 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9125),
.driver_data = board_ahci_yes_fbs }, /* 88se9125 */
+ { PCI_DEVICE_SUB(PCI_VENDOR_ID_MARVELL_EXT, 0x9178,
+ PCI_VENDOR_ID_MARVELL_EXT, 0x9170),
+ .driver_data = board_ahci_yes_fbs }, /* 88se9170 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a),
.driver_data = board_ahci_yes_fbs }, /* 88se9172 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9172),
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 47/62] clk: clk-divider: fix divisor > 255 bug
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (42 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 46/62] ahci: add PCI ID for Marvell 88SE9170 SATA controller Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 48/62] clk: samsung: exynos4: Correct SRC_MFC register Greg Kroah-Hartman
` (16 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, James Hogan, Rajendra Nayak,
linux-arm-kernel, Mike Turquette
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: James Hogan <james.hogan@imgtec.com>
commit 778037e1ccb75609846deca9e419449c1dc137fa upstream.
Commit 6d9252bd9a4bb (clk: Add support for power of two type dividers)
merged in v3.6 added the _get_val function to convert a divisor value to
a register field value depending on the flags. However it used the type
u8 for the div field, causing divisors larger than 255 to be masked
and the resultant clock rate to be too high.
E.g. in my case an 11bit divider was supposed to divide 24.576 MHz down
to 32.768KHz. The divisor was correctly calculated as 750 (0x2ee). This
was masked to 238 (0xee) resulting in a frequency of 103.26KHz.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/clk/clk-divider.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -87,7 +87,7 @@ static unsigned int _get_table_val(const
return 0;
}
-static unsigned int _get_val(struct clk_divider *divider, u8 div)
+static unsigned int _get_val(struct clk_divider *divider, unsigned int div)
{
if (divider->flags & CLK_DIVIDER_ONE_BASED)
return div;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 48/62] clk: samsung: exynos4: Correct SRC_MFC register
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (43 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 47/62] clk: clk-divider: fix divisor > 255 bug Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 49/62] clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg clock Greg Kroah-Hartman
` (15 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Seung-Woo Kim, Mike Turquette,
Tomasz Figa
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Seung-Woo Kim <sw0312.kim@samsung.com>
commit 5fdd1b56be51b1ec4dbde5b213d649ac717442da upstream.
The SRC_MFC register offset was incorrect, which could cause have caused
wrong calculation of rate of sclk_mfc clock, that could in turn lead to
incorrect operation of MFC. This patch corrects it.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
[t.figa: Updated patch description]
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/clk/samsung/clk-exynos4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/clk/samsung/clk-exynos4.c
+++ b/drivers/clk/samsung/clk-exynos4.c
@@ -40,7 +40,7 @@
#define SRC_TOP1 0xc214
#define SRC_CAM 0xc220
#define SRC_TV 0xc224
-#define SRC_MFC 0xcc28
+#define SRC_MFC 0xc228
#define SRC_G3D 0xc22c
#define E4210_SRC_IMAGE 0xc230
#define SRC_LCD0 0xc234
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 49/62] clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg clock
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (44 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 48/62] clk: samsung: exynos4: Correct SRC_MFC register Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 50/62] clk: exynos5250: fix sysmmu_mfc{l,r} gate clocks Greg Kroah-Hartman
` (14 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Abhilash Kesavan, Mike Turquette,
Tomasz Figa
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abhilash Kesavan <a.kesavan@samsung.com>
commit 2feed5aecf5f367b92bd6b6e92afe9e3de466907 upstream.
The sysreg (system register) generates control signals for various blocks
like disp1blk, i2c, mipi, usb etc. However, it gets disabled as an unused
clock at boot-up. This can lead to failures in operation of above blocks,
because they can not be configured properly if this clock is disabled.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
[t.figa: Updated patch description.]
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/clk/samsung/clk-exynos5250.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/clk/samsung/clk-exynos5250.c
+++ b/drivers/clk/samsung/clk-exynos5250.c
@@ -377,7 +377,8 @@ struct samsung_gate_clock exynos5250_gat
GATE(hsi2c2, "hsi2c2", "aclk66", GATE_IP_PERIC, 30, 0, 0),
GATE(hsi2c3, "hsi2c3", "aclk66", GATE_IP_PERIC, 31, 0, 0),
GATE(chipid, "chipid", "aclk66", GATE_IP_PERIS, 0, 0, 0),
- GATE(sysreg, "sysreg", "aclk66", GATE_IP_PERIS, 1, 0, 0),
+ GATE(sysreg, "sysreg", "aclk66",
+ GATE_IP_PERIS, 1, CLK_IGNORE_UNUSED, 0),
GATE(pmu, "pmu", "aclk66", GATE_IP_PERIS, 2, CLK_IGNORE_UNUSED, 0),
GATE(tzpc0, "tzpc0", "aclk66", GATE_IP_PERIS, 6, 0, 0),
GATE(tzpc1, "tzpc1", "aclk66", GATE_IP_PERIS, 7, 0, 0),
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 50/62] clk: exynos5250: fix sysmmu_mfc{l,r} gate clocks
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (45 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 49/62] clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg clock Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 51/62] mfd: rtsx_pcr: Disable interrupts before cancelling delayed works Greg Kroah-Hartman
` (13 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Andrew Bresticker, Sachin Kamat,
Mike Turquette, Tomasz Figa
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Bresticker <abrestic@chromium.org>
commit 97c3557c3e0413efb1f021f582d1459760e22727 upstream.
The gate clocks for the MFC sysmmus appear to be flipped, i.e.
GATE_IP_MFC[2] gates sysmmu_mfcl and GATE_IP_MFC[1] gates sysmmu_mfcr.
Fix this so that the MFC will start up.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/clk/samsung/clk-exynos5250.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/clk/samsung/clk-exynos5250.c
+++ b/drivers/clk/samsung/clk-exynos5250.c
@@ -325,8 +325,8 @@ struct samsung_gate_clock exynos5250_gat
GATE(smmu_gscl2, "smmu_gscl2", "aclk266", GATE_IP_GSCL, 9, 0, 0),
GATE(smmu_gscl3, "smmu_gscl3", "aclk266", GATE_IP_GSCL, 10, 0, 0),
GATE(mfc, "mfc", "aclk333", GATE_IP_MFC, 0, 0, 0),
- GATE(smmu_mfcl, "smmu_mfcl", "aclk333", GATE_IP_MFC, 1, 0, 0),
- GATE(smmu_mfcr, "smmu_mfcr", "aclk333", GATE_IP_MFC, 2, 0, 0),
+ GATE(smmu_mfcl, "smmu_mfcl", "aclk333", GATE_IP_MFC, 2, 0, 0),
+ GATE(smmu_mfcr, "smmu_mfcr", "aclk333", GATE_IP_MFC, 1, 0, 0),
GATE(rotator, "rotator", "aclk266", GATE_IP_GEN, 1, 0, 0),
GATE(jpeg, "jpeg", "aclk166", GATE_IP_GEN, 2, 0, 0),
GATE(mdma1, "mdma1", "aclk266", GATE_IP_GEN, 4, 0, 0),
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 51/62] mfd: rtsx_pcr: Disable interrupts before cancelling delayed works
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (46 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 50/62] clk: exynos5250: fix sysmmu_mfc{l,r} gate clocks Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 52/62] ACPI / TPM: fix memory leak when walking ACPI namespace Greg Kroah-Hartman
` (12 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Thomas Gleixner, Samuel Ortiz
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Gleixner <tglx@linutronix.de>
commit 73beb63d290f961c299526852884846b0d868840 upstream.
This fixes a kernel panic when resuming from suspend to RAM.
Without this fix an interrupt hits after the delayed work is canceled
and thus requeues it. So we end up freeing an armed timer.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/mfd/rtsx_pcr.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -1195,8 +1195,14 @@ static void rtsx_pci_remove(struct pci_d
pcr->remove_pci = true;
- cancel_delayed_work(&pcr->carddet_work);
- cancel_delayed_work(&pcr->idle_work);
+ /* Disable interrupts at the pcr level */
+ spin_lock_irq(&pcr->lock);
+ rtsx_pci_writel(pcr, RTSX_BIER, 0);
+ pcr->bier = 0;
+ spin_unlock_irq(&pcr->lock);
+
+ cancel_delayed_work_sync(&pcr->carddet_work);
+ cancel_delayed_work_sync(&pcr->idle_work);
mfd_remove_devices(&pcidev->dev);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 52/62] ACPI / TPM: fix memory leak when walking ACPI namespace
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (47 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 51/62] mfd: rtsx_pcr: Disable interrupts before cancelling delayed works Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 53/62] ACPI / Battery: Add a _BIX quirk for NEC LZ750/LS Greg Kroah-Hartman
` (11 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jiang Liu, Rafael J. Wysocki
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiang Liu <jiang.liu@linux.intel.com>
commit df45c712d1f4ef37714245fb75de726f4ca2bf8d upstream.
In function ppi_callback(), memory allocated by acpi_get_name() will get
leaked when current device isn't the desired TPM device, so fix the
memory leak.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/char/tpm/tpm_ppi.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
--- a/drivers/char/tpm/tpm_ppi.c
+++ b/drivers/char/tpm/tpm_ppi.c
@@ -27,15 +27,18 @@ static char *tpm_device_name = "TPM";
static acpi_status ppi_callback(acpi_handle handle, u32 level, void *context,
void **return_value)
{
- acpi_status status;
+ acpi_status status = AE_OK;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
- status = acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
- if (strstr(buffer.pointer, context) != NULL) {
- *return_value = handle;
+
+ if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer))) {
+ if (strstr(buffer.pointer, context) != NULL) {
+ *return_value = handle;
+ status = AE_CTRL_TERMINATE;
+ }
kfree(buffer.pointer);
- return AE_CTRL_TERMINATE;
}
- return AE_OK;
+
+ return status;
}
static inline void ppi_assign_params(union acpi_object params[4],
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 53/62] ACPI / Battery: Add a _BIX quirk for NEC LZ750/LS
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (48 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 52/62] ACPI / TPM: fix memory leak when walking ACPI namespace Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 54/62] mac80211: move "bufferable MMPDU" check to fix AP mode scan Greg Kroah-Hartman
` (10 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Lan Tianyu, Dmitry Torokhov,
Rafael J. Wysocki
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lan Tianyu <tianyu.lan@intel.com>
commit a90b40385735af0d3031f98e97b439e8944a31b3 upstream.
The AML method _BIX of NEC LZ750/LS returns a broken package which
skips the first member "Revision" (ACPI 5.0, Table 10-234).
Add a quirk for this machine to skip member "Revision" during parsing
the package returned by _BIX.
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=67351
Reported-and-tested-by: Francisco Castro <fcr@adinet.com.uy>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/acpi/battery.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -68,6 +68,7 @@ MODULE_AUTHOR("Alexey Starikovskiy <asta
MODULE_DESCRIPTION("ACPI Battery Driver");
MODULE_LICENSE("GPL");
+static int battery_bix_broken_package;
static unsigned int cache_time = 1000;
module_param(cache_time, uint, 0644);
MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
@@ -443,7 +444,12 @@ static int acpi_battery_get_info(struct
ACPI_EXCEPTION((AE_INFO, status, "Evaluating %s", name));
return -ENODEV;
}
- if (test_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags))
+
+ if (battery_bix_broken_package)
+ result = extract_package(battery, buffer.pointer,
+ extended_info_offsets + 1,
+ ARRAY_SIZE(extended_info_offsets) - 1);
+ else if (test_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags))
result = extract_package(battery, buffer.pointer,
extended_info_offsets,
ARRAY_SIZE(extended_info_offsets));
@@ -1064,6 +1070,17 @@ static int battery_notify(struct notifie
return 0;
}
+static struct dmi_system_id bat_dmi_table[] = {
+ {
+ .ident = "NEC LZ750/LS",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "NEC"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "PC-LZ750LS"),
+ },
+ },
+ {},
+};
+
static int acpi_battery_add(struct acpi_device *device)
{
int result = 0;
@@ -1174,6 +1191,8 @@ static void __init acpi_battery_init_asy
if (!acpi_battery_dir)
return;
#endif
+ if (dmi_check_system(bat_dmi_table))
+ battery_bix_broken_package = 1;
if (acpi_bus_register_driver(&acpi_battery_driver) < 0) {
#ifdef CONFIG_ACPI_PROCFS_POWER
acpi_unlock_battery_dir(acpi_battery_dir);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 54/62] mac80211: move "bufferable MMPDU" check to fix AP mode scan
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (49 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 53/62] ACPI / Battery: Add a _BIX quirk for NEC LZ750/LS Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 55/62] intel_pstate: Add X86_FEATURE_APERFMPERF to cpu match parameters Greg Kroah-Hartman
` (9 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Felix Fietkau, Johannes Berg
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Fietkau <nbd@openwrt.org>
commit 277d916fc2e959c3f106904116bb4f7b1148d47a upstream.
The check needs to apply to both multicast and unicast packets,
otherwise probe requests on AP mode scans are sent through the multicast
buffer queue, which adds long delays (often longer than the scanning
interval).
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/mac80211/tx.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -447,7 +447,6 @@ ieee80211_tx_h_unicast_ps_buf(struct iee
{
struct sta_info *sta = tx->sta;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
struct ieee80211_local *local = tx->local;
if (unlikely(!sta))
@@ -458,15 +457,6 @@ ieee80211_tx_h_unicast_ps_buf(struct iee
!(info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER))) {
int ac = skb_get_queue_mapping(tx->skb);
- /* only deauth, disassoc and action are bufferable MMPDUs */
- if (ieee80211_is_mgmt(hdr->frame_control) &&
- !ieee80211_is_deauth(hdr->frame_control) &&
- !ieee80211_is_disassoc(hdr->frame_control) &&
- !ieee80211_is_action(hdr->frame_control)) {
- info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
- return TX_CONTINUE;
- }
-
ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n",
sta->sta.addr, sta->sta.aid, ac);
if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER)
@@ -509,9 +499,22 @@ ieee80211_tx_h_unicast_ps_buf(struct iee
static ieee80211_tx_result debug_noinline
ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx)
{
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
+
if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED))
return TX_CONTINUE;
+ /* only deauth, disassoc and action are bufferable MMPDUs */
+ if (ieee80211_is_mgmt(hdr->frame_control) &&
+ !ieee80211_is_deauth(hdr->frame_control) &&
+ !ieee80211_is_disassoc(hdr->frame_control) &&
+ !ieee80211_is_action(hdr->frame_control)) {
+ if (tx->flags & IEEE80211_TX_UNICAST)
+ info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
+ return TX_CONTINUE;
+ }
+
if (tx->flags & IEEE80211_TX_UNICAST)
return ieee80211_tx_h_unicast_ps_buf(tx);
else
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 55/62] intel_pstate: Add X86_FEATURE_APERFMPERF to cpu match parameters.
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (50 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 54/62] mac80211: move "bufferable MMPDU" check to fix AP mode scan Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 56/62] SCSI: sd: Reduce buffer size for vpd request Greg Kroah-Hartman
` (8 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Dirk Brandewie, Rafael J. Wysocki
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dirk Brandewie <dirk.j.brandewie@intel.com>
commit 6cbd7ee10e2842a3d1f9b60abede1c8f3d1f1130 upstream.
KVM environments do not support APERF/MPERF MSRs. intel_pstate cannot
operate without these registers.
The previous validity checks in intel_pstate_msrs_not_valid() are
insufficent in nested KVMs.
References: https://bugzilla.redhat.com/show_bug.cgi?id=1046317
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/cpufreq/intel_pstate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -516,7 +516,8 @@ static void intel_pstate_timer_func(unsi
}
#define ICPU(model, policy) \
- { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long)&policy }
+ { X86_VENDOR_INTEL, 6, model, X86_FEATURE_APERFMPERF,\
+ (unsigned long)&policy }
static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
ICPU(0x2a, default_policy),
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 56/62] SCSI: sd: Reduce buffer size for vpd request
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (51 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 55/62] intel_pstate: Add X86_FEATURE_APERFMPERF to cpu match parameters Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 57/62] netfilter: nf_nat: fix access to uninitialized buffer in IRC NAT helper Greg Kroah-Hartman
` (7 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Nix, Bernd Schubert,
Martin K. Petersen, James Bottomley
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
commit af73623f5f10eb3832c87a169b28f7df040a875b upstream.
Somehow older areca firmware versions have issues with
scsi_get_vpd_page() and a large buffer, the firmware
seems to crash and the scsi error-handler will start endless
recovery retries.
Limiting the buf-size to 64-bytes fixes this issue with older
firmware versions (<1.49 for my controller).
Fixes a regression with areca controllers and older firmware versions
introduced by commit: 66c28f97120e8a621afd5aa7a31c4b85c547d33d
Reported-by: Nix <nix@esperi.org.uk>
Tested-by: Nix <nix@esperi.org.uk>
Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/sd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2634,13 +2634,16 @@ static void sd_read_write_same(struct sc
}
if (scsi_report_opcode(sdev, buffer, SD_BUF_SIZE, INQUIRY) < 0) {
+ /* too large values might cause issues with arcmsr */
+ int vpd_buf_len = 64;
+
sdev->no_report_opcodes = 1;
/* Disable WRITE SAME if REPORT SUPPORTED OPERATION
* CODES is unsupported and the device has an ATA
* Information VPD page (SAT).
*/
- if (!scsi_get_vpd_page(sdev, 0x89, buffer, SD_BUF_SIZE))
+ if (!scsi_get_vpd_page(sdev, 0x89, buffer, vpd_buf_len))
sdev->no_write_same = 1;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 57/62] netfilter: nf_nat: fix access to uninitialized buffer in IRC NAT helper
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (52 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 56/62] SCSI: sd: Reduce buffer size for vpd request Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 58/62] x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround Greg Kroah-Hartman
` (6 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Daniel Borkmann, Harald Welte,
Pablo Neira Ayuso
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <dborkman@redhat.com>
commit 2690d97ade05c5325cbf7c72b94b90d265659886 upstream.
Commit 5901b6be885e attempted to introduce IPv6 support into
IRC NAT helper. By doing so, the following code seemed to be removed
by accident:
ip = ntohl(exp->master->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3.ip);
sprintf(buffer, "%u %u", ip, port);
pr_debug("nf_nat_irc: inserting '%s' == %pI4, port %u\n", buffer, &ip, port);
This leads to the fact that buffer[] was left uninitialized and
contained some stack value. When we call nf_nat_mangle_tcp_packet(),
we call strlen(buffer) on excatly this uninitialized buffer. If we
are unlucky and the skb has enough tailroom, we overwrite resp. leak
contents with values that sit on our stack into the packet and send
that out to the receiver.
Since the rather informal DCC spec [1] does not seem to specify
IPv6 support right now, we log such occurences so that admins can
act accordingly, and drop the packet. I've looked into XChat source,
and IPv6 is not supported there: addresses are in u32 and print
via %u format string.
Therefore, restore old behaviour as in IPv4, use snprintf(). The
IRC helper does not support IPv6 by now. By this, we can safely use
strlen(buffer) in nf_nat_mangle_tcp_packet() and prevent a buffer
overflow. Also simplify some code as we now have ct variable anyway.
[1] http://www.irchelp.org/irchelp/rfc/ctcpspec.html
Fixes: 5901b6be885e ("netfilter: nf_nat: support IPv6 in IRC NAT helper")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/netfilter/nf_nat_irc.c | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
--- a/net/netfilter/nf_nat_irc.c
+++ b/net/netfilter/nf_nat_irc.c
@@ -34,10 +34,14 @@ static unsigned int help(struct sk_buff
struct nf_conntrack_expect *exp)
{
char buffer[sizeof("4294967296 65635")];
+ struct nf_conn *ct = exp->master;
+ union nf_inet_addr newaddr;
u_int16_t port;
unsigned int ret;
/* Reply comes from server. */
+ newaddr = ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3;
+
exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port;
exp->dir = IP_CT_DIR_REPLY;
exp->expectfn = nf_nat_follow_master;
@@ -57,17 +61,35 @@ static unsigned int help(struct sk_buff
}
if (port == 0) {
- nf_ct_helper_log(skb, exp->master, "all ports in use");
+ nf_ct_helper_log(skb, ct, "all ports in use");
return NF_DROP;
}
- ret = nf_nat_mangle_tcp_packet(skb, exp->master, ctinfo,
- protoff, matchoff, matchlen, buffer,
- strlen(buffer));
+ /* strlen("\1DCC CHAT chat AAAAAAAA P\1\n")=27
+ * strlen("\1DCC SCHAT chat AAAAAAAA P\1\n")=28
+ * strlen("\1DCC SEND F AAAAAAAA P S\1\n")=26
+ * strlen("\1DCC MOVE F AAAAAAAA P S\1\n")=26
+ * strlen("\1DCC TSEND F AAAAAAAA P S\1\n")=27
+ *
+ * AAAAAAAAA: bound addr (1.0.0.0==16777216, min 8 digits,
+ * 255.255.255.255==4294967296, 10 digits)
+ * P: bound port (min 1 d, max 5d (65635))
+ * F: filename (min 1 d )
+ * S: size (min 1 d )
+ * 0x01, \n: terminators
+ */
+ /* AAA = "us", ie. where server normally talks to. */
+ snprintf(buffer, sizeof(buffer), "%u %u", ntohl(newaddr.ip), port);
+ pr_debug("nf_nat_irc: inserting '%s' == %pI4, port %u\n",
+ buffer, &newaddr.ip, port);
+
+ ret = nf_nat_mangle_tcp_packet(skb, ct, ctinfo, protoff, matchoff,
+ matchlen, buffer, strlen(buffer));
if (ret != NF_ACCEPT) {
- nf_ct_helper_log(skb, exp->master, "cannot mangle packet");
+ nf_ct_helper_log(skb, ct, "cannot mangle packet");
nf_ct_unexpect_related(exp);
}
+
return ret;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 58/62] x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (53 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 57/62] netfilter: nf_nat: fix access to uninitialized buffer in IRC NAT helper Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 59/62] sched: Fix race on toggling cfs_bandwidth_used Greg Kroah-Hartman
` (5 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, halfdog, Borislav Petkov,
H. Peter Anvin
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 26bef1318adc1b3a530ecc807ef99346db2aa8b0 upstream.
Before we do an EMMS in the AMD FXSAVE information leak workaround we
need to clear any pending exceptions, otherwise we trap with a
floating-point exception inside this code.
Reported-by: halfdog <me@halfdog.net>
Tested-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/CA%2B55aFxQnY_PCG_n4=0w-VG=YLXL-yr7oMxyy0WU2gCBAf3ydg@mail.gmail.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/include/asm/fpu-internal.h | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
--- a/arch/x86/include/asm/fpu-internal.h
+++ b/arch/x86/include/asm/fpu-internal.h
@@ -295,12 +295,13 @@ static inline int restore_fpu_checking(s
/* AMD K7/K8 CPUs don't save/restore FDP/FIP/FOP unless an exception
is pending. Clear the x87 state here by setting it to fixed
values. "m" is a random variable that should be in L1 */
- alternative_input(
- ASM_NOP8 ASM_NOP2,
- "emms\n\t" /* clear stack tags */
- "fildl %P[addr]", /* set F?P to defined value */
- X86_FEATURE_FXSAVE_LEAK,
- [addr] "m" (tsk->thread.fpu.has_fpu));
+ if (unlikely(static_cpu_has(X86_FEATURE_FXSAVE_LEAK))) {
+ asm volatile(
+ "fnclex\n\t"
+ "emms\n\t"
+ "fildl %P[addr]" /* set F?P to defined value */
+ : : [addr] "m" (tsk->thread.fpu.has_fpu));
+ }
return fpu_restore_checking(&tsk->thread.fpu);
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 59/62] sched: Fix race on toggling cfs_bandwidth_used
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (54 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 58/62] x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 60/62] sched: Fix cfs_bandwidth misuse of hrtimer_expires_remaining Greg Kroah-Hartman
` (4 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Ben Segall, Peter Zijlstra, pjt,
Ingo Molnar, Chris J Arges
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Segall <bsegall@google.com>
commit 1ee14e6c8cddeeb8a490d7b54cd9016e4bb900b4 upstream.
When we transition cfs_bandwidth_used to false, any currently
throttled groups will incorrectly return false from cfs_rq_throttled.
While tg_set_cfs_bandwidth will unthrottle them eventually, currently
running code (including at least dequeue_task_fair and
distribute_cfs_runtime) will cause errors.
Fix this by turning off cfs_bandwidth_used only after unthrottling all
cfs_rqs.
Tested: toggle bandwidth back and forth on a loaded cgroup. Caused
crashes in minutes without the patch, hasn't crashed with it.
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/20131016181611.22647.80365.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/core.c | 9 ++++++++-
kernel/sched/fair.c | 16 +++++++++-------
kernel/sched/sched.h | 3 ++-
3 files changed, 19 insertions(+), 9 deletions(-)
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7812,7 +7812,12 @@ static int tg_set_cfs_bandwidth(struct t
runtime_enabled = quota != RUNTIME_INF;
runtime_was_enabled = cfs_b->quota != RUNTIME_INF;
- account_cfs_bandwidth_used(runtime_enabled, runtime_was_enabled);
+ /*
+ * If we need to toggle cfs_bandwidth_used, off->on must occur
+ * before making related changes, and on->off must occur afterwards
+ */
+ if (runtime_enabled && !runtime_was_enabled)
+ cfs_bandwidth_usage_inc();
raw_spin_lock_irq(&cfs_b->lock);
cfs_b->period = ns_to_ktime(period);
cfs_b->quota = quota;
@@ -7838,6 +7843,8 @@ static int tg_set_cfs_bandwidth(struct t
unthrottle_cfs_rq(cfs_rq);
raw_spin_unlock_irq(&rq->lock);
}
+ if (runtime_was_enabled && !runtime_enabled)
+ cfs_bandwidth_usage_dec();
out_unlock:
mutex_unlock(&cfs_constraints_mutex);
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2029,13 +2029,14 @@ static inline bool cfs_bandwidth_used(vo
return static_key_false(&__cfs_bandwidth_used);
}
-void account_cfs_bandwidth_used(int enabled, int was_enabled)
+void cfs_bandwidth_usage_inc(void)
{
- /* only need to count groups transitioning between enabled/!enabled */
- if (enabled && !was_enabled)
- static_key_slow_inc(&__cfs_bandwidth_used);
- else if (!enabled && was_enabled)
- static_key_slow_dec(&__cfs_bandwidth_used);
+ static_key_slow_inc(&__cfs_bandwidth_used);
+}
+
+void cfs_bandwidth_usage_dec(void)
+{
+ static_key_slow_dec(&__cfs_bandwidth_used);
}
#else /* HAVE_JUMP_LABEL */
static bool cfs_bandwidth_used(void)
@@ -2043,7 +2044,8 @@ static bool cfs_bandwidth_used(void)
return true;
}
-void account_cfs_bandwidth_used(int enabled, int was_enabled) {}
+void cfs_bandwidth_usage_inc(void) {}
+void cfs_bandwidth_usage_dec(void) {}
#endif /* HAVE_JUMP_LABEL */
/*
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1318,7 +1318,8 @@ extern void print_rt_stats(struct seq_fi
extern void init_cfs_rq(struct cfs_rq *cfs_rq);
extern void init_rt_rq(struct rt_rq *rt_rq, struct rq *rq);
-extern void account_cfs_bandwidth_used(int enabled, int was_enabled);
+extern void cfs_bandwidth_usage_inc(void);
+extern void cfs_bandwidth_usage_dec(void);
#ifdef CONFIG_NO_HZ_COMMON
enum rq_nohz_flag_bits {
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 60/62] sched: Fix cfs_bandwidth misuse of hrtimer_expires_remaining
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (55 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 59/62] sched: Fix race on toggling cfs_bandwidth_used Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 61/62] sched: Fix hrtimer_cancel()/rq->lock deadlock Greg Kroah-Hartman
` (3 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Ben Segall, Peter Zijlstra, pjt,
Ingo Molnar, Chris J Arges
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Segall <bsegall@google.com>
commit db06e78cc13d70f10877e0557becc88ab3ad2be8 upstream.
hrtimer_expires_remaining does not take internal hrtimer locks and thus
must be guarded against concurrent __hrtimer_start_range_ns (but
returning HRTIMER_RESTART is safe). Use cfs_b->lock to make it safe.
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/20131016181617.22647.73829.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/fair.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2470,7 +2470,13 @@ static const u64 min_bandwidth_expiratio
/* how long we wait to gather additional slack before distributing */
static const u64 cfs_bandwidth_slack_period = 5 * NSEC_PER_MSEC;
-/* are we near the end of the current quota period? */
+/*
+ * Are we near the end of the current quota period?
+ *
+ * Requires cfs_b->lock for hrtimer_expires_remaining to be safe against the
+ * hrtimer base being cleared by __hrtimer_start_range_ns. In the case of
+ * migrate_hrtimers, base is never cleared, so we are fine.
+ */
static int runtime_refresh_within(struct cfs_bandwidth *cfs_b, u64 min_expire)
{
struct hrtimer *refresh_timer = &cfs_b->period_timer;
@@ -2546,10 +2552,12 @@ static void do_sched_cfs_slack_timer(str
u64 expires;
/* confirm we're still not at a refresh boundary */
- if (runtime_refresh_within(cfs_b, min_bandwidth_expiration))
+ raw_spin_lock(&cfs_b->lock);
+ if (runtime_refresh_within(cfs_b, min_bandwidth_expiration)) {
+ raw_spin_unlock(&cfs_b->lock);
return;
+ }
- raw_spin_lock(&cfs_b->lock);
if (cfs_b->quota != RUNTIME_INF && cfs_b->runtime > slice) {
runtime = cfs_b->runtime;
cfs_b->runtime = 0;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 61/62] sched: Fix hrtimer_cancel()/rq->lock deadlock
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (56 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 60/62] sched: Fix cfs_bandwidth misuse of hrtimer_expires_remaining Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 62/62] sched: Guarantee new group-entities always have weight Greg Kroah-Hartman
` (2 subsequent siblings)
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Ben Segall, Peter Zijlstra, pjt,
Ingo Molnar, Chris J Arges
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Segall <bsegall@google.com>
commit 927b54fccbf04207ec92f669dce6806848cbec7d upstream.
__start_cfs_bandwidth calls hrtimer_cancel while holding rq->lock,
waiting for the hrtimer to finish. However, if sched_cfs_period_timer
runs for another loop iteration, the hrtimer can attempt to take
rq->lock, resulting in deadlock.
Fix this by ensuring that cfs_b->timer_active is cleared only if the
_latest_ call to do_sched_cfs_period_timer is returning as idle. Then
__start_cfs_bandwidth can just call hrtimer_try_to_cancel and wait for
that to succeed or timer_active == 1.
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/20131016181622.22647.16643.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/fair.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2410,6 +2410,13 @@ static int do_sched_cfs_period_timer(str
if (idle)
goto out_unlock;
+ /*
+ * if we have relooped after returning idle once, we need to update our
+ * status as actually running, so that other cpus doing
+ * __start_cfs_bandwidth will stop trying to cancel us.
+ */
+ cfs_b->timer_active = 1;
+
__refill_cfs_bandwidth_runtime(cfs_b);
if (!throttled) {
@@ -2682,11 +2689,11 @@ void __start_cfs_bandwidth(struct cfs_ba
* (timer_active==0 becomes visible before the hrtimer call-back
* terminates). In either case we ensure that it's re-programmed
*/
- while (unlikely(hrtimer_active(&cfs_b->period_timer))) {
+ while (unlikely(hrtimer_active(&cfs_b->period_timer)) &&
+ hrtimer_try_to_cancel(&cfs_b->period_timer) < 0) {
+ /* bounce the lock to allow do_sched_cfs_period_timer to run */
raw_spin_unlock(&cfs_b->lock);
- /* ensure cfs_b->lock is available while we wait */
- hrtimer_cancel(&cfs_b->period_timer);
-
+ cpu_relax();
raw_spin_lock(&cfs_b->lock);
/* if someone else restarted the timer then we're done */
if (cfs_b->timer_active)
^ permalink raw reply [flat|nested] 64+ messages in thread
* [PATCH 3.10 62/62] sched: Guarantee new group-entities always have weight
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (57 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 61/62] sched: Fix hrtimer_cancel()/rq->lock deadlock Greg Kroah-Hartman
@ 2014-01-14 0:27 ` Greg Kroah-Hartman
2014-01-14 3:02 ` [PATCH 3.10 00/62] 3.10.27-stable review Guenter Roeck
2014-01-14 19:30 ` Shuah Khan
60 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 0:27 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Paul Turner, Peter Zijlstra,
Ingo Molnar, Chris J Arges
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Turner <pjt@google.com>
commit 0ac9b1c21874d2490331233b3242085f8151e166 upstream.
Currently, group entity load-weights are initialized to zero. This
admits some races with respect to the first time they are re-weighted in
earlty use. ( Let g[x] denote the se for "g" on cpu "x". )
Suppose that we have root->a and that a enters a throttled state,
immediately followed by a[0]->t1 (the only task running on cpu[0])
blocking:
put_prev_task(group_cfs_rq(a[0]), t1)
put_prev_entity(..., t1)
check_cfs_rq_runtime(group_cfs_rq(a[0]))
throttle_cfs_rq(group_cfs_rq(a[0]))
Then, before unthrottling occurs, let a[0]->b[0]->t2 wake for the first
time:
enqueue_task_fair(rq[0], t2)
enqueue_entity(group_cfs_rq(b[0]), t2)
enqueue_entity_load_avg(group_cfs_rq(b[0]), t2)
account_entity_enqueue(group_cfs_ra(b[0]), t2)
update_cfs_shares(group_cfs_rq(b[0]))
< skipped because b is part of a throttled hierarchy >
enqueue_entity(group_cfs_rq(a[0]), b[0])
...
We now have b[0] enqueued, yet group_cfs_rq(a[0])->load.weight == 0
which violates invariants in several code-paths. Eliminate the
possibility of this by initializing group entity weight.
Signed-off-by: Paul Turner <pjt@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20131016181627.22647.47543.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/fair.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6091,7 +6091,8 @@ void init_tg_cfs_entry(struct task_group
se->cfs_rq = parent->my_q;
se->my_q = cfs_rq;
- update_load_set(&se->load, 0);
+ /* guarantee group entities always have weight */
+ update_load_set(&se->load, NICE_0_LOAD);
se->parent = parent;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [PATCH 3.10 00/62] 3.10.27-stable review
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (58 preceding siblings ...)
2014-01-14 0:27 ` [PATCH 3.10 62/62] sched: Guarantee new group-entities always have weight Greg Kroah-Hartman
@ 2014-01-14 3:02 ` Guenter Roeck
2014-01-14 23:12 ` Greg Kroah-Hartman
2014-01-14 19:30 ` Shuah Khan
60 siblings, 1 reply; 64+ messages in thread
From: Guenter Roeck @ 2014-01-14 3:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel; +Cc: torvalds, akpm, stable
On 01/13/2014 04:26 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.27 release.
> There are 62 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu Jan 16 00:26:56 UTC 2014.
> Anything received after that time might be too late.
>
New build failures:
m68k:allmodconfig
sparc64:allmodconfig
drivers/net/virtio_net.c: In function 'receive_mergeable':
drivers/net/virtio_net.c:330:29: warning: dereferencing 'void *' pointer [enabled by default]
drivers/net/virtio_net.c:330:29: error: request for member 'virtual' in something not a structure or union
Caused by "virtio_net: fix error handling for mergeable buffers".
qemu tests failed for sparc64 for the same reason.
Guenter
^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [PATCH 3.10 00/62] 3.10.27-stable review
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
` (59 preceding siblings ...)
2014-01-14 3:02 ` [PATCH 3.10 00/62] 3.10.27-stable review Guenter Roeck
@ 2014-01-14 19:30 ` Shuah Khan
2014-01-14 23:12 ` Greg Kroah-Hartman
60 siblings, 1 reply; 64+ messages in thread
From: Shuah Khan @ 2014-01-14 19:30 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel
Cc: torvalds, akpm, stable, Shuah Khan, shuahkhan@gmail.com
On 01/13/2014 05:26 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.27 release.
> There are 62 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu Jan 16 00:26:56 UTC 2014.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.10.27-rc1.gz
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
Patch testing - passed
Compile testing - passed
Boot testing - passed
dmesg regression testing - passed
Test systems
Samsung Series 9 900X4C Intel Corei5 (3.4 and later)
HP ProBook 6475b AMD A10-4600M APU with Radeon(tm) HD Graphics
Dell OptiPlex 790 Intel(R) Core(TM) i5-2400
Detailed test status
Patches applied cleanly
dmesgs look good. No regressions compared to the previous dmesgs for
this release. dmesg emerg, crit, alert, err are clean. No regressions in
warn.
-- Shuah
--
Shuah Khan
Senior Linux Kernel Developer - Open Source Group
Samsung Research America(Silicon Valley)
shuah.kh@samsung.com | (970) 672-0658
^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [PATCH 3.10 00/62] 3.10.27-stable review
2014-01-14 3:02 ` [PATCH 3.10 00/62] 3.10.27-stable review Guenter Roeck
@ 2014-01-14 23:12 ` Greg Kroah-Hartman
0 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 23:12 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-kernel, torvalds, akpm, stable
On Mon, Jan 13, 2014 at 07:02:23PM -0800, Guenter Roeck wrote:
> On 01/13/2014 04:26 PM, Greg Kroah-Hartman wrote:
> >This is the start of the stable review cycle for the 3.10.27 release.
> >There are 62 patches in this series, all will be posted as a response
> >to this one. If anyone has any issues with these being applied, please
> >let me know.
> >
> >Responses should be made by Thu Jan 16 00:26:56 UTC 2014.
> >Anything received after that time might be too late.
> >
>
> New build failures:
> m68k:allmodconfig
> sparc64:allmodconfig
>
> drivers/net/virtio_net.c: In function 'receive_mergeable':
> drivers/net/virtio_net.c:330:29: warning: dereferencing 'void *' pointer [enabled by default]
> drivers/net/virtio_net.c:330:29: error: request for member 'virtual' in something not a structure or union
>
> Caused by "virtio_net: fix error handling for mergeable buffers".
Hopefully we now have a fix for this one.
thanks for testing and finding this.
greg k-h
^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [PATCH 3.10 00/62] 3.10.27-stable review
2014-01-14 19:30 ` Shuah Khan
@ 2014-01-14 23:12 ` Greg Kroah-Hartman
0 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2014-01-14 23:12 UTC (permalink / raw)
To: Shuah Khan; +Cc: linux-kernel, torvalds, akpm, stable, shuahkhan@gmail.com
On Tue, Jan 14, 2014 at 12:30:35PM -0700, Shuah Khan wrote:
> On 01/13/2014 05:26 PM, Greg Kroah-Hartman wrote:
> >This is the start of the stable review cycle for the 3.10.27 release.
> >There are 62 patches in this series, all will be posted as a response
> >to this one. If anyone has any issues with these being applied, please
> >let me know.
> >
> >Responses should be made by Thu Jan 16 00:26:56 UTC 2014.
> >Anything received after that time might be too late.
> >
> >The whole patch series can be found in one patch at:
> > kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.10.27-rc1.gz
> >and the diffstat can be found below.
> >
> >thanks,
> >
> >greg k-h
> >
>
> Patch testing - passed
> Compile testing - passed
> Boot testing - passed
> dmesg regression testing - passed
>
> Test systems
>
> Samsung Series 9 900X4C Intel Corei5 (3.4 and later)
> HP ProBook 6475b AMD A10-4600M APU with Radeon(tm) HD Graphics
> Dell OptiPlex 790 Intel(R) Core(TM) i5-2400
>
> Detailed test status
>
> Patches applied cleanly
>
> dmesgs look good. No regressions compared to the previous dmesgs for this
> release. dmesg emerg, crit, alert, err are clean. No regressions in warn.
Thanks for testing all 3 of these and letting me know.
greg k-h
^ permalink raw reply [flat|nested] 64+ messages in thread
end of thread, other threads:[~2014-01-14 23:12 UTC | newest]
Thread overview: 64+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14 0:26 [PATCH 3.10 00/62] 3.10.27-stable review Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 01/62] irqchip: renesas-irqc: Fix irqc_probe error handling Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 02/62] clocksource: em_sti: Set cpu_possible_mask to fix SMP broadcast Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 03/62] gpio-rcar: R-Car GPIO IRQ share interrupt Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 04/62] HID: Revert "Revert "HID: Fix logitech-dj: missing Unifying device issue"" Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 05/62] IPv6: Fixed support for blackhole and prohibit routes Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 06/62] net: do not pretend FRAGLIST support Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 07/62] rds: prevent BUG_ON triggered on congestion update to loopback Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 08/62] macvtap: Do not double-count received packets Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 09/62] macvtap: update file current position Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 10/62] tun: " Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 11/62] macvtap: signal truncated packets Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 12/62] virtio: delete napi structures from netdev before releasing memory Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 13/62] packet: fix send path when running with proto == 0 Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 14/62] ipv6: dont count addrconf generated routes against gc limit Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 15/62] net: drop_monitor: fix the value of maxattr Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 16/62] net: unix: allow set_peek_off to fail Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 17/62] tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0 Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 18/62] netvsc: dont flush peers notifying work during setting mtu Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 19/62] ipv6: fix illegal mac_header comparison on 32bit Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 20/62] net: unix: allow bind to fail on mutex lock Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 22/62] net: inet_diag: zero out uninitialized idiag_{src,dst} fields Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 23/62] drivers/net/hamradio: Integer overflow in hdlcdrv_ioctl() Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 25/62] net: fec: fix potential use after free Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 26/62] ipv6: always set the new created dsts from in ip6_rt_copy Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 27/62] rds: prevent dereference of a NULL device Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 28/62] net: rose: restore old recvmsg behavior Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 29/62] vlan: Fix header ops passthru when doing TX VLAN offload Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 30/62] virtio_net: fix error handling for mergeable buffers Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 31/62] virtio-net: make all RX paths handle errors consistently Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 32/62] virtio_net: dont leak memory or block when too many frags Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 33/62] virtio-net: fix refill races during restore Greg Kroah-Hartman
2014-01-14 0:26 ` [PATCH 3.10 34/62] net: llc: fix use after free in llc_ui_recvmsg Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 35/62] netpoll: Fix missing TXQ unlock and and OOPS Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 36/62] bridge: use spin_lock_bh() in br_multicast_set_hash_max Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 37/62] net: Loosen constraints for recalculating checksum in skb_segment() Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 38/62] ARM: fix footbridge clockevent device Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 39/62] ARM: fix "bad mode in ... handler" message for undefined instructions Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 40/62] ARM: dts: exynos5250: Fix MDMA0 clock number Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 41/62] ARM: shmobile: kzm9g: Fix coherent DMA mask Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 42/62] ARM: shmobile: armadillo: " Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 43/62] ARM: shmobile: mackerel: " Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 45/62] parisc: Ensure full cache coherency for kmap/kunmap Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 46/62] ahci: add PCI ID for Marvell 88SE9170 SATA controller Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 47/62] clk: clk-divider: fix divisor > 255 bug Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 48/62] clk: samsung: exynos4: Correct SRC_MFC register Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 49/62] clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg clock Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 50/62] clk: exynos5250: fix sysmmu_mfc{l,r} gate clocks Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 51/62] mfd: rtsx_pcr: Disable interrupts before cancelling delayed works Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 52/62] ACPI / TPM: fix memory leak when walking ACPI namespace Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 53/62] ACPI / Battery: Add a _BIX quirk for NEC LZ750/LS Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 54/62] mac80211: move "bufferable MMPDU" check to fix AP mode scan Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 55/62] intel_pstate: Add X86_FEATURE_APERFMPERF to cpu match parameters Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 56/62] SCSI: sd: Reduce buffer size for vpd request Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 57/62] netfilter: nf_nat: fix access to uninitialized buffer in IRC NAT helper Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 58/62] x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 59/62] sched: Fix race on toggling cfs_bandwidth_used Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 60/62] sched: Fix cfs_bandwidth misuse of hrtimer_expires_remaining Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 61/62] sched: Fix hrtimer_cancel()/rq->lock deadlock Greg Kroah-Hartman
2014-01-14 0:27 ` [PATCH 3.10 62/62] sched: Guarantee new group-entities always have weight Greg Kroah-Hartman
2014-01-14 3:02 ` [PATCH 3.10 00/62] 3.10.27-stable review Guenter Roeck
2014-01-14 23:12 ` Greg Kroah-Hartman
2014-01-14 19:30 ` Shuah Khan
2014-01-14 23:12 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).