3.0.98-stable review
Subsystems (15)
Greg Kroah-Hartman
maintainercover 3.0.98-stable review
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 <[email protected]>
Linux 3.0.98-rc1
Daniel Santos <[email protected]>
kernel-doc: bugfix - multi-line macros
Ben Hutchings <[email protected]>
sfc: Fix efx_rx_buf_offset() for recycled pages
Andi Kleen <[email protected]>
perf tools: Handle JITed code in shared memory
Lino Sanfilippo <[email protected]>
fanotify: dont merge permission events
Peter Zijlstra <[email protected]>
perf: Fix perf_cgroup_switch for sw-events
Peter Zijlstra <[email protected]>
perf: Clarify perf_cpu_context::active_pmu usage by renaming it to ::unique_pmu
Li Zefan <[email protected]>
cgroup: fail if monitored file and event_control are in different cgroup
Sasha Levin <[email protected]>
SCSI: iscsi: don't hang in endless loop if no targets present
Alex Deucher <[email protected]>
drm/radeon: fix handling of variable sized arrays for router objects
Alex Deucher <[email protected]>
drm/radeon: fix resume on some rs4xx boards (v2)
Alex Deucher <[email protected]>
drm/radeon: update line buffer allocation for dce4.1/5
Alex Deucher <[email protected]>
drm/radeon: fix LCD record parsing
Kees Cook <[email protected]>
HID: zeroplus: validate output report details
Kees Cook <[email protected]>
HID: provide a helper for validating hid reports
Stanislaw Gruszka <[email protected]>
rt2800: fix wrong TX power compensation
Fabio Porcedda <[email protected]>
net: usb: cdc_ether: Use wwan interface for Telit modules
Greg Kroah-Hartman <[email protected]>
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(-)
Greg Kroah-Hartman
maintainerPATCH 1/17 Revert "sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()"
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Greg Kroah-Hartman <[email protected]>
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.
--- net/sctp/sm_sideeffect.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/sctp/sm_sideeffect.c +1 -2
@@ -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 :
Greg Kroah-Hartman
maintainerPATCH 2/17 net: usb: cdc_ether: Use wwan interface for Telit modules
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabio Porcedda <[email protected]>
commit 0092820407901a0b2c4e343e85f96bb7abfcded1 upstream.
--- drivers/net/usb/cdc_ether.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/usb/cdc_ether.c +5 -0
@@ -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,
Greg Kroah-Hartman
maintainerPATCH 3/17 rt2800: fix wrong TX power compensation
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stanislaw Gruszka <[email protected]>
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.
--- drivers/net/wireless/rt2x00/rt2800lib.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/wireless/rt2x00/rt2800lib.c +7 -0
@@ -1861,6 +1861,13 @@ static int rt2800_get_gain_calibration_dint 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. *
Greg Kroah-Hartman
maintainerPATCH 4/17 HID: provide a helper for validating hid reports
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
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.
--- drivers/hid/hid-core.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/hid.h | 4 +++ 2 files changed, 62 insertions(+)
drivers/hid/hid-core.c +58 -0
@@ -815,6 +815,64 @@ static int search(__s32 *array, __s32 vareturn -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 *
include/linux/hid.h +4 -0
@@ -713,6 +713,10 @@ void hid_output_report(struct hid_reportstruct 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);
Greg Kroah-Hartman
maintainerPATCH 5/17 HID: zeroplus: validate output report details
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
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
--- drivers/hid/hid-zpff.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
drivers/hid/hid-zpff.c +5 -13
@@ -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 );
Greg Kroah-Hartman
maintainerPATCH 6/17 drm/radeon: fix LCD record parsing
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
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.
--- drivers/gpu/drm/radeon/radeon_atombios.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_atombios.c +3 -1
@@ -1658,7 +1658,9 @@ struct radeon_encoder_atom_dig *radeon_akfree (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;
Greg Kroah-Hartman
maintainerPATCH 7/17 drm/radeon: update line buffer allocation for dce4.1/5
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
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 <[email protected]>
--- drivers/gpu/drm/radeon/evergreen.c | 25 +++++++++++++++++++++---- drivers/gpu/drm/radeon/evergreend.h | 4 ++++ 2 files changed, 25 insertions(+), 4 deletions(-)
drivers/gpu/drm/radeon/evergreen.c +21 -4
@@ -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 :
drivers/gpu/drm/radeon/evergreend.h +4 -0
@@ -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 */
Greg Kroah-Hartman
maintainerPATCH 8/17 drm/radeon: fix resume on some rs4xx boards (v2)
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
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
--- drivers/gpu/drm/radeon/rs400.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/rs400.c +6 -3
@@ -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));
Greg Kroah-Hartman
maintainerPATCH 9/17 drm/radeon: fix handling of variable sized arrays for router objects
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
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.
--- drivers/gpu/drm/radeon/radeon_atombios.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/radeon_atombios.c +6 -3
@@ -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 ; }
Greg Kroah-Hartman
maintainerPATCH 10/17 SCSI: iscsi: dont hang in endless loop if no targets present
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sasha Levin <[email protected]>
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--- drivers/scsi/scsi_transport_iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_transport_iscsi.c +1 -1
@@ -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);
Greg Kroah-Hartman
maintainerPATCH 11/17 cgroup: fail if monitored file and event_control are in different cgroup
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li Zefan <[email protected]>
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.
--- kernel/cgroup.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
kernel/cgroup.c +11 -0
@@ -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;
Greg Kroah-Hartman
maintainerPATCH 12/17 perf: Clarify perf_cpu_context::active_pmu usage by renaming it to ::unique_pmu
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <[email protected]>
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.
--- include/linux/perf_event.h | 2 +- kernel/events/core.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)
include/linux/perf_event.h +1 -1
@@ -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; };
kernel/events/core.c +6 -6
@@ -4579,7 +4579,7 @@ static void perf_event_task_event(structrcu_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(structrcu_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:
Greg Kroah-Hartman
maintainerPATCH 13/17 perf: Fix perf_cgroup_switch for sw-events
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <[email protected]>
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.
--- kernel/events/core.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
kernel/events/core.c +6 -3
@@ -342,6 +342,8 @@ void perf_cgroup_switch(struct task_strulist_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_struif (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);
Greg Kroah-Hartman
maintainerPATCH 14/17 fanotify: dont merge permission events
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lino Sanfilippo <[email protected]>
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.
--- fs/notify/fanotify/fanotify.c | 6 ++++++ 1 file changed, 6 insertions(+)
fs/notify/fanotify/fanotify.c +6 -0
@@ -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;
Greg Kroah-Hartman
maintainerPATCH 15/17 perf tools: Handle JITed code in shared memory
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andi Kleen <[email protected]>
commit 89365e6c9ad4c0e090e4c6a4b67a3ce319381d89 upstream.
Need to check for /dev/zero.
Most likely more strings are missing too.
--- tools/perf/util/map.c | 1 + 1 file changed, 1 insertion(+)
tools/perf/util/map.c +1 -0
@@ -16,6 +16,7 @@ const char *map_type__name[MAP__NR_TYPESstatic inline int is_anon_memory (const char *filename) {return !strcmp (filename,"//anon" ) || + !strcmp (filename,"/dev/zero (deleted)" ) || !strcmp (filename,"/anon_hugepage (deleted)" ); }
Greg Kroah-Hartman
maintainerPATCH 16/17 sfc: Fix efx_rx_buf_offset() for recycled pages
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Hutchings <[email protected]>
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.
--- drivers/net/sfc/rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/sfc/rx.c +2 -1
@@ -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;
Greg Kroah-Hartman
maintainerPATCH 17/17 kernel-doc: bugfix - multi-line macros
In reply to Greg Kroah-Hartman3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Santos <[email protected]>
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.
--- scripts/kernel-doc | 3 +++ 1 file changed, 3 insertions(+)
scripts/kernel-doc +3 -0
@@ -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
Quoted 5 lines · Greg Kroah-Hartman
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.
Quoted 7 lines
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.gzand 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
Greg Kroah-Hartman
maintainerQuoted 15 lines · Guenter Roeck
Quoted 5 lines · Greg Kroah-Hartman
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.
Quoted 7 lines
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.gzand the diffstat can be found below.
Quoted 8 lines
Build test results:
total: 98 pass: 71 skipped: 16 fail: 11qemu:
ppc, sh, sparc, x86, x86_64 passed arm, microblaze, mips, mips64, sparc64 skippedSame results as with 3.0.97.
Nice, thanks for testing and letting me know.
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
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.
Quoted 8 lines
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.gzand 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
Signature · 4 lines
Shuah Khan Senior Linux Kernel Developer - Open Source Group Samsung Research America(Silicon Valley) [email protected] | (970) 672-0658