All of lore.kernel.org
 help / color / mirror / Atom feed
* [ 00/17] 3.0.98-stable review
@ 2013-09-29 19:26 Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 01/17] Revert "sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()" Greg Kroah-Hartman
                   ` (18 more replies)
  0 siblings, 19 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19: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.0.98 release.
There are 17 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 Tue Oct  1 19:07:47 UTC 2013.
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.0.98-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.0.98-rc1

Daniel Santos <daniel.santos@pobox.com>
    kernel-doc: bugfix - multi-line macros

Ben Hutchings <bhutchings@solarflare.com>
    sfc: Fix efx_rx_buf_offset() for recycled pages

Andi Kleen <ak@linux.intel.com>
    perf tools: Handle JITed code in shared memory

Lino Sanfilippo <LinoSanfilippo@gmx.de>
    fanotify: dont merge permission events

Peter Zijlstra <a.p.zijlstra@chello.nl>
    perf: Fix perf_cgroup_switch for sw-events

Peter Zijlstra <a.p.zijlstra@chello.nl>
    perf: Clarify perf_cpu_context::active_pmu usage by renaming it to ::unique_pmu

Li Zefan <lizefan@huawei.com>
    cgroup: fail if monitored file and event_control are in different cgroup

Sasha Levin <levinsasha928@gmail.com>
    SCSI: iscsi: don't hang in endless loop if no targets present

Alex Deucher <alexander.deucher@amd.com>
    drm/radeon: fix handling of variable sized arrays for router objects

Alex Deucher <alexander.deucher@amd.com>
    drm/radeon: fix resume on some rs4xx boards (v2)

Alex Deucher <alexander.deucher@amd.com>
    drm/radeon: update line buffer allocation for dce4.1/5

Alex Deucher <alexander.deucher@amd.com>
    drm/radeon: fix LCD record parsing

Kees Cook <keescook@chromium.org>
    HID: zeroplus: validate output report details

Kees Cook <keescook@chromium.org>
    HID: provide a helper for validating hid reports

Stanislaw Gruszka <sgruszka@redhat.com>
    rt2800: fix wrong TX power compensation

Fabio Porcedda <fabio.porcedda@gmail.com>
    net: usb: cdc_ether: Use wwan interface for Telit modules

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Revert "sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()"


-------------

Diffstat:

 Makefile                                 |  4 +--
 drivers/gpu/drm/radeon/evergreen.c       | 25 +++++++++++---
 drivers/gpu/drm/radeon/evergreend.h      |  4 +++
 drivers/gpu/drm/radeon/radeon_atombios.c | 13 ++++---
 drivers/gpu/drm/radeon/rs400.c           |  9 +++--
 drivers/hid/hid-core.c                   | 58 ++++++++++++++++++++++++++++++++
 drivers/hid/hid-zpff.c                   | 18 +++-------
 drivers/net/sfc/rx.c                     |  3 +-
 drivers/net/usb/cdc_ether.c              |  5 +++
 drivers/net/wireless/rt2x00/rt2800lib.c  |  7 ++++
 drivers/scsi/scsi_transport_iscsi.c      |  2 +-
 fs/notify/fanotify/fanotify.c            |  6 ++++
 include/linux/hid.h                      |  4 +++
 include/linux/perf_event.h               |  2 +-
 kernel/cgroup.c                          | 11 ++++++
 kernel/events/core.c                     | 21 +++++++-----
 net/sctp/sm_sideeffect.c                 |  3 +-
 scripts/kernel-doc                       |  3 ++
 tools/perf/util/map.c                    |  1 +
 19 files changed, 159 insertions(+), 40 deletions(-)



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 01/17] Revert "sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()"
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 02/17] net: usb: cdc_ether: Use wwan interface for Telit modules Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Michal Kubecek, Zijie Pan,
	Nicolas Dichtel, Vlad Yasevich, David S. Miller

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

This reverts commit b23270416da409bd4e637a5acbe31a1126235fb6 which is
commit f6e80abeab928b7c47cc1fbf53df13b4398a2bec.

Michal writes:
	Mainline commit f6e80abe was introduced in v3.7-rc2 as a
	follow-up fix to commit

	  edfee033  sctp: check src addr when processing SACK to update transport state

	(from v3.7-rc1) which changed the interpretation of third
	argument to sctp_cmd_process_sack() and sctp_outq_sack(). But as
	commit edfee033 has never been backported to stable branches,
	backport of commit f6e80abe actually breaks the code rather than
	fixing it.

Reported-by: Michal Kubecek <mkubecek@suse.cz>
Cc: Zijie Pan <zijie.pan@6wind.com>
Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: Vlad Yasevich <vyasevich@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/sctp/sm_sideeffect.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -1604,9 +1604,8 @@ static int sctp_cmd_interpreter(sctp_eve
 					asoc->outqueue.outstanding_bytes;
 			sackh.num_gap_ack_blocks = 0;
 			sackh.num_dup_tsns = 0;
-			chunk->subh.sack_hdr = &sackh;
 			sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK,
-					SCTP_CHUNK(chunk));
+					SCTP_SACKH(&sackh));
 			break;
 
 		case SCTP_CMD_DISCARD_PACKET:



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 02/17] net: usb: cdc_ether: Use wwan interface for Telit modules
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 01/17] Revert "sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()" Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 03/17] rt2800: fix wrong TX power compensation Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Fabio Porcedda, Oliver Neukum,
	David S. Miller

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Fabio Porcedda <fabio.porcedda@gmail.com>

commit 0092820407901a0b2c4e343e85f96bb7abfcded1 upstream.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/usb/cdc_ether.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -615,6 +615,11 @@ static const struct usb_device_id	produc
 	.bInterfaceProtocol	= USB_CDC_PROTO_NONE,
 	.driver_info = (unsigned long)&wwan_info,
 }, {
+	/* Telit modules */
+	USB_VENDOR_AND_INTERFACE_INFO(0x1bc7, USB_CLASS_COMM,
+			USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
+	.driver_info = (kernel_ulong_t) &wwan_info,
+}, {
 	USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET,
 			USB_CDC_PROTO_NONE),
 	.driver_info = (unsigned long) &cdc_info,



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 03/17] rt2800: fix wrong TX power compensation
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 01/17] Revert "sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()" Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 02/17] net: usb: cdc_ether: Use wwan interface for Telit modules Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 04/17] HID: provide a helper for validating hid reports Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stanislaw Gruszka, John W. Linville

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Stanislaw Gruszka <sgruszka@redhat.com>

commit 6e956da2027c767859128b9bfef085cf2a8e233b upstream.

We should not do temperature compensation on devices without
EXTERNAL_TX_ALC bit set (called DynamicTxAgcControl on vendor driver).
Such devices can have totally bogus TSSI parameters on the EEPROM,
but still threaded by us as valid and result doing wrong TX power
calculations.

This fix inability to connect to AP on slightly longer distance on
some Ralink chips/devices.

Reported-and-tested-by: Fabien ADAM <id2ndr@crocobox.org>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rt2x00/rt2800lib.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1861,6 +1861,13 @@ static int rt2800_get_gain_calibration_d
 	int i;
 
 	/*
+	 * First check if temperature compensation is supported.
+	 */
+	rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom);
+	if (!rt2x00_get_field16(eeprom, EEPROM_NIC_CONF1_EXTERNAL_TX_ALC))
+		return 0;
+
+	/*
 	 * Read TSSI boundaries for temperature compensation from
 	 * the EEPROM.
 	 *



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 04/17] HID: provide a helper for validating hid reports
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2013-09-29 19:26 ` [ 03/17] rt2800: fix wrong TX power compensation Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 05/17] HID: zeroplus: validate output report details Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kees Cook, Benjamin Tissoires, Jiri Kosina

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kees Cook <keescook@chromium.org>

