Linux 4.9.210
Greg KH
maintainerI'm announcing the release of the 4.9.210 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - drivers/gpu/drm/drm_dp_mst_topology.c | 2 - drivers/gpu/drm/i915/intel_lrc.c | 27 ++++++-------- drivers/hid/hid-core.c | 6 +++ drivers/hid/hid-input.c | 16 ++++++-- drivers/hid/uhid.c | 3 + drivers/input/input.c | 26 ++++++++----- drivers/net/can/mscan/mscan.c | 21 +++++------ drivers/net/can/usb/gs_usb.c | 4 +- drivers/net/wireless/marvell/mwifiex/pcie.c | 4 +- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 13 +++++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 1 drivers/scsi/bfa/bfad_attr.c | 4 +- drivers/staging/comedi/drivers/adv_pci1710.c | 4 +- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 drivers/staging/vt6656/device.h | 1 drivers/staging/vt6656/main_usb.c | 1 drivers/staging/vt6656/wcmd.c | 1 drivers/tty/serial/serial_core.c | 1 drivers/usb/chipidea/host.c | 4 +- drivers/usb/core/config.c | 12 ++++-- drivers/usb/musb/musb_core.c | 11 +++++ drivers/usb/musb/musbhsdma.c | 2 - drivers/usb/serial/option.c | 8 ++++ drivers/usb/serial/usb-wwan.h | 1 drivers/usb/serial/usb_wwan.c | 4 ++ fs/char_dev.c | 2 - include/linux/can/dev.h | 34 ++++++++++++++++++ include/linux/kobject.h | 2 + kernel/trace/trace_sched_wakeup.c | 4 +- kernel/trace/trace_stack.c | 5 ++ lib/kobject.c | 5 ++ net/ipv4/netfilter/arp_tables.c | 27 ++++++++------ net/ipv4/tcp_input.c | 14 ++++--- net/netfilter/ipset/ip_set_core.c | 3 + sound/usb/quirks.c | 1 36 files changed, 200 insertions(+), 77 deletions(-)
Akeem G Abodunrin (1):
drm/i915/gen9: Clear residual context state on context switch
Alan Stern (2):
HID: Fix slab-out-of-bounds read in hid_field_extract
USB: Fix: Don't skip endpoint descriptors with maxpacket=0
Daniele Palmas (1):
USB: serial: option: add ZLP support for 0x1bc7/0x9010
Dmitry Torokhov (2):
HID: hid-input: clear unmapped usages
Input: add safety guards to input_set_keycode()
Florian Faber (1):
can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode
Florian Westphal (2):
netfilter: arp_tables: init netns pointer in xt_tgchk_param struct
netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present
Ganapathi Bhat (1):
mwifiex: fix possible heap overflow in mwifiex_process_country_ie()
Greg Kroah-Hartman (1):
Linux 4.9.210
Guenter Roeck (1):
usb: chipidea: host: Disable port power only if previously enabled
Ian Abbott (1):
staging: comedi: adv_pci1710: fix AI channels 16-31 for PCI-1713
Jan Kara (1):
kobject: Export kobject_get_unless_zero()
Johan Hovold (1):
can: gs_usb: gs_usb_probe(): use descriptors of current altsetting
Kaitao Cheng (1):
kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task fail
Malcolm Priestley (1):
staging: vt6656: set usb_set_intfdata on driver fail.
Marcel Holtmann (1):
HID: uhid: Fix returning EPOLLOUT from uhid_char_poll
Marcelo Ricardo Leitner (1):
tcp: minimize false-positives on TCP/GRO check
Michael Straube (1):
staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21
Navid Emamdoost (3):
mwifiex: pcie: Fix memory leak in mwifiex_pcie_alloc_cmdrsp_buf
scsi: bfa: release allocated memory in case of error
rtl8xxxu: prevent leaking urb
Oliver Hartkopp (1):
can: can_dropped_invalid_skb(): ensure an initialized headroom in outgoing CAN sk_buffs
Paul Cercueil (2):
usb: musb: Disable pullup at init
usb: musb: dma: Correct parameter passed to IRQ handler
Steven Rostedt (VMware) (1):
tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined
Sudip Mukherjee (2):
tty: link tty and port before configuring it as console
tty: always relink the port
Takashi Iwai (1):
ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5
Tony Lindgren (1):
usb: musb: fix idling for suspend after disconnect interrupt
Wayne Lin (1):
drm/dp_mst: correct the shifting in DP_REMOTE_I2C_READ
Will Deacon (1):
chardev: Avoid potential use-after-free in 'chrdev_open()'
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 209 +SUBLEVEL = 210 EXTRAVERSION = NAME = Roaring Lionus
drivers/gpu/drm/drm_dp_mst_topology.c +1 -1
@@ -272,7 +272,7 @@ static void drm_dp_encode_sideband_req(struct drm_dp_sideband_msg_req_body *req,memcpy (&buf[idx], req->u.i2c_read.transactions[i].bytes, req->u.i2c_read.transactions[i].num_bytes); idx += req->u.i2c_read.transactions[i].num_bytes; - buf[idx] = (req->u.i2c_read.transactions[i].no_stop_bit &0x1 ) <<5 ; + buf[idx] = (req->u.i2c_read.transactions[i].no_stop_bit &0x1 ) <<4 ; buf[idx] |= (req->u.i2c_read.transactions[i].i2c_transaction_delay &0xf ); idx++; }
drivers/gpu/drm/i915/intel_lrc.c +12 -15
@@ -1017,6 +1017,8 @@ static int gen9_init_indirectctx_bb(struct intel_engine_cs *engine,int ret;struct drm_i915_private *dev_priv = engine->i915;uint32_t index =wa_ctx_start (wa_ctx, *offset,CACHELINE_DWORDS ); +u32 scratch_addr = +i915_ggtt_offset (engine->scratch) +2 *CACHELINE_BYTES ;/* WaDisableCtxRestoreArbitration:skl,bxt */ if (IS_SKL_REVID(dev_priv, 0, SKL_REVID_D0) ||
@@ -1036,22 +1038,17 @@ static int gen9_init_indirectctx_bb(struct intel_engine_cs *engine, GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE));wa_ctx_emit (batch, index,MI_NOOP ); -/* WaClearSlmSpaceAtContextSwitch:kbl */ +/* WaClearSlmSpaceAtContextSwitch:skl,bxt,kbl,glk,cfl */ /* Actual scratch location is at 128 bytes offset */ -if (IS_KBL_REVID (dev_priv,0 ,KBL_REVID_A0 )) { -u32 scratch_addr = -i915_ggtt_offset (engine->scratch) +2 *CACHELINE_BYTES ; - -wa_ctx_emit (batch, index,GFX_OP_PIPE_CONTROL (6 )); -wa_ctx_emit (batch, index, (PIPE_CONTROL_FLUSH_L3 | -PIPE_CONTROL_GLOBAL_GTT_IVB | -PIPE_CONTROL_CS_STALL | -PIPE_CONTROL_QW_WRITE )); -wa_ctx_emit (batch, index, scratch_addr); -wa_ctx_emit (batch, index,0 ); -wa_ctx_emit (batch, index,0 ); -wa_ctx_emit (batch, index,0 ); - } +wa_ctx_emit (batch, index,GFX_OP_PIPE_CONTROL (6 )); +wa_ctx_emit (batch, index, (PIPE_CONTROL_FLUSH_L3 | +PIPE_CONTROL_GLOBAL_GTT_IVB | +PIPE_CONTROL_CS_STALL | +PIPE_CONTROL_QW_WRITE )); +wa_ctx_emit (batch, index, scratch_addr); +wa_ctx_emit (batch, index,0 ); +wa_ctx_emit (batch, index,0 ); +wa_ctx_emit (batch, index,0 );/* WaMediaPoolStateCmdInWABB:bxt */ if (HAS_POOLED_EU (engine->i915)) {
drivers/hid/hid-core.c +6 -0
@@ -269,6 +269,12 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign offset = report->size; report->size += parser->global.report_size * parser->global.report_count; +/* Total size check: Allow for possible report index byte */ +if (report->size > (HID_MAX_BUFFER_SIZE -1 ) <<3 ) { +hid_err (parser->device,"report is too long\n" ); +return -1 ; + } +if (!parser->local.usage_index)/* Ignore padding fields */ return 0 ;
drivers/hid/hid-input.c +12 -4
@@ -1026,9 +1026,15 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel } mapped: -if (device->driver->input_mapped && device->driver->input_mapped (device, - hidinput, field, usage, &bit, &max) <0 ) - goto ignore; +if (device->driver->input_mapped && + device->driver->input_mapped (device, hidinput, field, usage, + &bit, &max) <0 ) { +/* +* The driver indicated that no further generic handling +* of the usage is desired. +*/ +return ; + }set_bit (usage->type, input->evbit);
@@ -1087,9 +1093,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fielset_bit (MSC_SCAN , input->mscbit); } -ignore:return ; +ignore: + usage->type =0 ; + usage->code =0 ; }void hidinput_hid_event (struct hid_device *hid,struct hid_field *field,struct hid_usage *usage,__s32 value)
drivers/hid/uhid.c +2 -1
@@ -26,6 +26,7 @@#include <linux/uhid.h> #include <linux/wait.h> #include <linux/uaccess.h> +#include <linux/eventpoll.h> #define UHID_NAME "uhid"#define UHID_BUFSIZE 32
@@ -774,7 +775,7 @@ static unsigned int uhid_char_poll(struct file *file, poll_table *wait)if (uhid->head != uhid->tail)return POLLIN |POLLRDNORM ; -return 0 ; +return EPOLLOUT |EPOLLWRNORM ; }static const struct file_operations uhid_fops = {
drivers/input/input.c +16 -10
@@ -850,16 +850,18 @@ static int input_default_setkeycode(struct input_dev *dev, } } -__clear_bit (*old_keycode, dev->keybit); -__set_bit (ke->keycode, dev->keybit); - -for (i =0 ; i < dev->keycodemax; i++) { -if (input_fetch_keycode (dev, i) == *old_keycode) { -__set_bit (*old_keycode, dev->keybit); -break ;/* Setting the bit twice is useless, so break */ +if (*old_keycode <=KEY_MAX ) { +__clear_bit (*old_keycode, dev->keybit); +for (i =0 ; i < dev->keycodemax; i++) { +if (input_fetch_keycode (dev, i) == *old_keycode) { +__set_bit (*old_keycode, dev->keybit); +/* Setting the bit twice is useless, so break */ +break ; + } } } +__set_bit (ke->keycode, dev->keybit);return 0 ; }
@@ -915,9 +917,13 @@ int input_set_keycode(struct input_dev *dev,* Simulate keyup event if keycode is not present * in the keymap anymore */ -if (test_bit (EV_KEY , dev->evbit) && - !is_event_supported (old_keycode, dev->keybit,KEY_MAX ) && -__test_and_clear_bit (old_keycode, dev->key)) { +if (old_keycode >KEY_MAX ) { +dev_warn (dev->dev.parent ?: &dev->dev, +"%s: got too big old keycode %#x\n" , + __func__, old_keycode); + }else if (test_bit (EV_KEY , dev->evbit) && + !is_event_supported (old_keycode, dev->keybit,KEY_MAX ) && +__test_and_clear_bit (old_keycode, dev->key)) {struct input_value vals[] = { {EV_KEY , old_keycode,0 }, input_value_sync
drivers/net/can/mscan/mscan.c +10 -11
@@ -392,13 +392,12 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota)struct net_device *dev = napi->dev;struct mscan_regs __iomem *regs = priv->reg_base;struct net_device_stats *stats = &dev->stats; -int npackets =0 ; -int ret =1 ; +int work_done =0 ;struct sk_buff *skb;struct can_frame *frame;u8 canrflg; -while (npackets < quota) { +while (work_done < quota) { canrflg =in_8 (®s->canrflg);if (!(canrflg & (MSCAN_RXF |MSCAN_ERR_IF )))break ;
@@ -419,18 +418,18 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota) stats->rx_packets++; stats->rx_bytes += frame->can_dlc; - npackets++; + work_done++;netif_receive_skb (skb); } -if (!(in_8 (®s->canrflg) & (MSCAN_RXF |MSCAN_ERR_IF ))) { -napi_complete (&priv->napi); -clear_bit (F_RX_PROGRESS , &priv->flags); -if (priv->can.state <CAN_STATE_BUS_OFF ) -out_8 (®s->canrier, priv->shadow_canrier); - ret =0 ; +if (work_done < quota) { +if (likely (napi_complete_done (&priv->napi, work_done))) { +clear_bit (F_RX_PROGRESS , &priv->flags); +if (priv->can.state <CAN_STATE_BUS_OFF ) +out_8 (®s->canrier, priv->shadow_canrier); + } } -return ret; +return work_done; }static irqreturn_t mscan_isr (int irq,void *dev_id)
drivers/net/can/usb/gs_usb.c +2 -2
@@ -927,7 +927,7 @@ static int gs_usb_probe(struct usb_interface *intf,GS_USB_BREQ_HOST_FORMAT ,USB_DIR_OUT |USB_TYPE_VENDOR |USB_RECIP_INTERFACE ,1 , - intf->altsetting[0 ].desc.bInterfaceNumber, + intf->cur_altsetting->desc.bInterfaceNumber, hconf,sizeof (*hconf), 1000);
@@ -950,7 +950,7 @@ static int gs_usb_probe(struct usb_interface *intf,GS_USB_BREQ_DEVICE_CONFIG ,USB_DIR_IN |USB_TYPE_VENDOR |USB_RECIP_INTERFACE ,1 , - intf->altsetting[0 ].desc.bInterfaceNumber, + intf->cur_altsetting->desc.bInterfaceNumber, dconf,sizeof (*dconf), 1000);
drivers/net/wireless/marvell/mwifiex/pcie.c +3 -1
@@ -976,8 +976,10 @@ static int mwifiex_pcie_alloc_cmdrsp_buf(struct mwifiex_adapter *adapter) }skb_put (skb,MWIFIEX_UPLD_SIZE );if (mwifiex_map_pci_memory (adapter, skb,MWIFIEX_UPLD_SIZE , -PCI_DMA_FROMDEVICE )) +PCI_DMA_FROMDEVICE )) { +kfree_skb (skb);return -1 ; + } card->cmdrsp_buf = skb;
drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +11 -2
@@ -271,6 +271,14 @@ static int mwifiex_process_country_ie(struct mwifiex_private *priv, "11D: skip setting domain info in FW\n");return 0 ; } + +if (country_ie_len > + (IEEE80211_COUNTRY_STRING_LEN +MWIFIEX_MAX_TRIPLET_802_11D )) { +mwifiex_dbg (priv->adapter,ERROR , +"11D: country_ie_len overflow!, deauth AP\n" ); +return -EINVAL ; + } +memcpy (priv->adapter->country_code, &country_ie[2 ],2 ); domain_info->country_code[0 ] = country_ie[2 ];
@@ -314,8 +322,9 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, priv->scan_block = false;if (bss) { -if (adapter->region_code ==0x00 ) -mwifiex_process_country_ie (priv, bss); +if (adapter->region_code ==0x00 && +mwifiex_process_country_ie (priv, bss)) +return -EINVAL ;/* Allocate and fill new bss descriptor */ bss_desc = kzalloc(sizeof(struct mwifiex_bssdescriptor),
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +1 -0
@@ -5422,6 +5422,7 @@ static int rtl8xxxu_submit_int_urb(struct ieee80211_hw *hw) ret =usb_submit_urb (urb,GFP_KERNEL );if (ret) {usb_unanchor_urb (urb); +usb_free_urb (urb); goto error; }
drivers/scsi/bfa/bfad_attr.c +3 -1
@@ -283,8 +283,10 @@ bfad_im_get_stats(struct Scsi_Host *shost) rc =bfa_port_get_stats (BFA_FCPORT (&bfad->bfa), fcstats, bfad_hcb_comp, &fcomp);spin_unlock_irqrestore (&bfad->bfad_lock, flags); -if (rc !=BFA_STATUS_OK ) +if (rc !=BFA_STATUS_OK ) { +kfree (fcstats);return NULL ; + }wait_for_completion (&fcomp.comp);
drivers/staging/comedi/drivers/adv_pci1710.c +2 -2
@@ -45,8 +45,8 @@#define PCI171X_RANGE_UNI BIT(4)#define PCI171X_RANGE_GAIN (x) (((x) & 0x7) << 0)#define PCI171X_MUX_REG 0x04/* W: A/D multiplexor control */ -#define PCI171X_MUX_CHANH (x) (((x) & 0xf) << 8) -#define PCI171X_MUX_CHANL (x) (((x) & 0xf) << 0) +#define PCI171X_MUX_CHANH (x) (((x) & 0xff) << 8) +#define PCI171X_MUX_CHANL (x) (((x) & 0xff) << 0)#define PCI171X_MUX_CHAN (x) (PCI171X_MUX_CHANH(x) | PCI171X_MUX_CHANL(x))#define PCI171X_STATUS_REG 0x06/* R: status register */ #define PCI171X_STATUS_IRQ BIT(11)/* 1=IRQ occurred */
drivers/staging/rtl8188eu/os_dep/usb_intf.c +1 -0
@@ -45,6 +45,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = { {USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */ {USB_DEVICE(0x2001, 0x331B)}, /* D-Link DWA-121 rev B1 */ {USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */ + {USB_DEVICE(0x2357, 0x0111)}, /* TP-Link TL-WN727N v5.21 */ {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0xffef)}, /* Rosewill RNX-N150NUB */ {} /* Terminating entry */
drivers/staging/vt6656/device.h +1 -0
@@ -269,6 +269,7 @@ struct vnt_private {u8 mac_hw;/* netdev */ struct usb_device *usb; +struct usb_interface *intf;u64 tsf_time;u8 rx_rate;
drivers/staging/vt6656/main_usb.c +1 -0
@@ -972,6 +972,7 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id) priv = hw->priv; priv->hw = hw; priv->usb = udev; + priv->intf = intf;vnt_set_options (priv);
drivers/staging/vt6656/wcmd.c +1 -0
@@ -110,6 +110,7 @@ void vnt_run_command(struct work_struct *work)if (vnt_init (priv)) {/* If fail all ends TODO retry */ dev_err (&priv->usb->dev,"failed to start\n" ); +usb_set_intfdata (priv->intf,NULL );ieee80211_free_hw (priv->hw);return ; }
drivers/tty/serial/serial_core.c +1 -0
@@ -2795,6 +2795,7 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)if (uport->cons && uport->dev)of_console_check (uport->dev->of_node, uport->cons->name, uport->line); +tty_port_link_device (port, drv->tty_driver, uport->line);uart_configure_port (drv, state, uport); port->console =uart_console (uport);
drivers/usb/chipidea/host.c +3 -1
@@ -37,6 +37,7 @@ static int (*orig_bus_suspend)(struct usb_hcd *hcd);struct ehci_ci_priv {struct regulator *reg_vbus; +bool enabled; };static int ehci_ci_portpower (struct usb_hcd *hcd,int portnum,bool enable)
@@ -48,7 +49,7 @@ static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable)int ret =0 ;int port =HCS_N_PORTS (ehci->hcs_params); -if (priv->reg_vbus) { +if (priv->reg_vbus && enable != priv->enabled) {if (port >1 ) {dev_warn (dev,"Not support multi-port regulator control\n" );
@@ -64,6 +65,7 @@ static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable) enable ? "enable" : "disable", ret);return ret; } + priv->enabled = enable; }if (enable && (ci->platdata->phy_mode ==USBPHY_INTERFACE_MODE_HSIC )) {
drivers/usb/core/config.c +8 -4
@@ -387,12 +387,16 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, endpoint->desc.wMaxPacketSize =cpu_to_le16 (8 ); } -/* Validate the wMaxPacketSize field */ +/* +* Validate the wMaxPacketSize field. +* Some devices have isochronous endpoints in altsetting 0; +* the USB-2 spec requires such endpoints to have wMaxPacketSize = 0 +* (see the end of section 5.6.3), so don't warn about them. +*/ maxp =usb_endpoint_maxp (&endpoint->desc); -if (maxp ==0 ) { -dev_warn (ddev,"config %d interface %d altsetting %d endpoint 0x%X has wMaxPacketSize 0, skipping\n" , +if (maxp ==0 && !(usb_endpoint_xfer_isoc (d) && asnum ==0 )) { +dev_warn (ddev,"config %d interface %d altsetting %d endpoint 0x%X has invalid wMaxPacketSize 0\n" , cfgno, inum, asnum, d->bEndpointAddress); - goto skip_to_next_endpoint_or_interface_descriptor; }/* Find the highest legal maxpacket size for this endpoint */
drivers/usb/musb/musb_core.c +11 -0
@@ -1832,6 +1832,9 @@ static const struct attribute_group musb_attr_group = {#define MUSB_QUIRK_B_INVALID_VBUS_91 (MUSB_DEVCTL_BDEVICE | \ (2 << MUSB_DEVCTL_VBUS_SHIFT) | \ MUSB_DEVCTL_SESSION) +#define MUSB_QUIRK_B_DISCONNECT_99 (MUSB_DEVCTL_BDEVICE | \ + (3 << MUSB_DEVCTL_VBUS_SHIFT) | \ + MUSB_DEVCTL_SESSION)#define MUSB_QUIRK_A_DISCONNECT_19 ((3 << MUSB_DEVCTL_VBUS_SHIFT) | \ MUSB_DEVCTL_SESSION)
@@ -1854,6 +1857,11 @@ static void musb_pm_runtime_check_session(struct musb *musb) s =MUSB_DEVCTL_FSDEV |MUSB_DEVCTL_LSDEV |MUSB_DEVCTL_HR ;switch (devctl & ~s) { +case MUSB_QUIRK_B_DISCONNECT_99 : +musb_dbg (musb,"Poll devctl in case of suspend after disconnect\n" ); +schedule_delayed_work (&musb->irq_work, +msecs_to_jiffies (1000 )); +break ;case MUSB_QUIRK_B_INVALID_VBUS_91 :if (musb->quirk_retries--) { musb_dbg(musb,
@@ -2309,6 +2317,9 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)musb_platform_disable (musb);musb_generic_disable (musb); +/* MUSB_POWER_SOFTCONN might be already set, JZ4740 does this. */ +musb_writeb (musb->mregs,MUSB_POWER ,0 ); +/* Init IRQ workqueue before request_irq */ INIT_DELAYED_WORK (&musb->irq_work, musb_irq_work);INIT_DELAYED_WORK (&musb->deassert_reset_work, musb_deassert_reset);
drivers/usb/musb/musbhsdma.c +1 -1
@@ -399,7 +399,7 @@ struct dma_controller *musbhs_dma_controller_create(struct musb *musb, controller->controller.channel_abort = dma_channel_abort;if (request_irq (irq, dma_controller_irq,0 , -dev_name (musb->controller), &controller->controller)) { +dev_name (musb->controller), controller)) {dev_err (dev,"request_irq %d failed!\n" , irq);musb_dma_controller_destroy (&controller->controller);
drivers/usb/serial/option.c +8 -0
@@ -566,6 +566,9 @@ static void option_instat_callback(struct urb *urb);/* Interface is reserved */ #define RSVD (ifnum) ((BIT(ifnum) & 0xff) << 0) +/* Device needs ZLP */ +#define ZLP BIT(17) +static const struct usb_device_id option_ids[] = { {USB_DEVICE (OPTION_VENDOR_ID ,OPTION_PRODUCT_COLT ) },
@@ -1193,6 +1196,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(1) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1901, 0xff), /* Telit LN940 (MBIM) */ .driver_info = NCTRL(0) }, + { USB_DEVICE(TELIT_VENDOR_ID, 0x9010), /* Telit SBL FN980 flashing device */ + .driver_info = NCTRL(0) | ZLP }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff), .driver_info = RSVD(1) },
@@ -2097,6 +2102,9 @@ static int option_attach(struct usb_serial *serial)if (!(device_flags &NCTRL (iface_desc->bInterfaceNumber))) data->use_send_setup =1 ; +if (device_flags &ZLP ) + data->use_zlp =1 ; +spin_lock_init (&data->susp_lock);usb_set_serial_data (serial, data);
drivers/usb/serial/usb-wwan.h +1 -0
@@ -35,6 +35,7 @@ struct usb_wwan_intf_private {spinlock_t susp_lock; unsigned int suspended:1; unsigned int use_send_setup:1; + unsigned int use_zlp:1;int in_flight;unsigned int open_ports;void *private;
drivers/usb/serial/usb_wwan.c +4 -0
@@ -495,6 +495,7 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port, void (*callback) (struct urb *)) {struct usb_serial *serial = port->serial; +struct usb_wwan_intf_private *intfdata =usb_get_serial_data (serial);struct urb *urb; urb =usb_alloc_urb (0 ,GFP_KERNEL );/* No ISO */
@@ -505,6 +506,9 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,usb_sndbulkpipe (serial->dev, endpoint) | dir, buf, len, callback, ctx); +if (intfdata->use_zlp && dir ==USB_DIR_OUT ) + urb->transfer_flags |=URB_ZERO_PACKET ; +return urb; }
fs/char_dev.c +1 -1
@@ -336,7 +336,7 @@ static struct kobject *cdev_get(struct cdev *p)if (owner && !try_module_get (owner))return NULL ; - kobj =kobject_get (&p->kobj); + kobj =kobject_get_unless_zero (&p->kobj);if (!kobj)module_put (owner);return kobj;
include/linux/can/dev.h +34 -0
@@ -17,6 +17,7 @@#include <linux/can/error.h> #include <linux/can/led.h> #include <linux/can/netlink.h> +#include <linux/can/skb.h> #include <linux/netdevice.h> /*
@@ -81,6 +82,36 @@ struct can_priv {#define get_can_dlc (i) (min_t(__u8, (i), CAN_MAX_DLC))#define get_canfd_dlc (i) (min_t(__u8, (i), CANFD_MAX_DLC)) +/* Check for outgoing skbs that have not been created by the CAN subsystem */ +static inline bool can_skb_headroom_valid (struct net_device *dev, +struct sk_buff *skb) +{ +/* af_packet creates a headroom of HH_DATA_MOD bytes which is fine */ +if (WARN_ON_ONCE (skb_headroom (skb) <sizeof (struct can_skb_priv ))) +return false; + +/* af_packet does not apply CAN skb specific settings */ +if (skb->ip_summed ==CHECKSUM_NONE ) { +/* init headroom */ +can_skb_prv (skb)->ifindex = dev->ifindex; +can_skb_prv (skb)->skbcnt =0 ; + + skb->ip_summed =CHECKSUM_UNNECESSARY ; + +/* preform proper loopback on capable devices */ +if (dev->flags &IFF_ECHO ) + skb->pkt_type =PACKET_LOOPBACK ; +else + skb->pkt_type =PACKET_HOST ; + +skb_reset_mac_header (skb); +skb_reset_network_header (skb); +skb_reset_transport_header (skb); + } + +return true; +} +/* Drop a given socketbuffer if it does not contain a valid CAN frame. */ static inline bool can_dropped_invalid_skb (struct net_device *dev,struct sk_buff *skb)
@@ -98,6 +129,9 @@ static inline bool can_dropped_invalid_skb(struct net_device *dev, }else goto inval_skb; +if (!can_skb_headroom_valid (dev, skb)) + goto inval_skb; +return false; inval_skb:
include/linux/kobject.h +2 -0
@@ -108,6 +108,8 @@ extern int __must_check kobject_rename(struct kobject *, const char *new_name);extern int __must_check kobject_move (struct kobject *,struct kobject *);extern struct kobject *kobject_get (struct kobject *kobj); +extern struct kobject *__must_check kobject_get_unless_zero ( +struct kobject *kobj);extern void kobject_put (struct kobject *kobj);extern const void *kobject_namespace (struct kobject *kobj);
kernel/trace/trace_sched_wakeup.c +3 -1
@@ -625,7 +625,7 @@ static void start_wakeup_tracer(struct trace_array *tr)if (ret) {pr_info ("wakeup trace: Couldn't activate tracepoint" " probe to kernel_sched_migrate_task\n" ); -return ; + goto fail_deprobe_sched_switch; }wakeup_reset (tr);
@@ -643,6 +643,8 @@ static void start_wakeup_tracer(struct trace_array *tr)printk (KERN_ERR "failed to start wakeup tracer\n" );return ; +fail_deprobe_sched_switch: +unregister_trace_sched_switch (probe_wakeup_sched_switch,NULL ); fail_deprobe_wake_new:unregister_trace_sched_wakeup_new (probe_wakeup,NULL ); fail_deprobe:
kernel/trace/trace_stack.c +5 -0
@@ -201,6 +201,11 @@ check_stack(unsigned long ip, unsigned long *stack)local_irq_restore (flags); } +/* Some archs may not define MCOUNT_INSN_SIZE */ +#ifndef MCOUNT_INSN_SIZE +# define MCOUNT_INSN_SIZE 0 +#endif +static void stack_trace_call (unsigned long ip,unsigned long parent_ip,struct ftrace_ops *op,struct pt_regs *pt_regs)
lib/kobject.c +4 -1
@@ -599,12 +599,15 @@ struct kobject *kobject_get(struct kobject *kobj) }EXPORT_SYMBOL (kobject_get); -static struct kobject *__must_check kobject_get_unless_zero (struct kobject *kobj) +struct kobject *__must_check kobject_get_unless_zero (struct kobject *kobj) { +if (!kobj) +return NULL ;if (!kref_get_unless_zero (&kobj->kref)) kobj =NULL ;return kobj; } +EXPORT_SYMBOL (kobject_get_unless_zero);/* * kobject_cleanup - free kobject resources.
net/ipv4/netfilter/arp_tables.c +16 -11
@@ -403,10 +403,11 @@ next: ;return 1 ; } -static inline int check_target (struct arpt_entry *e,const char *name) +static int check_target (struct arpt_entry *e,struct net *net,const char *name) {struct xt_entry_target *t =arpt_get_target (e);struct xt_tgchk_param par = { + .net = net, .table = name, .entryinfo = e, .target = t->u.kernel.target,
@@ -418,8 +419,9 @@ static inline int check_target(struct arpt_entry *e, const char *name)return xt_check_target (&par, t->u.target_size -sizeof (*t),0 , false); } -static inline int -find_check_entry (struct arpt_entry *e,const char *name,unsigned int size, +static int +find_check_entry (struct arpt_entry *e,struct net *net,const char *name, +unsigned int size,struct xt_percpu_counter_alloc_state *alloc_state) {struct xt_entry_target *t;
@@ -438,7 +440,7 @@ find_check_entry(struct arpt_entry *e, const char *name, unsigned int size, } t->u.kernel.target = target; - ret =check_target (e, name); + ret =check_target (e, net, name);if (ret) goto err;return 0 ;
@@ -531,7 +533,9 @@ static inline void cleanup_entry(struct arpt_entry *e)/* Checks and translates the user-supplied table segment (held in * newinfo). */ -static int translate_table (struct xt_table_info *newinfo,void *entry0, +static int translate_table (struct net *net, +struct xt_table_info *newinfo, +void *entry0,const struct arpt_replace *repl) {struct xt_percpu_counter_alloc_state alloc_state = {0 };
@@ -597,7 +601,7 @@ static int translate_table(struct xt_table_info *newinfo, void *entry0,/* Finally, each sanity check must pass */ i =0 ; xt_entry_foreach(iter, entry0, newinfo->size) { - ret =find_check_entry (iter, repl->name, repl->size, + ret =find_check_entry (iter, net, repl->name, repl->size, &alloc_state);if (ret !=0 )break ;
@@ -987,7 +991,7 @@ static int do_replace(struct net *net, const void __user *user, goto free_newinfo; } - ret =translate_table (newinfo, loc_cpu_entry, &tmp); + ret =translate_table (net, newinfo, loc_cpu_entry, &tmp);if (ret !=0 ) goto free_newinfo;
@@ -1164,7 +1168,8 @@ compat_copy_entry_from_user(struct compat_arpt_entry *e, void **dstptr, } } -static int translate_compat_table (struct xt_table_info **pinfo, +static int translate_compat_table (struct net *net, +struct xt_table_info **pinfo,void **pentry0,const struct compat_arpt_replace *compatr) {
@@ -1230,7 +1235,7 @@ static int translate_compat_table(struct xt_table_info **pinfo, repl.num_counters =0 ; repl.counters =NULL ; repl.size = newinfo->size; - ret =translate_table (newinfo, entry1, &repl); + ret =translate_table (net, newinfo, entry1, &repl);if (ret) goto free_newinfo;
@@ -1283,7 +1288,7 @@ static int compat_do_replace(struct net *net, void __user *user, goto free_newinfo; } - ret =translate_compat_table (&newinfo, &loc_cpu_entry, &tmp); + ret =translate_compat_table (net, &newinfo, &loc_cpu_entry, &tmp);if (ret !=0 ) goto free_newinfo;
@@ -1559,7 +1564,7 @@ int arpt_register_table(struct net *net, loc_cpu_entry = newinfo->entries;memcpy (loc_cpu_entry, repl->entries, repl->size); - ret =translate_table (newinfo, loc_cpu_entry, repl); + ret =translate_table (net, newinfo, loc_cpu_entry, repl);if (ret !=0 ) goto out_free;
net/ipv4/tcp_input.c +9 -5
@@ -129,7 +129,8 @@ int sysctl_tcp_invalid_ratelimit __read_mostly = HZ/2;#define REXMIT_LOST 1/* retransmit packets marked lost */ #define REXMIT_NEW 2/* FRTO-style transmit of unsent/new packets */ -static void tcp_gro_dev_warn (struct sock *sk,const struct sk_buff *skb) +static void tcp_gro_dev_warn (struct sock *sk,const struct sk_buff *skb, +unsigned int len) {static bool __once__read_mostly ;
@@ -140,8 +141,9 @@ static void tcp_gro_dev_warn(struct sock *sk, const struct sk_buff *skb)rcu_read_lock (); dev =dev_get_by_index_rcu (sock_net (sk), skb->skb_iif); -pr_warn ("%s: Driver has suspect GRO implementation, TCP performance may be compromised.\n" , - dev ? dev->name :"Unknown driver" ); +if (!dev || len >= dev->mtu) +pr_warn ("%s: Driver has suspect GRO implementation, TCP performance may be compromised.\n" , + dev ? dev->name :"Unknown driver" );rcu_read_unlock (); } }
@@ -164,8 +166,10 @@ static void tcp_measure_rcv_mss(struct sock *sk, const struct sk_buff *skb)if (len >= icsk->icsk_ack.rcv_mss) { icsk->icsk_ack.rcv_mss = min_t(unsigned int, len,tcp_sk (sk)->advmss); -if (unlikely (icsk->icsk_ack.rcv_mss != len)) -tcp_gro_dev_warn (sk, skb); +/* Account for possibly-removed options */ +if (unlikely (len > icsk->icsk_ack.rcv_mss + +MAX_TCP_OPTION_SPACE )) +tcp_gro_dev_warn (sk, skb, len); }else {/* Otherwise, we make more careful check taking into account, * that SACKs block is variable.
net/netfilter/ipset/ip_set_core.c +2 -1
@@ -1634,6 +1634,7 @@ static int ip_set_utest(struct net *net, struct sock *ctnl, struct sk_buff *skb,struct ip_set *set;struct nlattr *tb[IPSET_ATTR_ADT_MAX +1 ] = {};int ret =0 ; +u32 lineno; if (unlikely(protocol_failed(attr) || !attr[IPSET_ATTR_SETNAME] ||
@@ -1650,7 +1651,7 @@ static int ip_set_utest(struct net *net, struct sock *ctnl, struct sk_buff *skb,return -IPSET_ERR_PROTOCOL ;rcu_read_lock_bh (); - ret = set->variant->uadt (set, tb,IPSET_TEST ,NULL ,0 ,0 ); + ret = set->variant->uadt (set, tb,IPSET_TEST , &lineno,0 ,0 );rcu_read_unlock_bh ();/* Userspace can't trigger element to be re-added */ if (ret == -EAGAIN )
sound/usb/quirks.c +1 -0
@@ -1141,6 +1141,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)case USB_ID (0x04D8 ,0xFEEA ):/* Benchmark DAC1 Pre */ case USB_ID (0x0556 ,0x0014 ):/* Phoenix Audio TMX320VC */ case USB_ID (0x05A3 ,0x9420 ):/* ELP HD USB Camera */ +case USB_ID (0x05a7 ,0x1020 ):/* Bose Companion 5 */ case USB_ID (0x074D ,0x3553 ):/* Outlaw RR2150 (Micronas UAC3553B) */ case USB_ID (0x1395 ,0x740a ):/* Sennheiser DECT */ case USB_ID (0x1901 ,0x0191 ):/* GE B850V3 CP2114 audio interface */