Linux 3.10.68
Greg KH
maintainerI'm announcing the release of the 3.10.68 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/include/asm/atomic.h | 52 ++- arch/arm/include/asm/memory.h | 36 +- arch/arm/include/asm/module.h | 2 arch/arm/include/asm/page.h | 2 arch/arm/include/asm/pgtable-3level-hwdef.h | 1 arch/arm/include/asm/pgtable-3level.h | 31 +- arch/arm/include/asm/pgtable.h | 14 - arch/arm/kernel/head.S | 2 arch/arm/kernel/module.c | 8 arch/arm/mm/dma-mapping.c | 11 arch/arm/mm/mmu.c | 3 arch/arm/mm/proc-v7-3level.S | 9 arch/powerpc/xmon/xmon.c | 1 drivers/firmware/efi/efi-pstore.c | 18 - drivers/gpio/gpiolib-of.c | 2 drivers/infiniband/ulp/isert/ib_isert.c | 372 +++++++++++++++++++--------- drivers/infiniband/ulp/isert/ib_isert.h | 7 drivers/input/serio/i8042-x86ia64io.h | 8 drivers/md/dm-cache-metadata.c | 9 drivers/md/dm-thin.c | 6 drivers/net/can/usb/kvaser_usb.c | 28 +- drivers/net/ethernet/ti/cpsw.c | 22 + drivers/regulator/core.c | 4 drivers/spi/spi-dw-mid.c | 1 drivers/spi/spi-pxa2xx.c | 2 drivers/target/iscsi/iscsi_target_login.c | 3 drivers/target/loopback/tcm_loop.c | 29 +- drivers/target/loopback/tcm_loop.h | 7 drivers/target/target_core_device.c | 8 drivers/target/target_core_file.c | 11 drivers/target/target_core_iblock.c | 2 drivers/target/target_core_sbc.c | 15 - drivers/target/target_core_spc.c | 5 drivers/vhost/scsi.c | 47 +++ fs/nfs/direct.c | 6 fs/nfs/nfs4client.c | 2 fs/pstore/inode.c | 5 fs/pstore/ram.c | 15 - fs/pstore/ram_core.c | 54 +++- kernel/workqueue.c | 39 -- net/wireless/nl80211.c | 9 sound/core/seq/seq_dummy.c | 31 -- sound/soc/codecs/wm8960.c | 2 44 files changed, 622 insertions(+), 321 deletions(-)
Ahmed S. Darwish (4):
can: kvaser_usb: Do not sleep in atomic context
can: kvaser_usb: Send correct context to URB completion
can: kvaser_usb: Retry the first bulk transfer on -ETIMEDOUT
can: kvaser_usb: Fix state handling upon BUS_ERROR events
Andy Shevchenko (1):
spi: dw-mid: fix FIFO size
Aruna Balakrishnaiah (1):
pstore: Fail to unlink if a driver has not defined pstore_erase
Ashay Jaiswal (1):
regulator: core: fix race condition in regulator_put()
Chen Gang (2):
ARM: 7866/1: include: asm: use 'long long' instead of 'u64' within atomic.h
ARM: 7867/1: include: asm: use 'int' instead of 'unsigned long' for 'oldval' in atomic_cmpxchg().
Chris Moore (1):
IB/isert: Adjust CQ size to HW limits
Clemens Ladisch (1):
ALSA: seq-dummy: remove deadlock-causing events on close
Cyril Chemparathy (2):
ARM: LPAE: use signed arithmetic for mask definitions
ARM: fix type of PHYS_PFN_OFFSET to unsigned long
Dan Carpenter (1):
pstore: d_alloc_name() doesn't return an ERR_PTR
Douglas Anderson (1):
ARM: 7829/1: Add ".text.unlikely" and ".text.hot" to arm unwind tables
Greg Kroah-Hartman (1):
Linux 3.10.68
Hannes Reinecke (1):
tcm_loop: Fix wrong I_T nexus association
Jochen Hein (1):
Input: i8042 - add noloop quirk for Medion Akoya E7225 (MD98857)
Joe Thornber (2):
dm thin: don't allow messages to be sent to a pool target in READ_ONLY or FAIL mode dm cache: fix missing ERR_PTR returns and handling
Johannes Berg (1):
nl80211: fix per-station group key get/del and memory leak
Laura Abbott (1):
ARM: 7931/1: Correct virt_addr_valid
Laurent Dufour (1):
powerpc/xmon: Fix another endiannes issue in RTAS call from xmon
Liu ShuoX (3):
pstore: clarify clearing of _read_cnt in ramoops_context
pstore: skip zero size persistent ram buffer in traverse
pstore: Fix NULL pointer fault if get NULL prz in ramoops_get_next_prz
Madper Xie (1):
efi-pstore: Make efi-pstore return a unique id
Martin Kaiser (1):
gpio: squelch a compiler warning
Mika Westerberg (1):
spi/pxa2xx: Clear cur_chip pointer before starting next message
Mugunthan V N (1):
drivers: net: cpsw: discard dual emac default vlan configuration
Nicholas Bellinger (3):
vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT
vhost-scsi: Add missing virtio-scsi -> TCM attribute conversion
target: Drop arbitrary maximum I/O size limit
Or Gerlitz (1):
ib_isert: Add max_send_sge=2 minimum for control PDU responses
Peng Tao (1):
nfs: fix dio deadlock when O_DIRECT flag is flipped
Rob Herring (1):
pstore/ram: avoid atomic accesses for ioremapped regions
Russell King (2):
ARM: fix asm/memory.h build error
ARM: DMA: ensure that old section mappings are flushed from the TLB
Sagi Grimberg (6):
iscsi,iser-target: Initiate termination only once
iser-target: Fix flush + disconnect completion handling
iser-target: Parallelize CM connection establishment
iser-target: Fix connected_handler + teardown flow race
iser-target: Handle ADDR_CHANGE event for listener cm_id
iser-target: Fix implicit termination of connections
Steve Capper (1):
ARM: mm: correct pte_same behaviour for LPAE.
Steven Capper (2):
ARM: 8108/1: mm: Introduce {pte,pmd}_isset and {pte,pmd}_isclear
ARM: 8109/1: mm: Modify pte_write and pmd_write logic for LPAE
Tejun Heo (1):
workqueue: fix subtle pool management issue which can stall whole worker_pool
Trond Myklebust (1):
NFSv4.1: Fix an Oops in nfs41_walk_client_list
Vitaly Andrianov (1):
ARM: LPAE: use phys_addr_t in alloc_init_pud()
Will Deacon (1):
ARM: lpae: fix definition of PTE_HWTABLE_PTRS
Zidan Wang (1):
ASoC: wm8960: Fix capture sample rate from 11250 to 11025
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 67 +SUBLEVEL = 68 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/arm/include/asm/atomic.h +27 -25
146 lines not on this page · raw message
arch/arm/include/asm/memory.h +18 -18
@@ -98,23 +98,19 @@#define TASK_UNMAPPED_BASE UL(0x00000000)#endif -#ifndef PHYS_OFFSET -#define PHYS_OFFSET UL(CONFIG_DRAM_BASE) -#endif -#ifndef END_MEM #define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE)#endif #ifndef PAGE_OFFSET -#define PAGE_OFFSET (PHYS_OFFSET) +#define PAGE_OFFSET PLAT_PHYS_OFFSET#endif /* * The module can be at any place in ram in nommu mode. */ #define MODULES_END (END_MEM) -#define MODULES_VADDR (PHYS_OFFSET) +#define MODULES_VADDR PAGE_OFFSET#define XIP_VIRT_ADDR (physaddr) (physaddr)
@@ -141,6 +137,16 @@#define page_to_phys (page) (__pfn_to_phys(page_to_pfn(page)))#define phys_to_page (phys) (pfn_to_page(__phys_to_pfn(phys))) +/* +* PLAT_PHYS_OFFSET is the offset (from zero) of the start of physical +* memory. This is used for XIP and NoMMU kernels, or by kernels which +* have their own mach/memory.h. Assembly code must always use +* PLAT_PHYS_OFFSET and not PHYS_OFFSET. +*/ +#ifndef PLAT_PHYS_OFFSET +#define PLAT_PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) +#endif +#ifndef __ASSEMBLY__/*
@@ -183,22 +189,15 @@ static inline unsigned long __phys_to_virt(unsigned long x)return t; }#else + +#define PHYS_OFFSET PLAT_PHYS_OFFSET +#define __virt_to_phys (x) ((x) - PAGE_OFFSET + PHYS_OFFSET)#define __phys_to_virt (x) ((x) - PHYS_OFFSET + PAGE_OFFSET) -#endif -#endif -#endif /* __ASSEMBLY__ */ -#ifndef PHYS_OFFSET -#ifdef PLAT_PHYS_OFFSET -#define PHYS_OFFSET PLAT_PHYS_OFFSET -#else -#define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET)#endif #endif -#ifndef __ASSEMBLY__ -/* * PFNs are used to describe any physical page; this means * PFN 0 == physical address 0.
@@ -207,7 +206,7 @@ static inline unsigned long __phys_to_virt(unsigned long x)* direct-mapped view. We assume this is the first page * of RAM in the mem_map as well. */ -#define PHYS_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT) +#define PHYS_PFN_OFFSET ((unsigned long)(PHYS_OFFSET >> PAGE_SHIFT))/* * These are *only* valid on the kernel direct mapped RAM memory.
@@ -275,7 +274,8 @@ static inline __deprecated void *bus_to_virt(unsigned long x)#define ARCH_PFN_OFFSET PHYS_PFN_OFFSET#define virt_to_page (kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) -#define virt_addr_valid (kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) +#define virt_addr_valid (kaddr) (((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) \ + && pfn_valid(__pa(kaddr) >> PAGE_SHIFT) )#endif
arch/arm/include/asm/module.h +2 -0
@@ -12,6 +12,8 @@ enum {ARM_SEC_CORE ,ARM_SEC_EXIT ,ARM_SEC_DEVEXIT , +ARM_SEC_HOT , +ARM_SEC_UNLIKELY , ARM_SEC_MAX, };
arch/arm/include/asm/page.h +1 -1
@@ -13,7 +13,7 @@/* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 12#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) -#define PAGE_MASK (~(PAGE_SIZE-1)) +#define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))#ifndef __ASSEMBLY__
arch/arm/include/asm/pgtable-3level-hwdef.h +1 -0
@@ -68,6 +68,7 @@#define PTE_TYPE_PAGE (_AT(pteval_t, 3) << 0)#define PTE_BUFFERABLE (_AT(pteval_t, 1) << 2)/* AttrIndx[0] */ #define PTE_CACHEABLE (_AT(pteval_t, 1) << 3)/* AttrIndx[1] */ +#define PTE_AP2 (_AT(pteval_t, 1) << 7)/* AP[2] */ #define PTE_EXT_SHARED (_AT(pteval_t, 3) << 8)/* SH[1:0], inner shareable */ #define PTE_EXT_AF (_AT(pteval_t, 1) << 10)/* Access Flag */ #define PTE_EXT_NG (_AT(pteval_t, 1) << 11)/* nG */
arch/arm/include/asm/pgtable-3level.h +24 -7
@@ -33,7 +33,7 @@#define PTRS_PER_PMD 512#define PTRS_PER_PGD 4 -#define PTE_HWTABLE_PTRS (PTRS_PER_PTE) +#define PTE_HWTABLE_PTRS (0)#define PTE_HWTABLE_OFF (0)#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u64))
@@ -48,16 +48,16 @@#define PMD_SHIFT 21#define PMD_SIZE (1UL << PMD_SHIFT) -#define PMD_MASK (~(PMD_SIZE-1)) +#define PMD_MASK (~((1 << PMD_SHIFT) - 1))#define PGDIR_SIZE (1UL << PGDIR_SHIFT) -#define PGDIR_MASK (~(PGDIR_SIZE-1)) +#define PGDIR_MASK (~((1 << PGDIR_SHIFT) - 1))/* * section address mask and size definitions. */ #define SECTION_SHIFT 21#define SECTION_SIZE (1UL << SECTION_SHIFT) -#define SECTION_MASK (~(SECTION_SIZE-1)) +#define SECTION_MASK (~((1 << SECTION_SHIFT) - 1))#define USER_PTRS_PER_PGD (PAGE_OFFSET / PGDIR_SIZE)
@@ -71,13 +71,13 @@#define L_PTE_PRESENT (_AT(pteval_t, 3) << 0)/* Present */ #define L_PTE_FILE (_AT(pteval_t, 1) << 2)/* only when !PRESENT */ #define L_PTE_USER (_AT(pteval_t, 1) << 6)/* AP[1] */ -#define L_PTE_RDONLY (_AT(pteval_t, 1) << 7)/* AP[2] */ #define L_PTE_SHARED (_AT(pteval_t, 3) << 8)/* SH[1:0], inner shareable */ #define L_PTE_YOUNG (_AT(pteval_t, 1) << 10)/* AF */ #define L_PTE_XN (_AT(pteval_t, 1) << 54)/* XN */ -#define L_PTE_DIRTY (_AT(pteval_t, 1) << 55)/* unused */ -#define L_PTE_SPECIAL (_AT(pteval_t, 1) << 56)/* unused */ +#define L_PTE_DIRTY (_AT(pteval_t, 1) << 55) +#define L_PTE_SPECIAL (_AT(pteval_t, 1) << 56)#define L_PTE_NONE (_AT(pteval_t, 1) << 57)/* PROT_NONE */ +#define L_PTE_RDONLY (_AT(pteval_t, 1) << 58)/* READ ONLY */ /* * To be used in assembly code with the upper page attributes.
@@ -166,6 +166,23 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)clean_pmd_entry (pmdp); \ } while (0) +/* +* For 3 levels of paging the PTE_EXT_NG bit will be set for user address ptes +* that are written to a page table but not for ptes created with mk_pte. +* +* In hugetlb_no_page, a new huge pte (new_pte) is generated and passed to +* hugetlb_cow, where it is compared with an entry in a page table. +* This comparison test fails erroneously leading ultimately to a memory leak. +* +* To correct this behaviour, we mask off PTE_EXT_NG for any pte that is +* present before running the comparison. + */ +#define __HAVE_ARCH_PTE_SAME +#define pte_same (pte_a,pte_b) ((pte_present(pte_a) ? pte_val(pte_a) & ~PTE_EXT_NG \ + : pte_val(pte_a)) \ + == (pte_present(pte_b) ? pte_val(pte_b) & ~PTE_EXT_NG \ + : pte_val(pte_b))) +#define set_pte_ext (ptep,pte,ext) cpu_set_pte_ext(ptep,__pte(pte_val(pte)|(ext)))#endif /* __ASSEMBLY__ */
arch/arm/include/asm/pgtable.h +9 -5
@@ -211,12 +211,16 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd)#define pte_clear (mm,addr,ptep) set_pte_ext(ptep, __pte(0), 0) +#define pte_isset (pte, val) ((u32)(val) == (val) ? pte_val(pte) & (val) \ + : !!(pte_val(pte) & (val))) +#define pte_isclear (pte, val) (!(pte_val(pte) & (val))) +#define pte_none (pte) (!pte_val(pte)) -#define pte_present (pte) (pte_val(pte) & L_PTE_PRESENT) -#define pte_write (pte) (!(pte_val(pte) & L_PTE_RDONLY)) -#define pte_dirty (pte) (pte_val(pte) & L_PTE_DIRTY) -#define pte_young (pte) (pte_val(pte) & L_PTE_YOUNG) -#define pte_exec (pte) (!(pte_val(pte) & L_PTE_XN)) +#define pte_present (pte) (pte_isset((pte), L_PTE_PRESENT)) +#define pte_write (pte) (pte_isclear((pte), L_PTE_RDONLY)) +#define pte_dirty (pte) (pte_isset((pte), L_PTE_DIRTY)) +#define pte_young (pte) (pte_isset((pte), L_PTE_YOUNG)) +#define pte_exec (pte) (pte_isclear((pte), L_PTE_XN))#define pte_special (pte) (0)#define pte_present_user (pte) (pte_present(pte) && (pte_val(pte) & L_PTE_USER))
arch/arm/kernel/head.S +1 -1
@@ -109,7 +109,7 @@ ENTRY(stext) sub r4, r3, r4 @ (PHYS_OFFSET - PAGE_OFFSET) add r8, r8, r4 @ PHYS_OFFSET #else - ldr r8, =PHYS_OFFSET @ always constant in this case + ldr r8, =PLAT_PHYS_OFFSET @ always constant in this case #endif /*
arch/arm/kernel/module.c +8 -0
@@ -296,6 +296,10 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, maps[ARM_SEC_EXIT ].unw_sec = s; else if (strcmp(".ARM.exidx.devexit.text", secname) == 0) maps[ARM_SEC_DEVEXIT ].unw_sec = s; + else if (strcmp(".ARM.exidx.text.unlikely", secname) == 0) + maps[ARM_SEC_UNLIKELY ].unw_sec = s; + else if (strcmp(".ARM.exidx.text.hot", secname) == 0) + maps[ARM_SEC_HOT ].unw_sec = s; else if (strcmp(".init.text", secname) == 0) maps[ARM_SEC_INIT ].txt_sec = s; else if (strcmp(".devinit.text", secname) == 0)
@@ -306,6 +310,10 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, maps[ARM_SEC_EXIT ].txt_sec = s; else if (strcmp(".devexit.text", secname) == 0) maps[ARM_SEC_DEVEXIT ].txt_sec = s; + else if (strcmp(".text.unlikely", secname) == 0) + maps[ARM_SEC_UNLIKELY ].txt_sec = s; + else if (strcmp(".text.hot", secname) == 0) + maps[ARM_SEC_HOT ].txt_sec = s; }for (i =0 ; i <ARM_SEC_MAX ; i++)
arch/arm/mm/dma-mapping.c +10 -1
@@ -429,12 +429,21 @@ void __init dma_contiguous_remap(void) map.type =MT_MEMORY_DMA_READY ;/* -* Clear previous low-memory mapping +* Clear previous low-memory mapping to ensure that the +* TLB does not see any conflicting entries, then flush +* the TLB of the old entries before creating new mappings. +* +* This ensures that any speculatively loaded TLB entries +* (even though they may be rare) can not cause any problems, +* and ensures that this code is architecturally compliant. */ for (addr =__phys_to_virt (start); addr <__phys_to_virt (end); addr +=PMD_SIZE )pmd_clear (pmd_off_k (addr)); +flush_tlb_kernel_range (__phys_to_virt (start), +__phys_to_virt (end)); +iotable_init (&map,1 ); } }
arch/arm/mm/mmu.c +2 -1
@@ -685,7 +685,8 @@ static void __init alloc_init_pmd(pud_t *pud, unsigned long addr, }static void __init alloc_init_pud (pgd_t *pgd,unsigned long addr, -unsigned long end,unsigned long phys,const struct mem_type *type) +unsigned long end,phys_addr_t phys, +const struct mem_type *type) {pud_t *pud =pud_offset (pgd, addr);unsigned long next;
arch/arm/mm/proc-v7-3level.S +7 -2
@@ -78,8 +78,13 @@ ENTRY(cpu_v7_set_pte_ext) tst rh, #1 << (57 - 32) @ L_PTE_NONE bicne rl, #L_PTE_VALID bne 1f - tst rh, #1 << (55 - 32) @ L_PTE_DIRTY - orreq rl, #L_PTE_RDONLY + + eor ip, rh, #1 << (55 - 32) @ toggle L_PTE_DIRTY in temp reg to + @ test for !L_PTE_DIRTY || L_PTE_RDONLY + tst ip, #1 << (55 - 32) | 1 << (58 - 32) + orrne rl, #PTE_AP2 + biceq rl, #PTE_AP2 + 1: strd r2, r3, [r0] ALT_SMP(W(nop)) ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte
arch/powerpc/xmon/xmon.c +1 -0
@@ -288,6 +288,7 @@ static inline void disable_surveillance(void) args.token =rtas_token ("set-indicator" );if (args.token ==RTAS_UNKNOWN_SERVICE )return ; + args.token =cpu_to_be32 (args.token); args.nargs =cpu_to_be32 (3 ); args.nret =cpu_to_be32 (1 ); args.rets = &args.args[3 ];
drivers/firmware/efi/efi-pstore.c +13 -5
@@ -38,6 +38,12 @@ struct pstore_read_data {char **buf; }; +static inline u64 generic_id (unsigned long timestamp, +unsigned int part,int count) +{ +return (timestamp *100 + part) *1000 + count; +} +static int efi_pstore_read_func (struct efivar_entry *entry,void *data) {efi_guid_t vendor =LINUX_EFI_CRASH_GUID ;
@@ -56,7 +62,7 @@ static int efi_pstore_read_func(struct efivar_entry *entry, void *data)if (sscanf (name,"dump-type%u-%u-%d-%lu" , cb_data->type, &part, &cnt, &time) ==4 ) { - *cb_data->id = part; + *cb_data->id =generic_id (time, part, cnt); *cb_data->count = cnt; cb_data->timespec->tv_sec = time; cb_data->timespec->tv_nsec =0 ;
@@ -67,7 +73,7 @@ static int efi_pstore_read_func(struct efivar_entry *entry, void *data)* which doesn't support holding * multiple logs, remains. */ - *cb_data->id = part; + *cb_data->id =generic_id (time, part,0 ); *cb_data->count =0 ; cb_data->timespec->tv_sec = time; cb_data->timespec->tv_nsec =0 ;
@@ -185,14 +191,16 @@ static int efi_pstore_erase(enum pstore_type_id type, u64 id, int count,char name[DUMP_NAME_LEN ];efi_char16_t efi_name[DUMP_NAME_LEN ];int found, i; +unsigned int part; -sprintf (name,"dump-type%u-%u-%d-%lu" , type, (unsigned int )id, count, - time.tv_sec); +do_div (id,1000 ); + part =do_div (id,100 ); +sprintf (name,"dump-type%u-%u-%d-%lu" , type, part, count, time.tv_sec);for (i =0 ; i <DUMP_NAME_LEN ; i++) efi_name[i] = name[i]; - edata.id = id; + edata.id = part; edata.type = type; edata.count = count; edata.time = time;
drivers/gpio/gpiolib-of.c +1 -1
@@ -48,7 +48,7 @@ static int of_gpiochip_find_and_xlate(struct gpio_chip *gc, void *data)* Return true to stop looking and return the translation * error via out_gpio */ - gg_data->out_gpio =ERR_PTR (ret); + gg_data->out_gpio = ret;return true; }
drivers/infiniband/ulp/isert/ib_isert.c +264 -108
649 lines not on this page · raw message
drivers/infiniband/ulp/isert/ib_isert.h +5 -2
@@ -21,6 +21,7 @@ enum iser_ib_op_code {enum iser_conn_state {ISER_CONN_INIT ,ISER_CONN_UP , +ISER_CONN_FULL_FEATURE ,ISER_CONN_TERMINATING ,ISER_CONN_DOWN , };
@@ -87,6 +88,7 @@ struct isert_conn {char *login_req_buf;char *login_rsp_buf;u64 login_req_dma; +int login_req_len;u64 login_rsp_dma;unsigned int conn_rx_desc_head;struct iser_rx_desc *conn_rx_descs;
@@ -94,18 +96,18 @@ struct isert_conn {struct iscsi_conn *conn;struct list_head conn_accept_node;struct completion conn_login_comp; +struct completion login_req_comp;struct iser_tx_desc conn_login_tx_desc;struct rdma_cm_id *conn_cm_id;struct ib_pd *conn_pd;struct ib_mr *conn_mr;struct ib_qp *conn_qp;struct isert_device *conn_device; -struct work_struct conn_logout_work;struct mutex conn_mutex;struct completion conn_wait;struct completion conn_wait_comp_err;struct kref conn_kref; -bool disconnect; +struct work_struct release_work; };#define ISERT_MAX_CQ 64
@@ -131,6 +133,7 @@ struct isert_device { };struct isert_np { +struct iscsi_np *np;struct semaphore np_sem;struct rdma_cm_id *np_cm_id;struct mutex np_accept_mutex;
drivers/input/serio/i8042-x86ia64io.h +8 -0
@@ -152,6 +152,14 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = { }, }, { +/* Medion Akoya E7225 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Medion" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"Akoya E7225" ), + DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"), + }, + }, + {/* Blue FB5601 */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "blue"),
drivers/md/dm-cache-metadata.c +5 -4
@@ -648,7 +648,7 @@ static struct dm_cache_metadata *metadata_open(struct block_device *bdev, cmd =kzalloc (sizeof (*cmd),GFP_KERNEL );if (!cmd) {DMERR ("could not allocate metadata struct" ); -return NULL ; +return ERR_PTR (-ENOMEM ); }atomic_set (&cmd->ref_count,1 );
@@ -710,7 +710,7 @@ static struct dm_cache_metadata *lookup_or_open(struct block_device *bdev,return cmd; cmd =metadata_open (bdev, data_block_size, may_format_device, policy_hint_size); -if (cmd) { +if (!IS_ERR (cmd)) {mutex_lock (&table_lock); cmd2 =lookup (bdev);if (cmd2) {
@@ -745,9 +745,10 @@ struct dm_cache_metadata *dm_cache_metadata_open(struct block_device *bdev, {struct dm_cache_metadata *cmd =lookup_or_open (bdev, data_block_size, may_format_device, policy_hint_size); -if (cmd && !same_params (cmd, data_block_size)) { + +if (!IS_ERR (cmd) && !same_params (cmd, data_block_size)) {dm_cache_metadata_close (cmd); -return NULL ; +return ERR_PTR (-EINVAL ); }return cmd;
drivers/md/dm-thin.c +6 -0
@@ -2457,6 +2457,12 @@ static int pool_message(struct dm_target *ti, unsigned argc, char **argv)struct pool_c *pt = ti->private;struct pool *pool = pt->pool; +if (get_pool_mode (pool) >=PM_READ_ONLY ) { +DMERR ("%s: unable to service pool target messages in READ_ONLY or FAIL mode" , +dm_device_name (pool->pool_md)); +return -EINVAL ; + } +if (!strcasecmp (argv[0 ],"create_thin" )) r =process_create_thin_mesg (argc, argv, pool);
drivers/net/can/usb/kvaser_usb.c +15 -13
@@ -579,7 +579,7 @@ static int kvaser_usb_simple_msg_async(struct kvaser_usb_net_priv *priv,usb_sndbulkpipe (dev->udev, dev->bulk_out->bEndpointAddress), buf, msg->len, - kvaser_usb_simple_msg_callback, priv); + kvaser_usb_simple_msg_callback, netdev);usb_anchor_urb (urb, &priv->tx_submitted); err =usb_submit_urb (urb,GFP_ATOMIC );
@@ -654,11 +654,6 @@ static void kvaser_usb_rx_error(const struct kvaser_usb *dev, priv = dev->nets[channel]; stats = &priv->netdev->stats; -if (status &M16C_STATE_BUS_RESET ) { -kvaser_usb_unlink_tx_urbs (priv); -return ; - } - skb =alloc_can_err_skb (priv->netdev, &cf);if (!skb) { stats->rx_dropped++;
@@ -669,7 +664,7 @@ static void kvaser_usb_rx_error(const struct kvaser_usb *dev,netdev_dbg (priv->netdev,"Error status: 0x%02x\n" , status); -if (status &M16C_STATE_BUS_OFF ) { +if (status & (M16C_STATE_BUS_OFF |M16C_STATE_BUS_RESET )) { cf->can_id |=CAN_ERR_BUSOFF ; priv->can.can_stats.bus_off++;
@@ -695,9 +690,7 @@ static void kvaser_usb_rx_error(const struct kvaser_usb *dev, } new_state =CAN_STATE_ERROR_PASSIVE ; - } - -if (status ==M16C_STATE_BUS_ERROR ) { + }else if (status &M16C_STATE_BUS_ERROR ) {if ((priv->can.state <CAN_STATE_ERROR_WARNING ) && ((txerr >=96 ) || (rxerr >=96 ))) { cf->can_id |=CAN_ERR_CRTL ;
@@ -707,7 +700,8 @@ static void kvaser_usb_rx_error(const struct kvaser_usb *dev, priv->can.can_stats.error_warning++; new_state =CAN_STATE_ERROR_WARNING ; - }else if (priv->can.state >CAN_STATE_ERROR_ACTIVE ) { + }else if ((priv->can.state >CAN_STATE_ERROR_ACTIVE ) && + ((txerr <96 ) && (rxerr <96 ))) { cf->can_id |=CAN_ERR_PROT ; cf->data[2 ] =CAN_ERR_PROT_ACTIVE ;
@@ -1583,7 +1577,7 @@ static int kvaser_usb_probe(struct usb_interface *intf, {struct kvaser_usb *dev;int err = -ENOMEM ; -int i; +int i, retry =3 ; dev =devm_kzalloc (&intf->dev,sizeof (*dev),GFP_KERNEL );if (!dev)
@@ -1601,7 +1595,15 @@ static int kvaser_usb_probe(struct usb_interface *intf,usb_set_intfdata (intf, dev); - err =kvaser_usb_get_software_info (dev); +/* On some x86 laptops, plugging a Kvaser device again after +* an unplug makes the firmware always ignore the very first +* command. For such a case, provide some room for retries +* instead of completely exiting the driver. +*/ +do { + err =kvaser_usb_get_software_info (dev); + }while (--retry && err == -ETIMEDOUT ); +if (err) {dev_err (&intf->dev,"Cannot get software infos, error %d\n" , err);
drivers/net/ethernet/ti/cpsw.c +22 -0
@@ -1293,6 +1293,19 @@ static int cpsw_ndo_vlan_rx_add_vid(struct net_device *ndev,if (vid == priv->data.default_vlan)return 0 ; +if (priv->data.dual_emac) { +/* In dual EMAC, reserved VLAN id should not be used for +* creating VLAN interfaces as this can break the dual +* EMAC port separation +*/ +int i; + +for (i =0 ; i < priv->data.slaves; i++) { +if (vid == priv->slaves[i].port_vlan) +return -EINVAL ; + } + } +dev_info (priv->dev,"Adding vlanid %d to vlan filter\n" , vid);return cpsw_add_vlan_ale_entry (priv, vid); }
@@ -1306,6 +1319,15 @@ static int cpsw_ndo_vlan_rx_kill_vid(struct net_device *ndev,if (vid == priv->data.default_vlan)return 0 ; +if (priv->data.dual_emac) { +int i; + +for (i =0 ; i < priv->data.slaves; i++) { +if (vid == priv->slaves[i].port_vlan) +return -EINVAL ; + } + } +dev_info (priv->dev,"removing vlanid %d from vlan filter\n" , vid); ret =cpsw_ale_del_vlan (priv->ale, vid,0 );if (ret !=0 )
drivers/regulator/core.c +3 -1
@@ -1410,7 +1410,7 @@ struct regulator *regulator_get_exclusive(struct device *dev, const char *id) }EXPORT_SYMBOL_GPL (regulator_get_exclusive); -/* Locks held by regulator_put() */ +/* regulator_list_mutex lock held by regulator_put() */ static void _regulator_put (struct regulator *regulator) {struct regulator_dev *rdev;
@@ -1425,12 +1425,14 @@ static void _regulator_put(struct regulator *regulator)/* remove any sysfs entries */ if (regulator->dev)sysfs_remove_link (&rdev->dev.kobj, regulator->supply_name); +mutex_lock (&rdev->mutex);kfree (regulator->supply_name);list_del (®ulator->list);kfree (regulator); rdev->open_count--; rdev->exclusive =0 ; +mutex_unlock (&rdev->mutex);module_put (rdev->owner); }
drivers/spi/spi-dw-mid.c +0 -1
@@ -222,7 +222,6 @@ int dw_spi_mid_init(struct dw_spi *dws)iounmap (clk_reg); dws->num_cs =16 ; - dws->fifo_len =40 ;/* FIFO has 40 words buffer */ #ifdef CONFIG_SPI_DW_MID_DMA dws->dma_priv =kzalloc (sizeof (struct mid_dma ),GFP_KERNEL );
drivers/spi/spi-pxa2xx.c +1 -1
@@ -393,8 +393,8 @@ static void giveback(struct driver_data *drv_data)cs_deassert (drv_data); } -spi_finalize_current_message (drv_data->master); drv_data->cur_chip =NULL ; +spi_finalize_current_message (drv_data->master); }static void reset_sccr1 (struct driver_data *drv_data)
drivers/target/iscsi/iscsi_target_login.c +3 -0
@@ -1360,6 +1360,9 @@ old_sess_out: conn->sock =NULL ; } +if (conn->conn_transport->iscsit_wait_conn) + conn->conn_transport->iscsit_wait_conn (conn); +if (conn->conn_transport->iscsit_free_conn) conn->conn_transport->iscsit_free_conn (conn);
drivers/target/loopback/tcm_loop.c +14 -15
@@ -179,7 +179,7 @@ static void tcm_loop_submission_work(struct work_struct *work) goto out_done; } - tl_nexus = tl_hba->tl_nexus; + tl_nexus = tl_tpg->tl_nexus;if (!tl_nexus) {scmd_printk (KERN_ERR , sc,"TCM_Loop I_T Nexus" " does not exist\n" );
@@ -258,20 +258,20 @@ static int tcm_loop_device_reset(struct scsi_cmnd *sc)*/ tl_hba = *(struct tcm_loop_hba **)shost_priv (sc->device->host);/* +* Locate the tl_tpg and se_tpg pointers from TargetID in sc->device->id +*/ + tl_tpg = &tl_hba->tl_hba_tpgs[sc->device->id]; + se_tpg = &tl_tpg->tl_se_tpg; +/* * Locate the tl_nexus and se_sess pointers */ - tl_nexus = tl_hba->tl_nexus; + tl_nexus = tl_tpg->tl_nexus;if (!tl_nexus) {pr_err ("Unable to perform device reset without" " active I_T Nexus\n" );return FAILED ; } se_sess = tl_nexus->se_sess; -/* -* Locate the tl_tpg and se_tpg pointers from TargetID in sc->device->id -*/ - tl_tpg = &tl_hba->tl_hba_tpgs[sc->device->id]; - se_tpg = &tl_tpg->tl_se_tpg; tl_cmd =kmem_cache_zalloc (tcm_loop_cmd_cache,GFP_KERNEL );if (!tl_cmd) {
@@ -879,8 +879,8 @@ static int tcm_loop_make_nexus(struct tcm_loop_nexus *tl_nexus;int ret = -ENOMEM ; -if (tl_tpg->tl_hba->tl_nexus) { -pr_debug ("tl_tpg->tl_hba->tl_nexus already exists\n" ); +if (tl_tpg->tl_nexus) { +pr_debug ("tl_tpg->tl_nexus already exists\n" );return -EEXIST ; } se_tpg = &tl_tpg->tl_se_tpg;
@@ -915,7 +915,7 @@ static int tcm_loop_make_nexus(*/ __transport_register_session (se_tpg, tl_nexus->se_sess->se_node_acl, tl_nexus->se_sess, tl_nexus); - tl_tpg->tl_hba->tl_nexus = tl_nexus; + tl_tpg->tl_nexus = tl_nexus;pr_debug ("TCM_Loop_ConfigFS: Established I_T Nexus to emulated" " %s Initiator Port: %s\n" ,tcm_loop_dump_proto_id (tl_hba), name);
@@ -931,9 +931,8 @@ static int tcm_loop_drop_nexus( {struct se_session *se_sess;struct tcm_loop_nexus *tl_nexus; -struct tcm_loop_hba *tl_hba = tpg->tl_hba; - tl_nexus = tpg->tl_hba->tl_nexus; + tl_nexus = tpg->tl_nexus;if (!tl_nexus)return -ENODEV ;
@@ -949,13 +948,13 @@ static int tcm_loop_drop_nexus( }pr_debug ("TCM_Loop_ConfigFS: Removing I_T Nexus to emulated" -" %s Initiator Port: %s\n" ,tcm_loop_dump_proto_id (tl_hba), +" %s Initiator Port: %s\n" ,tcm_loop_dump_proto_id (tpg->tl_hba), tl_nexus->se_sess->se_node_acl->initiatorname);/* * Release the SCSI I_T Nexus to the emulated SAS Target Port */ transport_deregister_session (tl_nexus->se_sess); - tpg->tl_hba->tl_nexus =NULL ; + tpg->tl_nexus =NULL ;kfree (tl_nexus);return 0 ; }
@@ -971,7 +970,7 @@ static ssize_t tcm_loop_tpg_show_nexus(struct tcm_loop_nexus *tl_nexus;ssize_t ret; - tl_nexus = tl_tpg->tl_hba->tl_nexus; + tl_nexus = tl_tpg->tl_nexus;if (!tl_nexus)return -ENODEV ;
drivers/target/loopback/tcm_loop.h +1 -6
@@ -25,11 +25,6 @@ struct tcm_loop_tmr { };struct tcm_loop_nexus { -int it_nexus_active; -/* -* Pointer to Linux/SCSI HBA from linux/include/scsi_host.h -*/ -struct scsi_host *sh;/* * Pointer to TCM session for I_T Nexus */
@@ -45,6 +40,7 @@ struct tcm_loop_tpg {atomic_t tl_tpg_port_count;struct se_portal_group tl_se_tpg;struct tcm_loop_hba *tl_hba; +struct tcm_loop_nexus *tl_nexus; };struct tcm_loop_hba {
@@ -53,7 +49,6 @@ struct tcm_loop_hba {struct se_hba_s *se_hba;struct se_lun *tl_hba_lun;struct se_port *tl_hba_lun_sep; -struct tcm_loop_nexus *tl_nexus;struct device dev;struct Scsi_Host *sh;struct tcm_loop_tpg tl_hba_tpgs[TL_TPGS_PER_HBA ];
drivers/target/target_core_device.c +4 -4
@@ -1037,10 +1037,10 @@ int se_dev_set_optimal_sectors(struct se_device *dev, u32 optimal_sectors) " changed for TCM/pSCSI\n", dev);return -EINVAL ; } -if (optimal_sectors > dev->dev_attrib.fabric_max_sectors) { +if (optimal_sectors > dev->dev_attrib.hw_max_sectors) {pr_err ("dev[%p]: Passed optimal_sectors %u cannot be" -" greater than fabric_max_sectors: %u\n" , dev, - optimal_sectors, dev->dev_attrib.fabric_max_sectors); +" greater than hw_max_sectors: %u\n" , dev, + optimal_sectors, dev->dev_attrib.hw_max_sectors);return -EINVAL ; }
@@ -1442,7 +1442,6 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name)DA_UNMAP_GRANULARITY_ALIGNMENT_DEFAULT ; dev->dev_attrib.max_write_same_len =DA_MAX_WRITE_SAME_LEN ; dev->dev_attrib.fabric_max_sectors =DA_FABRIC_MAX_SECTORS ; - dev->dev_attrib.optimal_sectors =DA_FABRIC_MAX_SECTORS ;return dev; }
@@ -1475,6 +1474,7 @@ int target_configure_device(struct se_device *dev) dev->dev_attrib.hw_max_sectors =se_dev_align_max_sectors (dev->dev_attrib.hw_max_sectors, dev->dev_attrib.hw_block_size); + dev->dev_attrib.optimal_sectors = dev->dev_attrib.hw_max_sectors; dev->dev_index =scsi_get_new_index (SCSI_DEVICE_INDEX ); dev->creation_time =get_jiffies_64 ();
drivers/target/target_core_file.c +10 -1
@@ -554,7 +554,16 @@ fd_execute_rw(struct se_cmd *cmd)enum dma_data_direction data_direction = cmd->data_direction;struct se_device *dev = cmd->se_dev;int ret =0 ; - +/* +* We are currently limited by the number of iovecs (2048) per +* single vfs_[writev,readv] call. +*/ +if (cmd->data_length >FD_MAX_BYTES ) { +pr_err ("FILEIO: Not able to process I/O of %u bytes due to" +"FD_MAX_BYTES: %u iovec count limitiation\n" , + cmd->data_length,FD_MAX_BYTES ); +return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE ; + }/* * Call vectorized fileio functions to map struct scatterlist * physical memory addresses to struct iovec virtual memory.
drivers/target/target_core_iblock.c +1 -1
@@ -122,7 +122,7 @@ static int iblock_configure_device(struct se_device *dev) q =bdev_get_queue (bd); dev->dev_attrib.hw_block_size =bdev_logical_block_size (bd); - dev->dev_attrib.hw_max_sectors =UINT_MAX ; + dev->dev_attrib.hw_max_sectors =queue_max_hw_sectors (q); dev->dev_attrib.hw_queue_depth = q->nr_requests;/*
drivers/target/target_core_sbc.c +0 -15
@@ -561,21 +561,6 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)if (cmd->se_cmd_flags &SCF_SCSI_DATA_CDB ) {unsigned long long end_lba; -if (sectors > dev->dev_attrib.fabric_max_sectors) { -printk_ratelimited (KERN_ERR "SCSI OP %02xh with too" -" big sectors %u exceeds fabric_max_sectors:" -" %u\n" , cdb[0 ], sectors, - dev->dev_attrib.fabric_max_sectors); -return TCM_INVALID_CDB_FIELD ; - } -if (sectors > dev->dev_attrib.hw_max_sectors) { -printk_ratelimited (KERN_ERR "SCSI OP %02xh with too" -" big sectors %u exceeds backend hw_max_sectors:" -" %u\n" , cdb[0 ], sectors, - dev->dev_attrib.hw_max_sectors); -return TCM_INVALID_CDB_FIELD ; - } - end_lba = dev->transport->get_blocks (dev) +1 ;if (cmd->t_task_lba + sectors > end_lba) { pr_err("cmd exceeds last lba %llu "
drivers/target/target_core_spc.c +1 -4
@@ -444,7 +444,6 @@ static sense_reason_t spc_emulate_evpd_b0(struct se_cmd *cmd, unsigned char *buf) { struct se_device *dev = cmd->se_dev; -u32 max_sectors;int have_tp =0 ;/*
@@ -469,9 +468,7 @@ spc_emulate_evpd_b0(struct se_cmd *cmd, unsigned char *buf)/* * Set MAXIMUM TRANSFER LENGTH */ - max_sectors =min (dev->dev_attrib.fabric_max_sectors, - dev->dev_attrib.hw_max_sectors); -put_unaligned_be32 (max_sectors, &buf[8 ]); +put_unaligned_be32 (dev->dev_attrib.hw_max_sectors, &buf[8 ]);/* * Set OPTIMAL TRANSFER LENGTH
drivers/vhost/scsi.c +44 -3
83 lines not on this page · raw message
fs/nfs/direct.c +6 -0
@@ -123,6 +123,12 @@ static inline int put_dreq(struct nfs_direct_req *dreq)*/ ssize_t nfs_direct_IO (int rw,struct kiocb *iocb,const struct iovec *iov,loff_t pos,unsigned long nr_segs) { +struct inode *inode = iocb->ki_filp->f_mapping->host; + +/* we only support swap file calling nfs_direct_IO */ +if (!IS_SWAPFILE (inode)) +return 0 ; +#ifndef CONFIG_NFS_SWAP dprintk("NFS: nfs_direct_IO (%s) off/no(%Ld/%lu) EINVAL\n", iocb->ki_filp->f_path.dentry->d_name.name,
fs/nfs/nfs4client.c +1 -1
@@ -462,7 +462,7 @@ int nfs41_walk_client_list(struct nfs_client *new, prev = pos; status =nfs_wait_client_init_complete (pos); -if (status ==0 ) { +if (pos->cl_cons_state ==NFS_CS_SESSION_INITING ) {nfs4_schedule_lease_recovery (pos); status =nfs4_wait_clnt_recover (pos); }
fs/pstore/inode.c +3 -2
@@ -178,6 +178,8 @@ static int pstore_unlink(struct inode *dir, struct dentry *dentry)if (p->psi->erase) p->psi->erase (p->type, p->id, p->count, dentry->d_inode->i_ctime, p->psi); +else +return -EPERM ;return simple_unlink (dir, dentry); }
@@ -334,9 +336,8 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, int count,mutex_lock (&root->d_inode->i_mutex); - rc = -ENOSPC ; dentry =d_alloc_name (root, name); -if (IS_ERR (dentry)) +if (!dentry) goto fail_lockedalloc;memcpy (private->data, data, size);
fs/pstore/ram.c +9 -6
@@ -92,6 +92,7 @@ struct ramoops_context {struct persistent_ram_ecc_info ecc_info;unsigned int max_dump_cnt;unsigned int dump_write_cnt; +/* _read_cnt need clear on ramoops_pstore_open */ unsigned int dump_read_cnt;unsigned int console_read_cnt;unsigned int ftrace_read_cnt;
@@ -107,6 +108,7 @@ static int ramoops_pstore_open(struct pstore_info *psi) cxt->dump_read_cnt =0 ; cxt->console_read_cnt =0 ; + cxt->ftrace_read_cnt =0 ;return 0 ; }
@@ -123,13 +125,15 @@ ramoops_get_next_prz(struct persistent_ram_zone *przs[], uint *c, uint max,return NULL ; prz = przs[i]; +if (!prz) +return NULL ; -if (update) { -/* Update old/shadowed buffer. */ +/* Update old/shadowed buffer. */ +if (update)persistent_ram_save_old (prz); -if (!persistent_ram_old_size (prz)) -return NULL ; - } + +if (!persistent_ram_old_size (prz)) +return NULL ; *typep = type; *id = i;
@@ -415,7 +419,6 @@ static int ramoops_probe(struct platform_device *pdev)if (!is_power_of_2 (pdata->ftrace_size)) pdata->ftrace_size =rounddown_pow_of_two (pdata->ftrace_size); - cxt->dump_read_cnt =0 ; cxt->size = pdata->mem_size; cxt->phys_addr = pdata->mem_address; cxt->memtype = pdata->mem_type;
fs/pstore/ram_core.c +52 -2
78 lines not on this page · raw message
kernel/workqueue.c +13 -26
@@ -1934,17 +1934,13 @@ static void pool_mayday_timeout(unsigned long __pool)* spin_lock_irq(pool->lock) which may be released and regrabbed * multiple times. Does GFP_KERNEL allocations. Called only from * manager. -* -* RETURNS: -* %false if no action was taken and pool->lock stayed locked, %true -* otherwise. */ -static bool maybe_create_worker (struct worker_pool *pool) +static void maybe_create_worker (struct worker_pool *pool) __releases(&pool->lock) __acquires(&pool->lock) {if (!need_to_create_worker (pool)) -return false; +return ; restart:spin_unlock_irq (&pool->lock);
@@ -1961,7 +1957,7 @@ restart:start_worker (worker);if (WARN_ON_ONCE (need_to_create_worker (pool))) goto restart; -return true; +return ; }if (!need_to_create_worker (pool))
@@ -1978,7 +1974,7 @@ restart:spin_lock_irq (&pool->lock);if (need_to_create_worker (pool)) goto restart; -return true; +return ; }/**
@@ -1991,15 +1987,9 @@ restart:* LOCKING: * spin_lock_irq(pool->lock) which may be released and regrabbed * multiple times. Called only from manager. -* -* RETURNS: -* %false if no action was taken and pool->lock stayed locked, %true -* otherwise. */ -static bool maybe_destroy_workers (struct worker_pool *pool) +static void maybe_destroy_workers (struct worker_pool *pool) { -bool ret = false; -while (too_many_workers (pool)) {struct worker *worker;unsigned long expires;
@@ -2013,10 +2003,7 @@ static bool maybe_destroy_workers(struct worker_pool *pool) }destroy_worker (worker); - ret = true; } - -return ret; }/**
@@ -2036,13 +2023,14 @@ static bool maybe_destroy_workers(struct worker_pool *pool)* multiple times. Does GFP_KERNEL allocations. * * RETURNS: -* spin_lock_irq(pool->lock) which may be released and regrabbed -* multiple times. Does GFP_KERNEL allocations. +* %false if the pool doesn't need management and the caller can safely +* start processing works, %true if management function was performed and +* the conditions that the caller verified before calling the function may +* no longer be true. */ static bool manage_workers (struct worker *worker) {struct worker_pool *pool = worker->pool; -bool ret = false;/* * Managership is governed by two mutexes - manager_arb and
@@ -2066,7 +2054,7 @@ static bool manage_workers(struct worker *worker)* manager_mutex. */ if (!mutex_trylock (&pool->manager_arb)) -return ret; +return false;/* * With manager arbitration won, manager_mutex would be free in
@@ -2076,7 +2064,6 @@ static bool manage_workers(struct worker *worker)spin_unlock_irq (&pool->lock);mutex_lock (&pool->manager_mutex);spin_lock_irq (&pool->lock); - ret = true; } pool->flags &= ~POOL_MANAGE_WORKERS ;
@@ -2085,12 +2072,12 @@ static bool manage_workers(struct worker *worker)* Destroy and then create so that may_start_working() is true * on return. */ - ret |=maybe_destroy_workers (pool); - ret |=maybe_create_worker (pool); +maybe_destroy_workers (pool); +maybe_create_worker (pool);mutex_unlock (&pool->manager_mutex);mutex_unlock (&pool->manager_arb); -return ret; +return true; }/**
net/wireless/nl80211.c +4 -5
@@ -2629,6 +2629,9 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)if (!rdev->ops->get_key)return -EOPNOTSUPP ; +if (!pairwise && mac_addr && !(rdev->wiphy.flags &WIPHY_FLAG_IBSS_RSN )) +return -ENOENT ; + msg =nlmsg_new (NLMSG_DEFAULT_SIZE ,GFP_KERNEL );if (!msg)return -ENOMEM ;
@@ -2648,10 +2651,6 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr)) goto nla_put_failure; -if (pairwise && mac_addr && - !(rdev->wiphy.flags &WIPHY_FLAG_IBSS_RSN )) -return -ENOENT ; - err =rdev_get_key (rdev, dev, key_idx, pairwise, mac_addr, &cookie, get_key_callback);
@@ -2822,7 +2821,7 @@ static int nl80211_del_key(struct sk_buff *skb, struct genl_info *info)wdev_lock (dev->ieee80211_ptr); err =nl80211_key_allowed (dev->ieee80211_ptr); -if (key.type ==NL80211_KEYTYPE_PAIRWISE && mac_addr && +if (key.type ==NL80211_KEYTYPE_GROUP && mac_addr && !(rdev->wiphy.flags &WIPHY_FLAG_IBSS_RSN )) err = -ENOENT ;
sound/core/seq/seq_dummy.c +0 -31
@@ -82,36 +82,6 @@ struct snd_seq_dummy_port {static int my_client =-1 ;/* -* unuse callback - send ALL_SOUNDS_OFF and RESET_CONTROLLERS events -* to subscribers. -* Note: this callback is called only after all subscribers are removed. -*/ -static int -dummy_unuse (void *private_data,struct snd_seq_port_subscribe *info) -{ -struct snd_seq_dummy_port *p; -int i; -struct snd_seq_event ev; - - p = private_data; -memset (&ev,0 ,sizeof (ev)); -if (p->duplex) - ev.source.port = p->connect; -else - ev.source.port = p->port; - ev.dest.client =SNDRV_SEQ_ADDRESS_SUBSCRIBERS ; - ev.type =SNDRV_SEQ_EVENT_CONTROLLER ; -for (i =0 ; i <16 ; i++) { - ev.data.control.channel = i; - ev.data.control.param =MIDI_CTL_ALL_SOUNDS_OFF ; -snd_seq_kernel_client_dispatch (p->client, &ev,0 ,0 ); - ev.data.control.param =MIDI_CTL_RESET_CONTROLLERS ; -snd_seq_kernel_client_dispatch (p->client, &ev,0 ,0 ); - } -return 0 ; -} - -/* * event input callback - just redirect events to subscribers */ static int
@@ -175,7 +145,6 @@ create_port(int idx, int type) | SNDRV_SEQ_PORT_TYPE_PORT;memset (&pcb,0 ,sizeof (pcb)); pcb.owner =THIS_MODULE ; - pcb.unuse = dummy_unuse; pcb.event_input = dummy_input; pcb.private_free = dummy_free; pcb.private_data = rec;
sound/soc/codecs/wm8960.c +1 -1
@@ -555,7 +555,7 @@ static struct { { 22050, 2 }, { 24000, 2 }, { 16000, 3 }, - { 11250, 4 }, + { 11025, 4 }, { 12000, 4 }, { 8000, 5 }, };