commit 331415ff16a12147d57d5c953f3a961b7ede348b upstream.

Many drivers need to validate the characteristics of their HID report
during initialization to avoid misusing the reports. This adds a common
helper to perform validation of the report exisitng, the field existing,
and the expected number of values within the field.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hid/hid-core.c |   58 +++++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/hid.h    |    4 +++
 2 files changed, 62 insertions(+)

--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -815,6 +815,64 @@ static int search(__s32 *array, __s32 va
 	return -1;
 }
 
+static const char * const hid_report_names[] = {
+	"HID_INPUT_REPORT",
+	"HID_OUTPUT_REPORT",
+	"HID_FEATURE_REPORT",
+};
+/**
+ * hid_validate_values - validate existing device report's value indexes
+ *
+ * @device: hid device
+ * @type: which report type to examine
+ * @id: which report ID to examine (0 for first)
+ * @field_index: which report field to examine
+ * @report_counts: expected number of values
+ *
+ * Validate the number of values in a given field of a given report, after
+ * parsing.
+ */
+struct hid_report *hid_validate_values(struct hid_device *hid,
+				       unsigned int type, unsigned int id,
+				       unsigned int field_index,
+				       unsigned int report_counts)
+{
+	struct hid_report *report;
+
+	if (type > HID_FEATURE_REPORT) {
+		hid_err(hid, "invalid HID report type %u\n", type);
+		return NULL;
+	}
+
+	if (id >= HID_MAX_IDS) {
+		hid_err(hid, "invalid HID report id %u\n", id);
+		return NULL;
+	}
+
+	/*
+	 * Explicitly not using hid_get_report() here since it depends on
+	 * ->numbered being checked, which may not always be the case when
+	 * drivers go to access report values.
+	 */
+	report = hid->report_enum[type].report_id_hash[id];
+	if (!report) {
+		hid_err(hid, "missing %s %u\n", hid_report_names[type], id);
+		return NULL;
+	}
+	if (report->maxfield <= field_index) {
+		hid_err(hid, "not enough fields in %s %u\n",
+			hid_report_names[type], id);
+		return NULL;
+	}
+	if (report->field[field_index]->report_count < report_counts) {
+		hid_err(hid, "not enough values in %s %u field %u\n",
+			hid_report_names[type], id, field_index);
+		return NULL;
+	}
+	return report;
+}
+EXPORT_SYMBOL_GPL(hid_validate_values);
+
 /**
  * hid_match_report - check if driver's raw_event should be called
  *
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -713,6 +713,10 @@ void hid_output_report(struct hid_report
 struct hid_device *hid_allocate_device(void);
 struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id);
 int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size);
+struct hid_report *hid_validate_values(struct hid_device *hid,
+				       unsigned int type, unsigned int id,
+				       unsigned int field_index,
+				       unsigned int report_counts);
 int hid_check_keys_pressed(struct hid_device *hid);
 int hid_connect(struct hid_device *hid, unsigned int connect_mask);
 void hid_disconnect(struct hid_device *hid);



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 05/17] HID: zeroplus: validate output report details
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2013-09-29 19:26 ` [ 04/17] HID: provide a helper for validating hid reports Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 06/17] drm/radeon: fix LCD record parsing Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kees Cook, Benjamin Tissoires, Jiri Kosina

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kees Cook <keescook@chromium.org>

commit 78214e81a1bf43740ce89bb5efda78eac2f8ef83 upstream.

The zeroplus HID driver was not checking the size of allocated values
in fields it used. A HID device could send a malicious output report
that would cause the driver to write beyond the output report allocation
during initialization, causing a heap overflow:

[ 1442.728680] usb 1-1: New USB device found, idVendor=0c12, idProduct=0005
...
[ 1466.243173] BUG kmalloc-192 (Tainted: G        W   ): Redzone overwritten

CVE-2013-2889

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hid/hid-zpff.c |   18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

--- a/drivers/hid/hid-zpff.c
+++ b/drivers/hid/hid-zpff.c
@@ -69,21 +69,13 @@ static int zpff_init(struct hid_device *
 	struct hid_report *report;
 	struct hid_input *hidinput = list_entry(hid->inputs.next,
 						struct hid_input, list);
-	struct list_head *report_list =
-			&hid->report_enum[HID_OUTPUT_REPORT].report_list;
 	struct input_dev *dev = hidinput->input;
-	int error;
+	int i, error;
 
-	if (list_empty(report_list)) {
-		hid_err(hid, "no output report found\n");
-		return -ENODEV;
-	}
-
-	report = list_entry(report_list->next, struct hid_report, list);
-
-	if (report->maxfield < 4) {
-		hid_err(hid, "not enough fields in report\n");
-		return -ENODEV;
+	for (i = 0; i < 4; i++) {
+		report = hid_validate_values(hid, HID_OUTPUT_REPORT, 0, i, 1);
+		if (!report)
+			return -ENODEV;
 	}
 
 	zpff = kzalloc(sizeof(struct zpff_device), GFP_KERNEL);



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 06/17] drm/radeon: fix LCD record parsing
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2013-09-29 19:26 ` [ 05/17] HID: zeroplus: validate output report details Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 07/17] drm/radeon: update line buffer allocation for dce4.1/5 Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alex Deucher <alexander.deucher@amd.com>

commit 95663948ba22a4be8b99acd67fbf83e86ddffba4 upstream.

If the LCD table contains an EDID record, properly account
for the edid size when walking through the records.

This should fix error messages about unknown LCD records.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/radeon/radeon_atombios.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -1658,7 +1658,9 @@ struct radeon_encoder_atom_dig *radeon_a
 								kfree(edid);
 						}
 					}
-					record += sizeof(ATOM_FAKE_EDID_PATCH_RECORD);
+					record += fake_edid_record->ucFakeEDIDLength ?
+						fake_edid_record->ucFakeEDIDLength + 2 :
+						sizeof(ATOM_FAKE_EDID_PATCH_RECORD);
 					break;
 				case LCD_PANEL_RESOLUTION_RECORD_TYPE:
 					panel_res_record = (ATOM_PANEL_RESOLUTION_PATCH_RECORD *)record;



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 07/17] drm/radeon: update line buffer allocation for dce4.1/5
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2013-09-29 19:26 ` [ 06/17] drm/radeon: fix LCD record parsing Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 08/17] drm/radeon: fix resume on some rs4xx boards (v2) Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alex Deucher <alexander.deucher@amd.com>

commit 0b31e02363b0db4e7931561bc6c141436e729d9f upstream.

We need to allocate line buffer to each display when
setting up the watermarks.  Failure to do so can lead
to a blank screen.  This fixes blank screen problems
on dce4.1/5 asics.

Based on an initial fix from:
Jay Cornwall <jay.cornwall@amd.com>

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/radeon/evergreen.c  |   25 +++++++++++++++++++++----
 drivers/gpu/drm/radeon/evergreend.h |    4 ++++
 2 files changed, 25 insertions(+), 4 deletions(-)

--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -419,7 +419,8 @@ static u32 evergreen_line_buffer_adjust(
 					struct drm_display_mode *mode,
 					struct drm_display_mode *other_mode)
 {
-	u32 tmp;
+	u32 tmp, buffer_alloc, i;
+	u32 pipe_offset = radeon_crtc->crtc_id * 0x20;
 	/*
 	 * Line Buffer Setup
 	 * There are 3 line buffers, each one shared by 2 display controllers.
@@ -442,18 +443,34 @@ static u32 evergreen_line_buffer_adjust(
 	 * non-linked crtcs for maximum line buffer allocation.
 	 */
 	if (radeon_crtc->base.enabled && mode) {
-		if (other_mode)
+		if (other_mode) {
 			tmp = 0; /* 1/2 */
-		else
+			buffer_alloc = 1;
+		} else {
 			tmp = 2; /* whole */
-	} else
+			buffer_alloc = 2;
+		}
+	} else {
 		tmp = 0;
+		buffer_alloc = 0;
+	}
 
 	/* second controller of the pair uses second half of the lb */
 	if (radeon_crtc->crtc_id % 2)
 		tmp += 4;
 	WREG32(DC_LB_MEMORY_SPLIT + radeon_crtc->crtc_offset, tmp);
 
