Linux 4.14.255
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.255 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.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 arch/arc/include/asm/pgtable.h | 2 arch/arm/include/asm/pgtable-2level.h | 2 arch/arm/include/asm/pgtable-3level.h | 2 arch/mips/include/asm/pgtable-32.h | 3 arch/powerpc/include/asm/pte-common.h | 2 arch/x86/include/asm/pgtable-3level_types.h | 1 arch/x86/include/asm/pgtable_64_types.h | 2 arch/x86/kvm/ioapic.c | 2 arch/x86/kvm/ioapic.h | 4 drivers/amba/bus.c | 3 drivers/infiniband/hw/qib/qib_user_sdma.c | 35 ++++++-- drivers/media/firewire/firedtv-avc.c | 14 ++- drivers/media/firewire/firedtv-ci.c | 2 drivers/net/wireless/rsi/rsi_91x_usb.c | 2 drivers/scsi/scsi.c | 4 drivers/scsi/scsi_sysfs.c | 9 ++ drivers/staging/comedi/drivers/dt9812.c | 115 ++++++++++++++++++++-------- drivers/staging/comedi/drivers/ni_usb6501.c | 10 ++ drivers/staging/comedi/drivers/vmk80xx.c | 28 +++--- drivers/staging/rtl8192u/r8192U_core.c | 18 ++-- drivers/staging/rtl8712/usb_ops_linux.c | 2 drivers/usb/gadget/udc/Kconfig | 1 drivers/usb/musb/musb_gadget.c | 4 drivers/usb/storage/unusual_devs.h | 10 ++ fs/isofs/inode.c | 2 include/asm-generic/pgtable.h | 13 +++ include/linux/bvec.h | 30 ++++++- kernel/printk/printk.c | 9 +- mm/zsmalloc.c | 13 +-- 30 files changed, 261 insertions(+), 85 deletions(-)
Arnd Bergmann (1):
arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed
Dan Carpenter (1):
media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt()
Geert Uytterhoeven (1):
usb: gadget: Mark USB_FSL_QE broken on 64-bit
Greg Kroah-Hartman (1):
Linux 4.14.255
Gustavo A. R. Silva (1):
IB/qib: Use struct_size() helper
James Buren (1):
usb-storage: Add compatibility quirk flags for iODD 2531/2541
Jan Kara (1):
isofs: Fix out of bound access for corrupted isofs image
Johan Hovold (8):
comedi: dt9812: fix DMA buffers on stack
comedi: ni_usb6501: fix NULL-deref in command paths
comedi: vmk80xx: fix transfer-buffer overflows
comedi: vmk80xx: fix bulk-buffer overflow
comedi: vmk80xx: fix bulk and interrupt message timeouts
staging: r8712u: fix control-message timeout
staging: rtl8192u: fix control-message timeouts
rsi: fix control-message timeout
Juergen Gross (1):
Revert "x86/kvm: fix vcpu-id indexed array sizes"
Kirill A. Shutemov (1):
mm/zsmalloc: Prepare to variable MAX_PHYSMEM_BITS
Mike Marciniszyn (1):
IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields
Ming Lei (2):
scsi: core: Put LLD module refcnt after SCSI device is released
block: introduce multi-page bvec helpers
Petr Mladek (1):
printk/console: Allow to disable console output by using console="" or console=null
Viraj Shah (1):
usb: musb: Balance list entry in musb_gadget_queue
Wang Kefeng (1):
ARM: 9120/1: Revert "amba: make use of -1 IRQs warn"
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 254 +SUBLEVEL = 255 EXTRAVERSION = NAME = Petit Gorille
arch/arc/include/asm/pgtable.h +2 -0
@@ -138,8 +138,10 @@#ifdef CONFIG_ARC_HAS_PAE40 #define PTE_BITS_NON_RWX_IN_PD1 (0xff00000000 | PAGE_MASK | _PAGE_CACHEABLE) +#define MAX_POSSIBLE_PHYSMEM_BITS 40#else #define PTE_BITS_NON_RWX_IN_PD1 (PAGE_MASK | _PAGE_CACHEABLE) +#define MAX_POSSIBLE_PHYSMEM_BITS 32#endif /**************************************************************************
arch/arm/include/asm/pgtable-2level.h +2 -0
@@ -78,6 +78,8 @@#define PTE_HWTABLE_OFF (PTE_HWTABLE_PTRS * sizeof(pte_t))#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u32)) +#define MAX_POSSIBLE_PHYSMEM_BITS 32 +/* * PMD_SHIFT determines the size of the area a second-level page table can map * PGDIR_SHIFT determines what a third-level page table entry can map
arch/arm/include/asm/pgtable-3level.h +2 -0
@@ -37,6 +37,8 @@#define PTE_HWTABLE_OFF (0)#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u64)) +#define MAX_POSSIBLE_PHYSMEM_BITS 40 +/* * PGDIR_SHIFT determines the size a top-level page table entry can map. */
arch/mips/include/asm/pgtable-32.h +3 -0
@@ -111,6 +111,7 @@ static inline void pmd_clear(pmd_t *pmdp)#if defined(CONFIG_XPA ) +#define MAX_POSSIBLE_PHYSMEM_BITS 40#define pte_pfn (x) (((unsigned long)((x).pte_high >> _PFN_SHIFT)) | (unsigned long)((x).pte_low << _PAGE_PRESENT_SHIFT))static inline pte_t pfn_pte (unsigned long pfn,pgprot_t prot)
@@ -126,6 +127,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot)#elif defined(CONFIG_PHYS_ADDR_T_64BIT ) && defined(CONFIG_CPU_MIPS32 ) +#define MAX_POSSIBLE_PHYSMEM_BITS 36#define pte_pfn (x) ((unsigned long)((x).pte_high >> 6))static inline pte_t pfn_pte (unsigned long pfn,pgprot_t prot)
@@ -140,6 +142,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot)#else +#define MAX_POSSIBLE_PHYSMEM_BITS 32#ifdef CONFIG_CPU_VR41XX #define pte_pfn (x) ((unsigned long)((x).pte >> (PAGE_SHIFT + 2)))#define pfn_pte (pfn, prot) __pte(((pfn) << (PAGE_SHIFT + 2)) | pgprot_val(prot))
arch/powerpc/include/asm/pte-common.h +2 -0
@@ -102,8 +102,10 @@ static inline bool pte_user(pte_t pte)*/ #if defined(CONFIG_PPC32 ) && defined(CONFIG_PTE_64BIT )#define PTE_RPN_MASK (~((1ULL<<PTE_RPN_SHIFT)-1)) +#define MAX_POSSIBLE_PHYSMEM_BITS 36#else #define PTE_RPN_MASK (~((1UL<<PTE_RPN_SHIFT)-1)) +#define MAX_POSSIBLE_PHYSMEM_BITS 32#endif /* _PAGE_CHG_MASK masks of bits that are to be preserved across
arch/x86/include/asm/pgtable-3level_types.h +1 -0
@@ -44,5 +44,6 @@ typedef union {*/ #define PTRS_PER_PTE 512 +#define MAX_POSSIBLE_PHYSMEM_BITS 36#endif /* _ASM_X86_PGTABLE_3LEVEL_DEFS_H */
arch/x86/include/asm/pgtable_64_types.h +2 -0
@@ -40,6 +40,8 @@ typedef struct { pteval_t pte; } pte_t;#define P4D_SIZE (_AC(1, UL) << P4D_SHIFT)#define P4D_MASK (~(P4D_SIZE - 1)) +#define MAX_POSSIBLE_PHYSMEM_BITS 52 +#else /* CONFIG_X86_5LEVEL */ /*
arch/x86/kvm/ioapic.c +1 -1
@@ -96,7 +96,7 @@ static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,static void rtc_irq_eoi_tracking_reset (struct kvm_ioapic *ioapic) { ioapic->rtc_status.pending_eoi =0 ; -bitmap_zero (ioapic->rtc_status.dest_map.map,KVM_MAX_VCPU_ID +1 ); +bitmap_zero (ioapic->rtc_status.dest_map.map,KVM_MAX_VCPU_ID ); }static void kvm_rtc_eoi_tracking_restore_all (struct kvm_ioapic *ioapic);
arch/x86/kvm/ioapic.h +2 -2
@@ -43,13 +43,13 @@ struct kvm_vcpu;struct dest_map {/* vcpu bitmap where IRQ has been sent */ - DECLARE_BITMAP(map, KVM_MAX_VCPU_ID + 1); + DECLARE_BITMAP(map, KVM_MAX_VCPU_ID);/* * Vector sent to a given vcpu, only valid when * the vcpu's bit in map is set */ -u8 vectors[KVM_MAX_VCPU_ID +1 ]; +u8 vectors[KVM_MAX_VCPU_ID ]; };
drivers/amba/bus.c +0 -3
@@ -355,9 +355,6 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent)void __iomem *tmp;int i, ret; -WARN_ON (dev->irq[0 ] == (unsigned int )-1 ); -WARN_ON (dev->irq[1 ] == (unsigned int )-1 ); - ret =request_resource (parent, &dev->res);if (ret) goto err_out;
drivers/infiniband/hw/qib/qib_user_sdma.c +25 -10
@@ -41,6 +41,7 @@#include <linux/rbtree.h> #include <linux/spinlock.h> #include <linux/delay.h> +#include <linux/overflow.h> #include "qib.h" #include "qib_user_sdma.h"
@@ -606,7 +607,7 @@ static int qib_user_sdma_coalesce(const struct qib_devdata *dd,/* * How many pages in this iovec element? */ -static int qib_user_sdma_num_pages (const struct iovec *iov) +static size_t qib_user_sdma_num_pages (const struct iovec *iov) {const unsigned long addr = (unsigned long ) iov->iov_base;const unsigned long len = iov->iov_len;
@@ -662,7 +663,7 @@ static void qib_user_sdma_free_pkt_frag(struct device *dev,static int qib_user_sdma_pin_pages (const struct qib_devdata *dd,struct qib_user_sdma_queue *pq,struct qib_user_sdma_pkt *pkt, -unsigned long addr,int tlen,int npages) +unsigned long addr,int tlen,size_t npages) {struct page *pages[8 ];int i, j;
@@ -726,7 +727,7 @@ static int qib_user_sdma_pin_pkt(const struct qib_devdata *dd,unsigned long idx;for (idx =0 ; idx < niov; idx++) { -const int npages =qib_user_sdma_num_pages (iov + idx); +const size_t npages =qib_user_sdma_num_pages (iov + idx);const unsigned long addr = (unsigned long ) iov[idx].iov_base; ret = qib_user_sdma_pin_pages(dd, pq, pkt, addr,
@@ -828,8 +829,8 @@ static int qib_user_sdma_queue_pkts(const struct qib_devdata *dd,unsigned pktnw;unsigned pktnwc;int nfrags =0 ; -int npages =0 ; -int bytes_togo =0 ; +size_t npages =0 ; +size_t bytes_togo =0 ;int tiddma =0 ;int cfur;
@@ -889,7 +890,11 @@ static int qib_user_sdma_queue_pkts(const struct qib_devdata *dd, npages +=qib_user_sdma_num_pages (&iov[idx]); - bytes_togo += slen; +if (check_add_overflow (bytes_togo, slen, &bytes_togo) || + bytes_togo >type_max (typeof (pkt->bytes_togo))) { + ret = -EINVAL ; + goto free_pbc; + } pktnwc += slen >>2 ; idx++; nfrags++;
@@ -908,10 +913,10 @@ static int qib_user_sdma_queue_pkts(const struct qib_devdata *dd, }if (frag_size) { -int pktsize, tidsmsize, n; +size_t tidsmsize, n, pktsize, sz, addrlimit; n = npages*((2 *PAGE_SIZE /frag_size)+1 ); - pktsize =sizeof (*pkt) +sizeof (pkt->addr[0 ])*n; + pktsize =struct_size (pkt, addr, n);/* * Determine if this is tid-sdma or just sdma.
@@ -926,14 +931,24 @@ static int qib_user_sdma_queue_pkts(const struct qib_devdata *dd,else tidsmsize =0 ; - pkt =kmalloc (pktsize+tidsmsize,GFP_KERNEL ); +if (check_add_overflow (pktsize, tidsmsize, &sz)) { + ret = -EINVAL ; + goto free_pbc; + } + pkt =kmalloc (sz,GFP_KERNEL );if (!pkt) { ret = -ENOMEM ; goto free_pbc; } pkt->largepkt =1 ; pkt->frag_size = frag_size; - pkt->addrlimit = n +ARRAY_SIZE (pkt->addr); +if (check_add_overflow (n,ARRAY_SIZE (pkt->addr), + &addrlimit) || + addrlimit >type_max (typeof (pkt->addrlimit))) { + ret = -EINVAL ; + goto free_pbc; + } + pkt->addrlimit = addrlimit;if (tiddma) {char *tidsm = (char *)pkt + pktsize;
drivers/media/firewire/firedtv-avc.c +11 -3
@@ -1169,7 +1169,11 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) read_pos += program_info_length; write_pos += program_info_length; } -while (read_pos < length) { +while (read_pos +4 < length) { +if (write_pos +4 >=sizeof (c->operand) -4 ) { + ret = -EINVAL ; + goto out; + } c->operand[write_pos++] = msg[read_pos++]; c->operand[write_pos++] = msg[read_pos++]; c->operand[write_pos++] = msg[read_pos++];
@@ -1181,13 +1185,17 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) c->operand[write_pos++] = es_info_length >>8 ; c->operand[write_pos++] = es_info_length &0xff ;if (es_info_length >0 ) { +if (read_pos >= length) { + ret = -EINVAL ; + goto out; + } pmt_cmd_id = msg[read_pos++];if (pmt_cmd_id !=1 && pmt_cmd_id !=4 )dev_err (fdtv->device,"invalid pmt_cmd_id %d at stream level\n" , pmt_cmd_id); -if (es_info_length >sizeof (c->operand) -4 - - write_pos) { +if (es_info_length >sizeof (c->operand) -4 - write_pos || + es_info_length > length - read_pos) { ret = -EINVAL ; goto out; }
drivers/media/firewire/firedtv-ci.c +2 -0
@@ -138,6 +138,8 @@ static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg) }else { data_length = msg->msg[3 ]; } +if (data_length >sizeof (msg->msg) - data_pos) +return -EINVAL ;return avc_ca_pmt (fdtv, &msg->msg[data_pos], data_length); }
drivers/net/wireless/rsi/rsi_91x_usb.c +1 -1
@@ -48,7 +48,7 @@ static int rsi_usb_card_write(struct rsi_hw *adapter, (void *)seg, (int )len, &transfer, - HZ * 5); + USB_CTRL_SET_TIMEOUT);if (status <0 ) { rsi_dbg(ERR_ZONE,
drivers/scsi/scsi.c +3 -1
@@ -575,8 +575,10 @@ EXPORT_SYMBOL(scsi_device_get);*/ void scsi_device_put (struct scsi_device *sdev) { -module_put (sdev->host->hostt->module); +struct module *mod = sdev->host->hostt->module; +put_device (&sdev->sdev_gendev); +module_put (mod); }EXPORT_SYMBOL (scsi_device_put);
drivers/scsi/scsi_sysfs.c +9 -0
@@ -430,9 +430,12 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)struct list_head *this, *tmp;struct scsi_vpd *vpd_pg80 =NULL , *vpd_pg83 =NULL ;unsigned long flags; +struct module *mod; sdev = container_of(work, struct scsi_device, ew.work); + mod = sdev->host->hostt->module; +scsi_dh_release_device (sdev); parent = sdev->sdev_gendev.parent;
@@ -473,11 +476,17 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)if (parent)put_device (parent); +module_put (mod); }static void scsi_device_dev_release (struct device *dev) {struct scsi_device *sdp =to_scsi_device (dev); + +/* Set module pointer as NULL in case of module unloading */ +if (!try_module_get (sdp->host->hostt->module)) + sdp->host->hostt->module =NULL ; +execute_in_process_context (scsi_device_dev_release_usercontext, &sdp->ew); }
drivers/staging/comedi/drivers/dt9812.c +86 -29
172 lines not on this page · raw message
drivers/staging/comedi/drivers/ni_usb6501.c +10 -0
@@ -153,6 +153,10 @@ static const u8 READ_COUNTER_RESPONSE[] = {0x00, 0x01, 0x00, 0x10,0x00 ,0x00 ,0x00 ,0x02 , 0x00, 0x00, 0x00, 0x00}; +/* Largest supported packets */ +static const size_t TX_MAX_SIZE =sizeof (SET_PORT_DIR_REQUEST ); +static const size_t RX_MAX_SIZE =sizeof (READ_PORT_RESPONSE ); +enum commands {READ_PORT , WRITE_PORT,
@@ -510,6 +514,12 @@ static int ni6501_find_endpoints(struct comedi_device *dev)if (!devpriv->ep_rx || !devpriv->ep_tx)return -ENODEV ; +if (usb_endpoint_maxp (devpriv->ep_rx) <RX_MAX_SIZE ) +return -ENODEV ; + +if (usb_endpoint_maxp (devpriv->ep_tx) <TX_MAX_SIZE ) +return -ENODEV ; +return 0 ; }
drivers/staging/comedi/drivers/vmk80xx.c +15 -13
@@ -99,6 +99,9 @@ enum {#define IC3_VERSION BIT(0)#define IC6_VERSION BIT(1) +#define MIN_BUF_SIZE 64 +#define PACKET_TIMEOUT 10000/* ms */ +enum vmk80xx_model {VMK8055_MODEL ,VMK8061_MODEL
@@ -166,22 +169,21 @@ static void vmk80xx_do_bulk_msg(struct comedi_device *dev)__u8 rx_addr;unsigned int tx_pipe;unsigned int rx_pipe; -size_t size; +size_t tx_size; +size_t rx_size; tx_addr = devpriv->ep_tx->bEndpointAddress; rx_addr = devpriv->ep_rx->bEndpointAddress; tx_pipe =usb_sndbulkpipe (usb, tx_addr); rx_pipe =usb_rcvbulkpipe (usb, rx_addr); + tx_size =usb_endpoint_maxp (devpriv->ep_tx); + rx_size =usb_endpoint_maxp (devpriv->ep_rx); -/* -* The max packet size attributes of the K8061 -* input/output endpoints are identical -*/ - size =usb_endpoint_maxp (devpriv->ep_tx); +usb_bulk_msg (usb, tx_pipe, devpriv->usb_tx_buf, tx_size,NULL , +PACKET_TIMEOUT ); -usb_bulk_msg (usb, tx_pipe, devpriv->usb_tx_buf, - size,NULL , devpriv->ep_tx->bInterval); -usb_bulk_msg (usb, rx_pipe, devpriv->usb_rx_buf, size,NULL ,HZ *10 ); +usb_bulk_msg (usb, rx_pipe, devpriv->usb_rx_buf, rx_size,NULL , +PACKET_TIMEOUT ); }static int vmk80xx_read_packet (struct comedi_device *dev)
@@ -200,7 +202,7 @@ static int vmk80xx_read_packet(struct comedi_device *dev) pipe =usb_rcvintpipe (usb, ep->bEndpointAddress);return usb_interrupt_msg (usb, pipe, devpriv->usb_rx_buf,usb_endpoint_maxp (ep),NULL , -HZ *10 ); +PACKET_TIMEOUT ); }static int vmk80xx_write_packet (struct comedi_device *dev,int cmd)
@@ -221,7 +223,7 @@ static int vmk80xx_write_packet(struct comedi_device *dev, int cmd) pipe =usb_sndintpipe (usb, ep->bEndpointAddress);return usb_interrupt_msg (usb, pipe, devpriv->usb_tx_buf,usb_endpoint_maxp (ep),NULL , -HZ *10 ); +PACKET_TIMEOUT ); }static int vmk80xx_reset_device (struct comedi_device *dev)
@@ -687,12 +689,12 @@ static int vmk80xx_alloc_usb_buffers(struct comedi_device *dev)struct vmk80xx_private *devpriv = dev->private;size_t size; - size =usb_endpoint_maxp (devpriv->ep_rx); + size =max (usb_endpoint_maxp (devpriv->ep_rx),MIN_BUF_SIZE ); devpriv->usb_rx_buf =kzalloc (size,GFP_KERNEL );if (!devpriv->usb_rx_buf)return -ENOMEM ; - size =usb_endpoint_maxp (devpriv->ep_tx); + size =max (usb_endpoint_maxp (devpriv->ep_rx),MIN_BUF_SIZE ); devpriv->usb_tx_buf =kzalloc (size,GFP_KERNEL );if (!devpriv->usb_tx_buf)return -ENOMEM ;
drivers/staging/rtl8192u/r8192U_core.c +9 -9
@@ -266,7 +266,7 @@ int write_nic_byte_E(struct net_device *dev, int indx, u8 data) status =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),RTL8187_REQ_SET_REGS ,RTL8187_REQT_WRITE , - indx |0xfe00 ,0 , usbdata,1 ,HZ /2 ); + indx |0xfe00 ,0 , usbdata,1 ,500 );kfree (usbdata);if (status <0 ) {
@@ -288,7 +288,7 @@ int read_nic_byte_E(struct net_device *dev, int indx, u8 *data) status =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ),RTL8187_REQ_GET_REGS ,RTL8187_REQT_READ , - indx |0xfe00 ,0 , usbdata,1 ,HZ /2 ); + indx |0xfe00 ,0 , usbdata,1 ,500 ); *data = *usbdata;kfree (usbdata);
@@ -316,7 +316,7 @@ int write_nic_byte(struct net_device *dev, int indx, u8 data) status =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),RTL8187_REQ_SET_REGS ,RTL8187_REQT_WRITE , (indx &0xff ) |0xff00 , (indx >>8 ) &0x0f , - usbdata,1 ,HZ /2 ); + usbdata,1 ,500 );kfree (usbdata);if (status <0 ) {
@@ -343,7 +343,7 @@ int write_nic_word(struct net_device *dev, int indx, u16 data) status =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),RTL8187_REQ_SET_REGS ,RTL8187_REQT_WRITE , (indx &0xff ) |0xff00 , (indx >>8 ) &0x0f , - usbdata,2 ,HZ /2 ); + usbdata,2 ,500 );kfree (usbdata);if (status <0 ) {
@@ -370,7 +370,7 @@ int write_nic_dword(struct net_device *dev, int indx, u32 data) status =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),RTL8187_REQ_SET_REGS ,RTL8187_REQT_WRITE , (indx &0xff ) |0xff00 , (indx >>8 ) &0x0f , - usbdata,4 ,HZ /2 ); + usbdata,4 ,500 );kfree (usbdata);
@@ -397,7 +397,7 @@ int read_nic_byte(struct net_device *dev, int indx, u8 *data) status =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ),RTL8187_REQ_GET_REGS ,RTL8187_REQT_READ , (indx &0xff ) |0xff00 , (indx >>8 ) &0x0f , - usbdata,1 ,HZ /2 ); + usbdata,1 ,500 ); *data = *usbdata;kfree (usbdata);
@@ -424,7 +424,7 @@ int read_nic_word(struct net_device *dev, int indx, u16 *data) status =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ),RTL8187_REQ_GET_REGS ,RTL8187_REQT_READ , (indx &0xff ) |0xff00 , (indx >>8 ) &0x0f , - usbdata,2 ,HZ /2 ); + usbdata,2 ,500 ); *data = *usbdata;kfree (usbdata);
@@ -448,7 +448,7 @@ static int read_nic_word_E(struct net_device *dev, int indx, u16 *data) status =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ),RTL8187_REQ_GET_REGS ,RTL8187_REQT_READ , - indx |0xfe00 ,0 , usbdata,2 ,HZ /2 ); + indx |0xfe00 ,0 , usbdata,2 ,500 ); *data = *usbdata;kfree (usbdata);
@@ -474,7 +474,7 @@ int read_nic_dword(struct net_device *dev, int indx, u32 *data) status =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ),RTL8187_REQ_GET_REGS ,RTL8187_REQT_READ , (indx &0xff ) |0xff00 , (indx >>8 ) &0x0f , - usbdata,4 ,HZ /2 ); + usbdata,4 ,500 ); *data = *usbdata;kfree (usbdata);
drivers/staging/rtl8712/usb_ops_linux.c +1 -1
@@ -505,7 +505,7 @@ int r8712_usbctrl_vendorreq(struct intf_priv *pintfpriv, u8 request, u16 value,memcpy (pIo_buf, pdata, len); } status =usb_control_msg (udev, pipe, request, reqtype, value, index, - pIo_buf, len,HZ /2 ); + pIo_buf, len,500 );if (status >0 ) {/* Success this control transfer. */ if (requesttype ==0x01 ) {/* For Control read transfer, we have to copy the read
drivers/usb/gadget/udc/Kconfig +1 -0
@@ -328,6 +328,7 @@ config USB_AMD5536UDC config USB_FSL_QE tristate "Freescale QE/CPM USB Device Controller" depends on FSL_SOC && (QUICC_ENGINE || CPM) + depends on !64BIT || BROKEN help Some of Freescale PowerPC processors have a Full Speed QE/CPM2 USB controller, which support device mode with 4
drivers/usb/musb/musb_gadget.c +3 -1
@@ -1280,9 +1280,11 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req, status =musb_queue_resume_work (musb, musb_ep_restart_resume_work, request); -if (status <0 ) +if (status <0 ) {dev_err (musb->controller,"%s resume work: %i\n" , __func__, status); +list_del (&request->list); + } } unlock:
drivers/usb/storage/unusual_devs.h +10 -0
@@ -425,6 +425,16 @@ UNUSUAL_DEV( 0x04b8, 0x0602, 0x0110, 0x0110, "785EPX Storage", USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_SINGLE_LUN), +/* +* Reported by James Buren <[email protected]> +* Virtual ISOs cannot be remounted if ejected while the device is locked +* Disable locking to mimic Windows behavior that bypasses the issue +*/ +UNUSUAL_DEV (0x04c5 ,0x2028 ,0x0001 ,0x0001 , +"iODD" , +"2531/2541" , + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE), +/* * Not sure who reported this originally but * Pavel Machek <[email protected]> reported that the extra US_FL_SINGLE_LUN
fs/isofs/inode.c +2 -0
@@ -1326,6 +1326,8 @@ static int isofs_read_inode(struct inode *inode, int relocated) de = (struct iso_directory_record *) (bh->b_data + offset); de_len = *(unsigned char *) de; +if (de_len <sizeof (struct iso_directory_record )) + goto fail;if (offset + de_len > bufsize) {int frag1 = bufsize - offset;
include/asm-generic/pgtable.h +13 -0
@@ -1069,6 +1069,19 @@ static inline bool arch_has_pfn_modify_check(void)#endif /* !__ASSEMBLY__ */ +#if !defined(MAX_POSSIBLE_PHYSMEM_BITS ) && !defined(CONFIG_64BIT ) +#ifdef CONFIG_PHYS_ADDR_T_64BIT +/* +* ZSMALLOC needs to know the highest PFN on 32-bit architectures +* with physical address space extension, but falls back to +* BITS_PER_LONG otherwise. +*/ +#error Missing MAX_POSSIBLE_PHYSMEM_BITS definition +#else +#define MAX_POSSIBLE_PHYSMEM_BITS 32 +#endif +#endif +#ifndef has_transparent_hugepage#ifdef CONFIG_TRANSPARENT_HUGEPAGE #define has_transparent_hugepage () 1
include/linux/bvec.h +27 -3
@@ -23,6 +23,7 @@#include <linux/kernel.h> #include <linux/bug.h> #include <linux/errno.h> +#include <linux/mm.h> /* * was unsigned short, but we might as well be ready for > 64kB I/O pages
@@ -52,16 +53,39 @@ struct bvec_iter {*/ #define __bvec_iter_bvec (bvec, iter) (&(bvec)[(iter).bi_idx]) -#define bvec_iter_page (bvec, iter) \ +/* multi-page (mp_bvec) helpers */ +#define mp_bvec_iter_page (bvec, iter) \ (__bvec_iter_bvec((bvec), (iter))->bv_page) -#define bvec_iter_len (bvec, iter) \ +#define mp_bvec_iter_len (bvec, iter) \ min((iter).bi_size, \ __bvec_iter_bvec((bvec), (iter))->bv_len - (iter).bi_bvec_done) -#define bvec_iter_offset (bvec, iter) \ +#define mp_bvec_iter_offset (bvec, iter) \ (__bvec_iter_bvec((bvec), (iter))->bv_offset + (iter).bi_bvec_done) +#define mp_bvec_iter_page_idx (bvec, iter) \ + (mp_bvec_iter_offset((bvec), (iter)) / PAGE_SIZE) + +#define mp_bvec_iter_bvec (bvec, iter) \ +((struct bio_vec) { \ + .bv_page = mp_bvec_iter_page((bvec), (iter)), \ + .bv_len = mp_bvec_iter_len((bvec), (iter)), \ + .bv_offset = mp_bvec_iter_offset((bvec), (iter)), \ +}) + +/* For building single-page bvec in flight */ +#define bvec_iter_offset (bvec, iter) \ + (mp_bvec_iter_offset((bvec), (iter)) % PAGE_SIZE) + +#define bvec_iter_len (bvec, iter) \ + min_t(unsigned, mp_bvec_iter_len((bvec), (iter)), \ + PAGE_SIZE - bvec_iter_offset((bvec), (iter))) + +#define bvec_iter_page (bvec, iter) \ + nth_page(mp_bvec_iter_page((bvec), (iter)), \ + mp_bvec_iter_page_idx((bvec), (iter))) +#define bvec_iter_bvec (bvec, iter) \ ((struct bio_vec) { \ .bv_page = bvec_iter_page((bvec), (iter)), \
kernel/printk/printk.c +8 -1
@@ -2092,8 +2092,15 @@ static int __init console_setup(char *str)char *s, *options, *brl_options =NULL ;int idx; -if (str[0 ] ==0 ) +/* +* console="" or console=null have been suggested as a way to +* disable console output. Use ttynull that has been created +* for exacly this purpose. +*/ +if (str[0 ] ==0 ||strcmp (str,"null" ) ==0 ) { +__add_preferred_console ("ttynull" ,0 ,NULL ,NULL );return 1 ; + }if (_braille_console_setup (&str, &brl_options))return 1 ;
mm/zsmalloc.c +7 -6
@@ -83,18 +83,19 @@* This is made more complicated by various memory models and PAE. */ -#ifndef MAX_PHYSMEM_BITS -#ifdef CONFIG_HIGHMEM64G -#define MAX_PHYSMEM_BITS 36 -#else /* !CONFIG_HIGHMEM64G */ +#ifndef MAX_POSSIBLE_PHYSMEM_BITS +#ifdef MAX_PHYSMEM_BITS +#define MAX_POSSIBLE_PHYSMEM_BITS MAX_PHYSMEM_BITS +#else /* * If this definition of MAX_PHYSMEM_BITS is used, OBJ_INDEX_BITS will just * be PAGE_SHIFT */ -#define MAX_PHYSMEM_BITS BITS_PER_LONG +#define MAX_POSSIBLE_PHYSMEM_BITS BITS_PER_LONG#endif #endif -#define _PFN_BITS (MAX_PHYSMEM_BITS - PAGE_SHIFT) + +#define _PFN_BITS (MAX_POSSIBLE_PHYSMEM_BITS - PAGE_SHIFT)/* * Memory for allocating for handle keeps object position by