+	if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) {
+		WREG32(PIPE0_DMIF_BUFFER_CONTROL + pipe_offset,
+		       DMIF_BUFFERS_ALLOCATED(buffer_alloc));
+		for (i = 0; i < rdev->usec_timeout; i++) {
+			if (RREG32(PIPE0_DMIF_BUFFER_CONTROL + pipe_offset) &
+			    DMIF_BUFFERS_ALLOCATED_COMPLETED)
+				break;
+			udelay(1);
+		}
+	}
+
 	if (radeon_crtc->base.enabled && mode) {
 		switch (tmp) {
 		case 0:
--- a/drivers/gpu/drm/radeon/evergreend.h
+++ b/drivers/gpu/drm/radeon/evergreend.h
@@ -450,6 +450,10 @@
 #       define LATENCY_LOW_WATERMARK(x)                   ((x) << 0)
 #       define LATENCY_HIGH_WATERMARK(x)                  ((x) << 16)
 
+#define	PIPE0_DMIF_BUFFER_CONTROL			  0x0ca0
+#       define DMIF_BUFFERS_ALLOCATED(x)                  ((x) << 0)
+#       define DMIF_BUFFERS_ALLOCATED_COMPLETED           (1 << 4)
+
 #define IH_RB_CNTL                                        0x3e00
 #       define IH_RB_ENABLE                               (1 << 0)
 #       define IH_IB_SIZE(x)                              ((x) << 1) /* log2 */



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 08/17] drm/radeon: fix resume on some rs4xx boards (v2)
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2013-09-29 19:26 ` [ 07/17] drm/radeon: update line buffer allocation for dce4.1/5 Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 09/17] drm/radeon: fix handling of variable sized arrays for router objects Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ondrej Zary, Daniel Tobias, Alex Deucher

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alex Deucher <alexander.deucher@amd.com>

commit acf88deb8ddbb73acd1c3fa32fde51af9153227f upstream.

Setting MC_MISC_CNTL.GART_INDEX_REG_EN causes hangs on
some boards on resume.  The systems seem to work fine
without touching this bit so leave it as is.

v2: read-modify-write the GART_INDEX_REG_EN bit.
I suspect the problem is that we are losing the other
settings in the register.

fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=52952

Reported-by: Ondrej Zary <linux@rainbow-software.org>
Tested-by: Daniel Tobias <dan.g.tob@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/radeon/rs400.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/drivers/gpu/drm/radeon/rs400.c
+++ b/drivers/gpu/drm/radeon/rs400.c
@@ -174,10 +174,13 @@ int rs400_gart_enable(struct radeon_devi
 	/* FIXME: according to doc we should set HIDE_MMCFG_BAR=0,
 	 * AGPMODE30=0 & AGP30ENHANCED=0 in NB_CNTL */
 	if ((rdev->family == CHIP_RS690) || (rdev->family == CHIP_RS740)) {
-		WREG32_MC(RS480_MC_MISC_CNTL,
-			  (RS480_GART_INDEX_REG_EN | RS690_BLOCK_GFX_D3_EN));
+		tmp = RREG32_MC(RS480_MC_MISC_CNTL);
+		tmp |= RS480_GART_INDEX_REG_EN | RS690_BLOCK_GFX_D3_EN;
+		WREG32_MC(RS480_MC_MISC_CNTL, tmp);
 	} else {
-		WREG32_MC(RS480_MC_MISC_CNTL, RS480_GART_INDEX_REG_EN);
+		tmp = RREG32_MC(RS480_MC_MISC_CNTL);
+		tmp |= RS480_GART_INDEX_REG_EN;
+		WREG32_MC(RS480_MC_MISC_CNTL, tmp);
 	}
 	/* Enable gart */
 	WREG32_MC(RS480_AGP_ADDRESS_SPACE_SIZE, (RS480_GART_EN | size_reg));



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 09/17] drm/radeon: fix handling of variable sized arrays for router objects
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2013-09-29 19:26 ` [ 08/17] drm/radeon: fix resume on some rs4xx boards (v2) Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 10/17] SCSI: iscsi: dont hang in endless loop if no targets present Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alex Deucher <alexander.deucher@amd.com>

commit fb93df1c2d8b3b1fb16d6ee9e32554e0c038815d upstream.

The table has the following format:

typedef struct _ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT         //usSrcDstTableOffset pointing to this structure
{
  UCHAR               ucNumberOfSrc;
  USHORT              usSrcObjectID[1];
  UCHAR               ucNumberOfDst;
  USHORT              usDstObjectID[1];
}ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT;

usSrcObjectID[] and usDstObjectID[] are variably sized, so we
can't access them directly.  Use pointers and update the offset
appropriately when accessing the Dst members.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/radeon/radeon_atombios.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -751,13 +751,16 @@ bool radeon_get_atom_connector_info_from
 								(ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT *)
 								(ctx->bios + data_offset +
 								 le16_to_cpu(router_obj->asObjects[k].usSrcDstTableOffset));
+							u8 *num_dst_objs = (u8 *)
+								((u8 *)router_src_dst_table + 1 +
+								 (router_src_dst_table->ucNumberOfSrc * 2));
+							u16 *dst_objs = (u16 *)(num_dst_objs + 1);
 							int enum_id;
 
 							router.router_id = router_obj_id;
-							for (enum_id = 0; enum_id < router_src_dst_table->ucNumberOfDst;
-							     enum_id++) {
+							for (enum_id = 0; enum_id < (*num_dst_objs); enum_id++) {
 								if (le16_to_cpu(path->usConnObjectId) ==
-								    le16_to_cpu(router_src_dst_table->usDstObjectID[enum_id]))
+								    le16_to_cpu(dst_objs[enum_id]))
 									break;
 							}
 



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 10/17] SCSI: iscsi: dont hang in endless loop if no targets present
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2013-09-29 19:26 ` [ 09/17] drm/radeon: fix handling of variable sized arrays for router objects Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 11/17] cgroup: fail if monitored file and event_control are in different cgroup Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sasha Levin, Mike Christie,
	James Bottomley, Jiri Slaby

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Sasha Levin <levinsasha928@gmail.com>

commit 46a7c17d26967922092f3a8291815ffb20f6cabe upstream.

iscsi_if_send_reply() may return -ESRCH if there were no targets to send
data to. Currently we're ignoring this value and looping in attempt to do it
over and over, which will usually lead in a hung task like this one:

[ 4920.817298] INFO: task trinity:9074 blocked for more than 120 seconds.
[ 4920.818527] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 4920.819982] trinity         D 0000000000000000  5504  9074   2756 0x00000004
[ 4920.825374]  ffff880003961a98 0000000000000086 ffff8800001aa000 ffff8800001aa000
[ 4920.826791]  00000000001d4340 ffff880003961fd8 ffff880003960000 00000000001d4340
[ 4920.828241]  00000000001d4340 00000000001d4340 ffff880003961fd8 00000000001d4340
[ 4920.833231]
[ 4920.833519] Call Trace:
[ 4920.834010]  [<ffffffff826363fa>] schedule+0x3a/0x50
[ 4920.834953]  [<ffffffff82634ac9>] __mutex_lock_common+0x209/0x5b0
[ 4920.836226]  [<ffffffff81af805d>] ? iscsi_if_rx+0x2d/0x990
[ 4920.837281]  [<ffffffff81053943>] ? sched_clock+0x13/0x20
[ 4920.838305]  [<ffffffff81af805d>] ? iscsi_if_rx+0x2d/0x990
[ 4920.839336]  [<ffffffff82634eb0>] mutex_lock_nested+0x40/0x50
[ 4920.840423]  [<ffffffff81af805d>] iscsi_if_rx+0x2d/0x990
[ 4920.841434]  [<ffffffff810dffed>] ? sub_preempt_count+0x9d/0xd0
[ 4920.842548]  [<ffffffff82637bb0>] ? _raw_read_unlock+0x30/0x60
[ 4920.843666]  [<ffffffff821f71de>] netlink_unicast+0x1ae/0x1f0
[ 4920.844751]  [<ffffffff821f7997>] netlink_sendmsg+0x227/0x350
[ 4920.845850]  [<ffffffff821857bd>] ? sock_update_netprioidx+0xdd/0x1b0
[ 4920.847060]  [<ffffffff82185732>] ? sock_update_netprioidx+0x52/0x1b0
[ 4920.848276]  [<ffffffff8217f226>] sock_aio_write+0x166/0x180
[ 4920.849348]  [<ffffffff810dfe41>] ? get_parent_ip+0x11/0x50
[ 4920.850428]  [<ffffffff811d0d9a>] do_sync_write+0xda/0x120
[ 4920.851465]  [<ffffffff810dffed>] ? sub_preempt_count+0x9d/0xd0
[ 4920.852579]  [<ffffffff810dfe41>] ? get_parent_ip+0x11/0x50
[ 4920.853608]  [<ffffffff81791887>] ? security_file_permission+0x27/0xb0
[ 4920.854821]  [<ffffffff811d0f4c>] vfs_write+0x16c/0x180
[ 4920.855781]  [<ffffffff811d104f>] sys_write+0x4f/0xa0
[ 4920.856798]  [<ffffffff82638e79>] system_call_fastpath+0x16/0x1b
[ 4920.877487] 1 lock held by trinity/9074:
[ 4920.878239]  #0:  (rx_queue_mutex){+.+...}, at: [<ffffffff81af805d>] iscsi_if_rx+0x2d/0x990
[ 4920.880005] Kernel panic - not syncing: hung_task: blocked tasks

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/scsi_transport_iscsi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -1747,7 +1747,7 @@ iscsi_if_rx(struct sk_buff *skb)
 				break;
 			err = iscsi_if_send_reply(group, nlh->nlmsg_seq,
 				nlh->nlmsg_type, 0, 0, ev, sizeof(*ev));
-		} while (err < 0 && err != -ECONNREFUSED);
+		} while (err < 0 && err != -ECONNREFUSED && err != -ESRCH);
 		skb_pull(skb, rlen);
 	}
 	mutex_unlock(&rx_queue_mutex);



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 11/17] cgroup: fail if monitored file and event_control are in different cgroup
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2013-09-29 19:26 ` [ 10/17] SCSI: iscsi: dont hang in endless loop if no targets present Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 12/17] perf: Clarify perf_cpu_context::active_pmu usage by renaming it to ::unique_pmu Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Li Zefan, Kirill A. Shutemov,
	Tejun Heo, Weng Meiling

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Li Zefan <lizefan@huawei.com>

commit f169007b2773f285e098cb84c74aac0154d65ff7 upstream.

If we pass fd of memory.usage_in_bytes of cgroup A to cgroup.event_control
of cgroup B, then we won't get memory usage notification from A but B!

What's worse, if A and B are in different mount hierarchy, we'll end up
accessing NULL pointer!

Disallow this kind of invalid usage.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Weng Meiling <wengmeiling.weng@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/cgroup.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -3498,6 +3498,7 @@ static int cgroup_write_event_control(st
 				      const char *buffer)
 {
 	struct cgroup_event *event = NULL;
+	struct cgroup *cgrp_cfile;
 	unsigned int efd, cfd;
 	struct file *efile = NULL;
 	struct file *cfile = NULL;
@@ -3552,6 +3553,16 @@ static int cgroup_write_event_control(st
 		goto fail;
 	}
 
+	/*
+	 * The file to be monitored must be in the same cgroup as
+	 * cgroup.event_control is.
+	 */
+	cgrp_cfile = __d_cgrp(cfile->f_dentry->d_parent);
+	if (cgrp_cfile != cgrp) {
+		ret = -EINVAL;
+		goto fail;
+	}
+
 	if (!event->cft->register_event || !event->cft->unregister_event) {
 		ret = -EINVAL;
 		goto fail;



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 12/17] perf: Clarify perf_cpu_context::active_pmu usage by renaming it to ::unique_pmu
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2013-09-29 19:26 ` [ 11/17] cgroup: fail if monitored file and event_control are in different cgroup Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 13/17] perf: Fix perf_cgroup_switch for sw-events Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stephane Eranian, Peter Zijlstra,
	Ingo Molnar, Li Zefan

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Peter Zijlstra <a.p.zijlstra@chello.nl>

commit 3f1f33206c16c7b3839d71372bc2ac3f305aa802 upstream.

Stephane thought the perf_cpu_context::active_pmu name confusing and
suggested using 'unique_pmu' instead.

This pointer is a pointer to a 'random' pmu sharing the cpuctx
instance, therefore limiting a for_each_pmu loop to those where
cpuctx->unique_pmu matches the pmu we get a loop over unique cpuctx
instances.

Suggested-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-kxyjqpfj2fn9gt7kwu5ag9ks@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/linux/perf_event.h |    2 +-
 kernel/events/core.c       |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -939,7 +939,7 @@ struct perf_cpu_context {
 	int				exclusive;
 	struct list_head		rotation_list;
 	int				jiffies_interval;
-	struct pmu			*active_pmu;
+	struct pmu			*unique_pmu;
 	struct perf_cgroup		*cgrp;
 };
 
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4579,7 +4579,7 @@ static void perf_event_task_event(struct
 	rcu_read_lock();
 	list_for_each_entry_rcu(pmu, &pmus, entry) {
 		cpuctx = get_cpu_ptr(pmu->pmu_cpu_context);
-		if (cpuctx->active_pmu != pmu)
+		if (cpuctx->unique_pmu != pmu)
 			goto next;
 		perf_event_task_ctx(&cpuctx->ctx, task_event);
 
@@ -4725,7 +4725,7 @@ static void perf_event_comm_event(struct
 	rcu_read_lock();
 	list_for_each_entry_rcu(pmu, &pmus, entry) {
 		cpuctx = get_cpu_ptr(pmu->pmu_cpu_context);
-		if (cpuctx->active_pmu != pmu)
+		if (cpuctx->unique_pmu != pmu)
 			goto next;
 		perf_event_comm_ctx(&cpuctx->ctx, comm_event);
 
@@ -4921,7 +4921,7 @@ got_name:
 	rcu_read_lock();
 	list_for_each_entry_rcu(pmu, &pmus, entry) {
 		cpuctx = get_cpu_ptr(pmu->pmu_cpu_context);
-		if (cpuctx->active_pmu != pmu)
+		if (cpuctx->unique_pmu != pmu)
 			goto next;
 		perf_event_mmap_ctx(&cpuctx->ctx, mmap_event,
 					vma->vm_flags & VM_EXEC);
@@ -5947,8 +5947,8 @@ static void update_pmu_context(struct pm
 
 		cpuctx = per_cpu_ptr(pmu->pmu_cpu_context, cpu);
 
-		if (cpuctx->active_pmu == old_pmu)
-			cpuctx->active_pmu = pmu;
+		if (cpuctx->unique_pmu == old_pmu)
+			cpuctx->unique_pmu = pmu;
 	}
 }
 
@@ -6080,7 +6080,7 @@ skip_type:
 		cpuctx->ctx.pmu = pmu;
 		cpuctx->jiffies_interval = 1;
 		INIT_LIST_HEAD(&cpuctx->rotation_list);
-		cpuctx->active_pmu = pmu;
+		cpuctx->unique_pmu = pmu;
 	}
 
 got_cpu_context:



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 13/17] perf: Fix perf_cgroup_switch for sw-events
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2013-09-29 19:26 ` [ 12/17] perf: Clarify perf_cpu_context::active_pmu usage by renaming it to ::unique_pmu Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 14/17] fanotify: dont merge permission events Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Peter Zijlstra, Ingo Molnar, Li Zefan

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Peter Zijlstra <a.p.zijlstra@chello.nl>

commit 95cf59ea72331d0093010543b8951bb43f262cac upstream.

Jiri reported that he could trigger the WARN_ON_ONCE() in
perf_cgroup_switch() using sw-events. This is because sw-events share
a cpuctx with multiple PMUs.

Use the ->unique_pmu pointer to limit the pmu iteration to unique
cpuctx instances.

Reported-and-Tested-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-so7wi2zf3jjzrwcutm2mkz0j@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/events/core.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -342,6 +342,8 @@ void perf_cgroup_switch(struct task_stru
 	list_for_each_entry_rcu(pmu, &pmus, entry) {
 
 		cpuctx = this_cpu_ptr(pmu->pmu_cpu_context);
+		if (cpuctx->unique_pmu != pmu)
+			continue; /* ensure we process each cpuctx once */
 
 		perf_pmu_disable(cpuctx->ctx.pmu);
 
@@ -365,9 +367,10 @@ void perf_cgroup_switch(struct task_stru
 
 			if (mode & PERF_CGROUP_SWIN) {
 				WARN_ON_ONCE(cpuctx->cgrp);
-				/* set cgrp before ctxsw in to
-				 * allow event_filter_match() to not
-				 * have to pass task around
+				/*
+				 * set cgrp before ctxsw in to allow
+				 * event_filter_match() to not have to pass
+				 * task around
 				 */
 				cpuctx->cgrp = perf_cgroup_from_task(task);
 				cpu_ctx_sched_in(cpuctx, EVENT_ALL, task);



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 14/17] fanotify: dont merge permission events
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2013-09-29 19:26 ` [ 13/17] perf: Fix perf_cgroup_switch for sw-events Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 15/17] perf tools: Handle JITed code in shared memory Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Boyd Yang, Lino Sanfilippo,
	Eric Paris, Mihai Donțu

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Lino Sanfilippo <LinoSanfilippo@gmx.de>

commit 03a1cec1f17ac1a6041996b3e40f96b5a2f90e1b upstream.

Boyd Yang reported a problem for the case that multiple threads of the same
thread group are waiting for a reponse for a permission event.
In this case it is possible that some of the threads are never woken up, even
if the response for the event has been received
(see http://marc.info/?l=linux-kernel&m=131822913806350&w=2).

The reason is that we are currently merging permission events if they belong to
the same thread group. But we are not prepared to wake up more than one waiter
for each event. We do

wait_event(group->fanotify_data.access_waitq, event->response ||
			atomic_read(&group->fanotify_data.bypass_perm));
and after that
  event->response = 0;

which is the reason that even if we woke up all waiters for the same event
some of them may see event->response being already set 0 again, then go back to
sleep and block forever.

With this patch we avoid that more than one thread is waiting for a response
by not merging permission events for the same thread group any more.

Reported-by: Boyd Yang <boyd.yang@gmail.com>
Signed-off-by: Lino Sanfilippo <LinoSanfilipp@gmx.de>
Signed-off-by: Eric Paris <eparis@redhat.com>
Cc: Mihai Donțu <mihai.dontu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/notify/fanotify/fanotify.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/fs/notify/fanotify/fanotify.c
+++ b/fs/notify/fanotify/fanotify.c
@@ -18,6 +18,12 @@ static bool should_merge(struct fsnotify
 	    old->tgid == new->tgid) {
 		switch (old->data_type) {
 		case (FSNOTIFY_EVENT_PATH):
+#ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS
+			/* dont merge two permission events */
+			if ((old->mask & FAN_ALL_PERM_EVENTS) &&
+			    (new->mask & FAN_ALL_PERM_EVENTS))
+				return false;
+#endif
 			if ((old->path.mnt == new->path.mnt) &&
 			    (old->path.dentry == new->path.dentry))
 				return true;



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 15/17] perf tools: Handle JITed code in shared memory
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2013-09-29 19:26 ` [ 14/17] fanotify: dont merge permission events Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 16/17] sfc: Fix efx_rx_buf_offset() for recycled pages Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andi Kleen, Arnaldo Carvalho de Melo,
	Vinson Lee

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Andi Kleen <ak@linux.intel.com>

commit 89365e6c9ad4c0e090e4c6a4b67a3ce319381d89 upstream.

Need to check for /dev/zero.

Most likely more strings are missing too.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1366848182-30449-1-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Vinson Lee <vlee@freedesktop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 tools/perf/util/map.c |    1 +
 1 file changed, 1 insertion(+)

--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -16,6 +16,7 @@ const char *map_type__name[MAP__NR_TYPES
 static inline int is_anon_memory(const char *filename)
 {
 	return !strcmp(filename, "//anon") ||
+	       !strcmp(filename, "/dev/zero (deleted)") ||
 	       !strcmp(filename, "/anon_hugepage (deleted)");
 }
 



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 16/17] sfc: Fix efx_rx_buf_offset() for recycled pages
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2013-09-29 19:26 ` [ 15/17] perf tools: Handle JITed code in shared memory Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-29 19:26 ` [ 17/17] kernel-doc: bugfix - multi-line macros Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ben Hutchings, David Miller

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ben Hutchings <bhutchings@solarflare.com>

This bug fix is only for stable branches older than 3.10.  The bug was
fixed upstream by commit 2768935a4660 ('sfc: reuse pages to avoid DMA
mapping/unmapping costs'), but that change is totally unsuitable for
stable.

Commit b590ace09d51 ('sfc: Fix efx_rx_buf_offset() in the presence of
swiotlb') added an explicit page_offset member to struct
efx_rx_buffer, which must be set consistently with the u.page and
dma_addr fields.  However, it failed to add the necessary assignment
in efx_resurrect_rx_buffer().  It also did not correct the calculation
of efx_rx_buffer::dma_addr in efx_resurrect_rx_buffer(), which assumes
that DMA-mapping a page will result in a page-aligned DMA address
(exactly what swiotlb violates).

Add the assignment of efx_rx_buffer::page_offset and change the
calculation of dma_addr to make use of it.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/sfc/rx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/net/sfc/rx.c
+++ b/drivers/net/sfc/rx.c
@@ -311,8 +311,9 @@ static void efx_resurrect_rx_buffer(stru
 
 	index = rx_queue->added_count & rx_queue->ptr_mask;
 	new_buf = efx_rx_buffer(rx_queue, index);
-	new_buf->dma_addr = rx_buf->dma_addr ^ (PAGE_SIZE >> 1);
 	new_buf->u.page = rx_buf->u.page;
+	new_buf->page_offset = rx_buf->page_offset ^ (PAGE_SIZE >> 1);
+	new_buf->dma_addr = state->dma_addr + new_buf->page_offset;
 	new_buf->len = rx_buf->len;
 	new_buf->is_page = true;
 	++rx_queue->added_count;



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ 17/17] kernel-doc: bugfix - multi-line macros
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2013-09-29 19:26 ` [ 16/17] sfc: Fix efx_rx_buf_offset() for recycled pages Greg Kroah-Hartman
@ 2013-09-29 19:26 ` Greg Kroah-Hartman
  2013-09-30  1:24 ` [ 00/17] 3.0.98-stable review Guenter Roeck
  2013-10-01 19:24 ` Shuah Khan
  18 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-29 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Daniel Santos, Randy Dunlap,
	Michal Marek, Andrew Morton, Linus Torvalds, Ben Hutchings

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Daniel Santos <daniel.santos@pobox.com>

commit 654784284430bf2739985914b65e09c7c35a7273 upstream.

Prior to this patch the following code breaks:

/**
 * multiline_example - this breaks kernel-doc
 */
 #define multiline_example( \
myparam)

Producing this error:

Error(somefile.h:983): cannot understand prototype: 'multiline_example( \ '

This patch fixes the issue by appending all lines ending in a blackslash
(optionally followed by whitespace), removing the backslash and any
whitespace after it prior to appending (just like the C pre-processor
would).

This fixes a break in kerel-doc introduced by the additions to rbtree.h.

Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 scripts/kernel-doc |    3 +++
 1 file changed, 3 insertions(+)

--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -2044,6 +2044,9 @@ sub process_file($) {
 
     $section_counter = 0;
     while (<IN>) {
+	while (s/\\\s*$//) {
+	    $_ .= <IN>;
+	}
 	if ($state == 0) {
 	    if (/$doc_start/o) {
 		$state = 1;		# next line is always the function name



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [ 00/17] 3.0.98-stable review
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2013-09-29 19:26 ` [ 17/17] kernel-doc: bugfix - multi-line macros Greg Kroah-Hartman
@ 2013-09-30  1:24 ` Guenter Roeck
  2013-09-30  1:50   ` Greg Kroah-Hartman
  2013-10-01 19:24 ` Shuah Khan
  18 siblings, 1 reply; 21+ messages in thread
From: Guenter Roeck @ 2013-09-30  1:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel; +Cc: torvalds, akpm, stable

On 09/29/2013 12:26 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.0.98 release.
> There are 17 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 Tue Oct  1 19:07:47 UTC 2013.
> 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.0.98-rc1.gz
> and the diffstat can be found below.
>


Build test results:
	total: 98 pass: 71 skipped: 16 fail: 11

qemu:
	ppc, sh, sparc, x86, x86_64 passed
	arm, microblaze, mips, mips64, sparc64 skipped

Same results as with 3.0.97.

Guenter


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [ 00/17] 3.0.98-stable review
  2013-09-30  1:24 ` [ 00/17] 3.0.98-stable review Guenter Roeck
@ 2013-09-30  1:50   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 21+ messages in thread
From: Greg Kroah-Hartman @ 2013-09-30  1:50 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-kernel, torvalds, akpm, stable

On Sun, Sep 29, 2013 at 06:24:52PM -0700, Guenter Roeck wrote:
> On 09/29/2013 12:26 PM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 3.0.98 release.
> > There are 17 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 Tue Oct  1 19:07:47 UTC 2013.
> > 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.0.98-rc1.gz
> > and the diffstat can be found below.
> >
> 
> 
> Build test results:
> 	total: 98 pass: 71 skipped: 16 fail: 11
> 
> qemu:
> 	ppc, sh, sparc, x86, x86_64 passed
> 	arm, microblaze, mips, mips64, sparc64 skipped
> 
> Same results as with 3.0.97.

Nice, thanks for testing and letting me know.

greg k-h

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [ 00/17] 3.0.98-stable review
  2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2013-09-30  1:24 ` [ 00/17] 3.0.98-stable review Guenter Roeck
@ 2013-10-01 19:24 ` Shuah Khan
  18 siblings, 0 replies; 21+ messages in thread
From: Shuah Khan @ 2013-10-01 19:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, stable, Shuah Khan, shuahkhan

On 09/29/2013 01:26 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.0.98 release.
> There are 17 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 Tue Oct  1 19:07:47 UTC 2013.
> 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.0.98-rc1.gz
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>

3.0.98-rc1 applied cleany to 3.0.97

Compiled and booted on the following systems:

HP ProBook 6475b AMD A10-4600M APU with Radeon(tm) HD Graphics

dmesgs look good. No regressions compared to the previous dmesgs for 
this release. dmesg emerg, crit, alert, err are clean. No regressions in 
warn.

Cross-compile testing: HP Compaq dc7700 SFF desktop: x86-64 Intel Core-i2:

Cross-compile tests results:

alpha: defconfig passed
arm: defconfig passed
arm64: not applicable
blackfin: defconfig passed
c6x: not applicable
mips: defconfig passed
mipsel: defconfig passed
powerpc: wii_defconfig passed
sh: defconfig passed
sparc: defconfig passed
tile: tilegx_defconfig passed

-- 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] 21+ messages in thread

end of thread, other threads:[~2013-10-01 19:24 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-29 19:26 [ 00/17] 3.0.98-stable review Greg Kroah-Hartman
2013-09-29 19:26 ` [ 01/17] Revert "sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()" Greg Kroah-Hartman
2013-09-29 19:26 ` [ 02/17] net: usb: cdc_ether: Use wwan interface for Telit modules Greg Kroah-Hartman
2013-09-29 19:26 ` [ 03/17] rt2800: fix wrong TX power compensation Greg Kroah-Hartman
2013-09-29 19:26 ` [ 04/17] HID: provide a helper for validating hid reports Greg Kroah-Hartman
2013-09-29 19:26 ` [ 05/17] HID: zeroplus: validate output report details Greg Kroah-Hartman
2013-09-29 19:26 ` [ 06/17] drm/radeon: fix LCD record parsing Greg Kroah-Hartman
2013-09-29 19:26 ` [ 07/17] drm/radeon: update line buffer allocation for dce4.1/5 Greg Kroah-Hartman
2013-09-29 19:26 ` [ 08/17] drm/radeon: fix resume on some rs4xx boards (v2) Greg Kroah-Hartman
2013-09-29 19:26 ` [ 09/17] drm/radeon: fix handling of variable sized arrays for router objects Greg Kroah-Hartman
2013-09-29 19:26 ` [ 10/17] SCSI: iscsi: dont hang in endless loop if no targets present Greg Kroah-Hartman
2013-09-29 19:26 ` [ 11/17] cgroup: fail if monitored file and event_control are in different cgroup Greg Kroah-Hartman
2013-09-29 19:26 ` [ 12/17] perf: Clarify perf_cpu_context::active_pmu usage by renaming it to ::unique_pmu Greg Kroah-Hartman
2013-09-29 19:26 ` [ 13/17] perf: Fix perf_cgroup_switch for sw-events Greg Kroah-Hartman
2013-09-29 19:26 ` [ 14/17] fanotify: dont merge permission events Greg Kroah-Hartman
2013-09-29 19:26 ` [ 15/17] perf tools: Handle JITed code in shared memory Greg Kroah-Hartman
2013-09-29 19:26 ` [ 16/17] sfc: Fix efx_rx_buf_offset() for recycled pages Greg Kroah-Hartman
2013-09-29 19:26 ` [ 17/17] kernel-doc: bugfix - multi-line macros Greg Kroah-Hartman
2013-09-30  1:24 ` [ 00/17] 3.0.98-stable review Guenter Roeck
2013-09-30  1:50   ` Greg Kroah-Hartman
2013-10-01 19:24 ` Shuah Khan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.