NFC-FDP: Completion of error handling around fdp_nci_i2c_read_device_properties()

2017-04-15 Thread SF Markus Elfring
Hello, I have noticed that the function “fdp_nci_i2c_read_device_properties” does not contain a null pointer check after a call of the function “devm_kmalloc”. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/nfc/fdp/i2c.c?h=v4.10#n234 How do you think about to add

Re: [PATCH nf-next] ipset: remove unused function __ip_set_get_netlink

2017-04-15 Thread Pablo Neira Ayuso
On Fri, Apr 14, 2017 at 04:15:41PM +0200, Jozsef Kadlecsik wrote: > Hi Pablo, > > On Fri, 14 Apr 2017, Pablo Neira Ayuso wrote: > > > On Mon, Apr 10, 2017 at 03:52:37PM -0400, Aaron Conole wrote: > > > There are no in-tree callers. > > > > @Jozsef, let me know if I should just take this to save

Re: [PATCH 06/38] Annotate hardware config module parameters in drivers/clocksource/

2017-04-15 Thread Thomas Gleixner
On Sat, 15 Apr 2017, David Howells wrote: > Thomas Gleixner wrote: > > > > Btw, is it possible to use IRQ grants to prevent a device that has limited > > > IRQ options from being drivable? > > > > What do you mean with 'IRQ grants' ? > > request_irq(). I still can't parse the sentence above. I

[PATCH] genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs

2017-04-15 Thread Hans de Goede
When requesting a shared irq with IRQF_TRIGGER_NONE then the irqaction flags get filled with the trigger type from the irq_data: if (!(new->flags & IRQF_TRIGGER_MASK)) new->flags |= irqd_get_trigger_type(&desc->irq_data); On the first setup_irq() the trigger type in irq_da

Re: [PATCH 06/12] audit: Use timespec64 to represent audit timestamps

2017-04-15 Thread Arnd Bergmann
On Sat, Apr 8, 2017 at 5:58 PM, Deepa Dinamani wrote: >> I have no problem merging this patch into audit/next for v4.12, would >> you prefer me to do that so at least this patch is merged? > > This would be fine. > But, I think whoever takes the last 2 deletion patches should also take them. > I'm

Re: [PATCH 1/2] regulator: s2mps11: Use kcalloc() in s2mps11_pmic_probe()

2017-04-15 Thread Krzysztof Kozlowski
On Fri, Apr 14, 2017 at 11:01:25PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 14 Apr 2017 22:00:35 +0200 > > A multiplication for the size determination of a memory allocation > indicated that an array data structure should be processed. > Thus use the corresponding funct

Re: [Patch v2 1/2] lustre: Parantheses added for Macro argument to avoid precedence issues

2017-04-15 Thread g...@kroah.com
On Sat, Apr 15, 2017 at 11:25:00AM +, Rishiraj Manwatkar wrote: > From: RishirajAM > > Parantheses are added for Macro argument, to avoid precedence issues. > > Signed-off-by: Rishiraj Manwatkar > --- > drivers/staging/lustre/lustre/obdclass/cl_io.c | 4 ++-- > 1 file changed, 2 insertions

Re: [Patch v2 2/2] lustre: fix coding style issue

2017-04-15 Thread g...@kroah.com
On Sat, Apr 15, 2017 at 11:25:11AM +, Rishiraj Manwatkar wrote: > Comparison should have the CONSTANT on the right side of the test Your subject needs to be better :( thanks, greg k-h

[PATCH 3/3] mm: __first_valid_page skip over offline pages

2017-04-15 Thread Michal Hocko
From: Michal Hocko __first_valid_page skips over invalid pfns in the range but it might still stumble over offline pages. At least start_isolate_page_range will mark those set_migratetype_isolate. This doesn't represent any immediate AFAICS because alloc_contig_range will fail to isolate those pa

[PATCH 2/3] mm, compaction: skip over holes in __reset_isolation_suitable

2017-04-15 Thread Michal Hocko
From: Michal Hocko __reset_isolation_suitable walks the whole zone pfn range and it tries to jump over holes by checking the zone for each page. It might still stumble over offline pages, though. Skip those by checking PageReserved. Signed-off-by: Michal Hocko --- mm/compaction.c | 2 ++ 1 fil

[no subject]

2017-04-15 Thread Michal Hocko
Hi, here I 3 more preparatory patches which I meant to send on Thursday but forgot... After more thinking about pfn walkers I have realized that the current code doesn't check offline holes in zones. From a quick review that doesn't seem to be a problem currently. Pfn walkers can race with memory o

[PATCH 1/3] mm: consider zone which is not fully populated to have holes

2017-04-15 Thread Michal Hocko
From: Michal Hocko __pageblock_pfn_to_page has two users currently, set_zone_contiguous which checks whether the given zone contains holes and pageblock_pfn_to_page which then carefully returns a first valid page from the given pfn range for the given zone. This doesn't handle zones which are not

[PULL] irqchip updates for 4.12

2017-04-15 Thread Marc Zyngier
Hi Thomas, Here's the first batch of irqchip updates for 4.12. On the menu, we have this time the unification of the Faraday irqchips in a single code base, ACPI support for mgigen, a new Mediatek wake-up controller, plus some updates here and there. Please pull. Thanks, M. The followi

[PATCH 0/3] staging: rtl8188eu: fix sparse signedness mismatch warnings

2017-04-15 Thread Aishwarya Pant
Suppress all sparse signedness mismatch warnings generated by- make C=2 M=drivers/staging/rtl8188eu/ CF="-Wtypesign" Aishwarya Pant (3): staging: rtl8188eu: fix sparse signedness warnings in rtw_get_ie staging: rtl8188eu: fix sparse signedness warnings in rtw_set_ie staging: rtl8188eu: fix s

[PATCH 1/3] staging: rtl8188eu: fix sparse signedness warnings in rtw_get_ie

2017-04-15 Thread Aishwarya Pant
Changed the type of len from (int *) to (unsigned int *) in the function rtw_get_ie(..) and wherever this function is called to suppress signedness mismatch warnings of the type- drivers/staging/rtl8188eu//core/rtw_ap.c:78:60: warning: incorrect type in argument 3 (different signedness) drivers/st

[PATCH 2/3] staging: rtl8188eu: fix sparse signedness warnings in rtw_set_ie

2017-04-15 Thread Aishwarya Pant
Changed the type of sz from (int) to (unsigned int) to suppress signedness mismatch warnings of the type- drivers/staging/rtl8188eu//core/rtw_ieee80211.c:258:97: warning: incorrect type in argument 5 (different signedness) drivers/staging/rtl8188eu//core/rtw_ieee80211.c:258:97:expected unsigne

[PATCH 3/3] staging: rtl8188eu: fix sparse signedness warnings in rtw_generate_ie

2017-04-15 Thread Aishwarya Pant
Changed the type of wpa_ie_len from (int *) to (unsigned int *) in the function rtw_get_wpa_ie(..) to suppress signedness mismatch warnings in rtw_generate_ie of the type- drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: warning: incorrect type in argument 2 (different signedness) drivers/

Re: [PATCH] genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs

2017-04-15 Thread Marc Zyngier
On Sat, Apr 15 2017 at 11:08:31 am BST, Hans de Goede wrote: > When requesting a shared irq with IRQF_TRIGGER_NONE then the irqaction > flags get filled with the trigger type from the irq_data: > > if (!(new->flags & IRQF_TRIGGER_MASK)) > new->flags |= irqd_get_trigger_typ

Re: [PATCH] irqchip/irq-imx-gpcv2: fix spinlock initialization

2017-04-15 Thread Marc Zyngier
On Thu, Apr 13 2017 at 11:27:31 pm BST, Tyler Baker wrote: > Call raw_spin_lock_init() before the spinlocks are used to prevent a > lockdep splat. > > Fixes the following trace: > > INFO: trying to register non-static key. > the code is fine but needs lockdep annotation. > turning off the locking

[PATCH] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-04-15 Thread Cathy Avery
When running multipath on a VM if all available paths go down the driver can schedule large amounts of storvsc_remove_lun work items to the same lun. In response to the failing paths typically storvsc responds by taking host->scan_mutex and issuing a TUR per lun. If there has been heavy IO to the f

Re: [PATCH] irqchip/irq-imx-gpcv2: fix spinlock initialization

2017-04-15 Thread Thomas Gleixner
On Sat, 15 Apr 2017, Marc Zyngier wrote: > > Acked-by: Marc Zyngier > > Thomas, any chance you could take this as a fix through the tip tree? It's in Linus tree already :)

[tip:irq/core] genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs

2017-04-15 Thread tip-bot for Hans de Goede
Commit-ID: 382bd4de61827dbaaf5fb4fb7b1f4be4a86505e7 Gitweb: http://git.kernel.org/tip/382bd4de61827dbaaf5fb4fb7b1f4be4a86505e7 Author: Hans de Goede AuthorDate: Sat, 15 Apr 2017 12:08:31 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 15:42:43 +0200 genirq: Use irqd_get_t

Re: [PATCH] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-04-15 Thread Christoph Hellwig
Just add a singlethreaded workqueue for storvsc_handle_error and you'll get serialization for all error handling for free.

Re: [PATCH] irqchip/irq-imx-gpcv2: fix spinlock initialization

2017-04-15 Thread Marc Zyngier
On Sat, Apr 15 2017 at 2:54:54 pm BST, Thomas Gleixner wrote: > On Sat, 15 Apr 2017, Marc Zyngier wrote: >> >> Acked-by: Marc Zyngier >> >> Thomas, any chance you could take this as a fix through the tip tree? > > It's in Linus tree already :) Ah, that's how you can tell I'm on holiday... ;-

[tip:locking/core] futex: Clarify mark_wake_futex memory barrier usage

2017-04-15 Thread tip-bot for Darren Hart (VMware)
Commit-ID: 38fcd06e9b7f6855db1f3ebac5e18b8fdb467ffd Gitweb: http://git.kernel.org/tip/38fcd06e9b7f6855db1f3ebac5e18b8fdb467ffd Author: Darren Hart (VMware) AuthorDate: Fri, 14 Apr 2017 15:31:38 -0700 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 16:03:46 +0200 futex: Clarify

[tip:locking/core] MAINTAINERS: Add FUTEX SUBSYSTEM

2017-04-15 Thread tip-bot for Darren Hart (VMware)
Commit-ID: 59cd42c29618c45cd3c56da43402b14f611888dd Gitweb: http://git.kernel.org/tip/59cd42c29618c45cd3c56da43402b14f611888dd Author: Darren Hart (VMware) AuthorDate: Fri, 14 Apr 2017 15:46:08 -0700 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 16:03:46 +0200 MAINTAINERS: Ad

[tip:sched/core] sparc/sysfs: Replace racy task affinity logic

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: ea875ec94eafb858990f3fe9528501f983105653 Gitweb: http://git.kernel.org/tip/ea875ec94eafb858990f3fe9528501f983105653 Author: Thomas Gleixner AuthorDate: Thu, 13 Apr 2017 10:17:07 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:54 +0200 sparc/sysfs: Replace

[tip:sched/core] workqueue: Provide work_on_cpu_safe()

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: 0e8d6a9336b487a1dd6f1991ff376e669d4c87c6 Gitweb: http://git.kernel.org/tip/0e8d6a9336b487a1dd6f1991ff376e669d4c87c6 Author: Thomas Gleixner AuthorDate: Wed, 12 Apr 2017 22:07:28 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:53 +0200 workqueue: Provide w

[tip:sched/core] ia64/topology: Remove cpus_allowed manipulation

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: 048c9b954e20396e0c45ee778466994d1be2e612 Gitweb: http://git.kernel.org/tip/048c9b954e20396e0c45ee778466994d1be2e612 Author: Thomas Gleixner AuthorDate: Wed, 12 Apr 2017 22:07:27 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:52 +0200 ia64/topology: Remov

[tip:sched/core] ia64/salinfo: Replace racy task affinity logic

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: 67cb85fdcee7fbc61c09c00360d1a4ae37641db4 Gitweb: http://git.kernel.org/tip/67cb85fdcee7fbc61c09c00360d1a4ae37641db4 Author: Thomas Gleixner AuthorDate: Wed, 12 Apr 2017 22:07:29 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:53 +0200 ia64/salinfo: Replac

[tip:sched/core] ia64/sn/hwperf: Replace racy task affinity logic

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: 9feb42ac88b516e378b9782e82b651ca5bed95c4 Gitweb: http://git.kernel.org/tip/9feb42ac88b516e378b9782e82b651ca5bed95c4 Author: Thomas Gleixner AuthorDate: Thu, 6 Apr 2017 14:56:18 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:53 +0200 ia64/sn/hwperf: Repla

[tip:sched/core] powerpc/smp: Replace open coded task affinity logic

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: 6d11b87d55eb75007a3721c2de5938f5bbf607fb Gitweb: http://git.kernel.org/tip/6d11b87d55eb75007a3721c2de5938f5bbf607fb Author: Thomas Gleixner AuthorDate: Wed, 12 Apr 2017 22:07:31 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:54 +0200 powerpc/smp: Replace

[tip:sched/core] cpufreq/ia64: Replace racy task affinity logic

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: 38f05ed04beb276f780fcd2b5c0b78c76d0b3c0c Gitweb: http://git.kernel.org/tip/38f05ed04beb276f780fcd2b5c0b78c76d0b3c0c Author: Thomas Gleixner AuthorDate: Wed, 12 Apr 2017 22:55:03 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:55 +0200 cpufreq/ia64: Replac

[tip:sched/core] cpufreq/sh: Replace racy task affinity logic

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: 205dcc1ecbc566cbc20acf246e68de3b080b3ecf Gitweb: http://git.kernel.org/tip/205dcc1ecbc566cbc20acf246e68de3b080b3ecf Author: Thomas Gleixner AuthorDate: Wed, 12 Apr 2017 22:07:36 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:55 +0200 cpufreq/sh: Replace

[tip:sched/core] ACPI/processor: Fix error handling in __acpi_processor_start()

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: a5cbdf693a60d5b86d4d21dfedd90f17754eb273 Gitweb: http://git.kernel.org/tip/a5cbdf693a60d5b86d4d21dfedd90f17754eb273 Author: Thomas Gleixner AuthorDate: Wed, 12 Apr 2017 22:07:33 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:54 +0200 ACPI/processor: Fix

[tip:sched/core] cpufreq/sparc-us3: Replace racy task affinity logic

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: 9fe24c4e92d3963d92d7d383e28ed098bd5689d8 Gitweb: http://git.kernel.org/tip/9fe24c4e92d3963d92d7d383e28ed098bd5689d8 Author: Thomas Gleixner AuthorDate: Wed, 12 Apr 2017 22:07:37 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:55 +0200 cpufreq/sparc-us3: R

[tip:sched/core] ACPI/processor: Replace racy task affinity logic

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: 8153f9ac43897f9f4786b30badc134fcc1a4fb11 Gitweb: http://git.kernel.org/tip/8153f9ac43897f9f4786b30badc134fcc1a4fb11 Author: Thomas Gleixner AuthorDate: Wed, 12 Apr 2017 22:07:34 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:54 +0200 ACPI/processor: Repl

[tip:sched/core] cpufreq/sparc-us2e: Replace racy task affinity logic

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: 12699ac53a2e5fbd1fd7c164b11685d55c8aa28b Gitweb: http://git.kernel.org/tip/12699ac53a2e5fbd1fd7c164b11685d55c8aa28b Author: Thomas Gleixner AuthorDate: Thu, 13 Apr 2017 10:22:43 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:56 +0200 cpufreq/sparc-us2e:

[tip:sched/core] crypto: N2 - Replace racy task affinity logic

2017-04-15 Thread tip-bot for Thomas Gleixner
Commit-ID: 73810a069120aa831debb4d967310ab900f628ad Gitweb: http://git.kernel.org/tip/73810a069120aa831debb4d967310ab900f628ad Author: Thomas Gleixner AuthorDate: Thu, 13 Apr 2017 10:20:23 +0200 Committer: Thomas Gleixner CommitDate: Sat, 15 Apr 2017 12:20:56 +0200 crypto: N2 - Replace

Re: [Xen-devel] [PATCH v2] xen, kdump: handle pv domain in paddr_vmcoreinfo_note()

2017-04-15 Thread Petr Tesarik
On Sat, 15 Apr 2017 00:26:05 +0200 Daniel Kiper wrote: > On Fri, Apr 14, 2017 at 06:53:36PM +0200, Petr Tesarik wrote: >[...] > > shifted towards libkdumpfile (https://github.com/ptesarik/libkdumpfile), > > and this library can open PV guest dump files without any issues. > > Great! AIUI, it rem

[PATCH] regulator: rn5t618: Fix Fix out of bounds array access

2017-04-15 Thread Axel Lin
The commit "regulator: rn5t618: Add RN5T567 PMIC support" added RN5T618_DCDC4 to the enum, then RN5T618_REG_NUM is also changed. So for rn5t618, there is out of bounds array access when checking regulators[i].name in the for loop. The number of regulators is different for rn5t567 and rn5t618, so w

[PATCH RESEND] regulator: rn5t618: Fix out of bounds array access

2017-04-15 Thread Axel Lin
The commit "regulator: rn5t618: Add RN5T567 PMIC support" added RN5T618_DCDC4 to the enum, then RN5T618_REG_NUM is also changed. So for rn5t618, there is out of bounds array access when checking regulators[i].name in the for loop. The number of regulators is different for rn5t567 and rn5t618, so w

[PATCH] Revert "mm, page_alloc: only use per-cpu allocator for irq-safe requests"

2017-04-15 Thread Mel Gorman
This reverts commit 374ad05ab64d696303cec5cc8ec3a65d457b7b1c. While the patch worked great for userspace allocations, the fact that softirq loses the per-cpu allocator caused problems. It needs to be redone taking into account that a separate list is needed for hard/soft IRQs or alternatively find

Re: [PATCH] mm, page_alloc: re-enable softirq use of per-cpu page allocator

2017-04-15 Thread Mel Gorman
On Fri, Apr 14, 2017 at 12:10:27PM +0200, Jesper Dangaard Brouer wrote: > On Mon, 10 Apr 2017 14:26:16 -0700 > Andrew Morton wrote: > > > On Mon, 10 Apr 2017 16:08:21 +0100 Mel Gorman > > wrote: > > > > > IRQ context were excluded from using the Per-Cpu-Pages (PCP) lists caching > > > of order

Re: [PATCH v2 11/33] dm: add dax_device and dax_operations support

2017-04-15 Thread Dan Williams
[ adding some missing cc's ] Cover letter patch here: https://lists.01.org/pipermail/linux-nvdimm/2017-April/009648.html On Fri, Apr 14, 2017 at 7:34 PM, Dan Williams wrote: > Allocate a dax_device to represent the capacity of a device-mapper > instance. Provide a ->direct_access() method via th

[backport v4.9] tpm_tis: use default timeout value if chip reports it as zero

2017-04-15 Thread Jarkko Sakkinen
From: "Maciej S. Szmigiero" Since commit 1107d065fdf1 ("tpm_tis: Introduce intermediate layer for TPM access") Atmel 3203 TPM on ThinkPad X61S (TPM firmware version 13.9) no longer works. The initialization proceeds fine until we get and start using chip-reported timeouts - and the chip reports

Re: [RFC PATCH v5 5/6] mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables

2017-04-15 Thread Marek Vasut
On 03/23/2017 12:33 AM, Cyrille Pitchen wrote: > This patch adds support to the JESD216B standard and parses the SFDP > tables to dynamically initialize the 'struct spi_nor_flash_parameter'. > > Signed-off-by: Cyrille Pitchen Hi, mostly nits below. > --- > drivers/mtd/spi-nor/spi-nor.c | 558

Re: [RFC PATCH v5 4/6] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2017-04-15 Thread Marek Vasut
On 03/23/2017 12:33 AM, Cyrille Pitchen wrote: Hr, sigh, took me almost month to review this one, sorry :( > This patch is a first step in introducing the support of SPI memories > with non-uniform erase sizes like Spansion s25fs512s. > > It introduces the memory erase map which splits the

Re: [RFC PATCH v5 6/6] mtd: spi-nor: parse SFDP 4-byte Address Instruction Table

2017-04-15 Thread Marek Vasut
On 03/23/2017 12:33 AM, Cyrille Pitchen wrote: > This patch adds supports for SFDP (JESD216B) 4-byte Address Instruction > Table. This table is optional but when available, we parse it to get the > 4-byte address op codes supported by the memory. > Using these op codes is stateless as opposed to en

[GIT PULL] parisc architecture fix for v4.11-rc7

2017-04-15 Thread Helge Deller
Hi Linus, please pull one important fix for the parisc architecture for kernel 4.11-rc7 from: git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git parisc-4.11-4 Mikulas Patocka fixed a few bugs in our new pa_memcpy() assembler function, e.g. one bug made the kernel unbootabl

Re: [backport v4.9] tpm_tis: use default timeout value if chip reports it as zero

2017-04-15 Thread Maciej S. Szmigiero
Hi Jarkko, On 15.04.2017 17:26, Jarkko Sakkinen wrote: From: "Maciej S. Szmigiero" Since commit 1107d065fdf1 ("tpm_tis: Introduce intermediate layer for TPM access") Atmel 3203 TPM on ThinkPad X61S (TPM firmware version 13.9) no longer works. The initialization proceeds fine until we get and

[GIT PULL] SCSI fixes for 4.11-rc6

2017-04-15 Thread James Bottomley
This is larger than it would be: we missed the -rc5 fixes pull request because of a problem linux-next found with the lowest patch which necessitated a rebase to fix. This is seven small fixes which are all for user visible issues that fortunately only occur in rare circumstances. The most seriou

Re: [git pull] vfs fixes

2017-04-15 Thread Linus Torvalds
On Fri, Apr 14, 2017 at 11:41 PM, Vegard Nossum wrote: > > I'm seeing the same memfd_create/name_to_handle_at/path_lookupat > use-after-free that Dmitry was seeing here: Ok, see if that is gone in current git with commit c0eb027e5aef ("vfs: don't do RCU lookup of empty pathnames")

Re: [PATCH RESEND] regulator: rn5t618: Fix out of bounds array access

2017-04-15 Thread Stefan Agner
On 2017-04-15 07:52, Axel Lin wrote: > The commit "regulator: rn5t618: Add RN5T567 PMIC support" added > RN5T618_DCDC4 to the enum, then RN5T618_REG_NUM is also changed. > So for rn5t618, there is out of bounds array access when checking > regulators[i].name in the for loop. I use designated initi

[PATCH 2/2] mfd: omap-usb-tll: Configure ULPIAUTOIDLE

2017-04-15 Thread Tony Lindgren
The idle mode needs to be only disabled for UTMIAUTOIDLE while ULPIAUTOIDLE can be enabled. This matches the TLL_CHANNEL_CONF_i register configuration for ehci-tll in the Motorola Linux kernel tree for Wrigley 3G LTE modem on droid 4 and the modem still stays responsive. Cc: Felipe Balbi Cc: Kes

[PATCH 1/2] mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode

2017-04-15 Thread Tony Lindgren
Commit 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver") added support for USB TLL, but uses OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF bit the wrong way. The comments in the code are correct, but the inverted use of OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF causes the register to be enabled instea

[PATCHv2 0/2] mfd: omap-usb-tll: Fixes for USB TLL mode

2017-04-15 Thread Tony Lindgren
Hi Here's v2 of this that move the enabling of ULPIAUTOIDLE bit into a separate patch as suggested by Roger Quadros . Both patches can wait for v4.12. Regards, Tony Tony Lindgren (2): mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode mfd: omap-usb-tll: Configure ULPIAUTOIDLE driv

Re: [git pull] vfs fixes

2017-04-15 Thread Al Viro
On Sat, Apr 15, 2017 at 09:51:40AM -0700, Linus Torvalds wrote: > On Fri, Apr 14, 2017 at 11:41 PM, Vegard Nossum > wrote: > > > > I'm seeing the same memfd_create/name_to_handle_at/path_lookupat > > use-after-free that Dmitry was seeing here: > > Ok, see if that is gone in current git with comm

[GIT PULL] libnvdimm fixes for 4.11-rc7

2017-04-15 Thread Dan Williams
Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes ...to receive: A small crop of lockdep, sleeping while atomic, and other fixes / band-aids in advance of the full-blown reworks targeting the next merge window. The largest change here is "l

Re: [patch 0/6] hwmon/coretemp: Hotplug fixes, cleanups and state machine conversion

2017-04-15 Thread Tommi Rantala
2017-04-14 20:35 GMT+03:00 Thomas Gleixner : > On Wed, 12 Apr 2017, Thomas Gleixner wrote: >> >> Can you please try the following: >> >> # for STATE in freezer devices platform processors core; do \ >> echo $STATE; \ >> echo $STATE >/sys/power/pm_test; \ >> echo mem >/sys/power/state >> >> Th

Re: regulator: s2mps11: Use kcalloc() in s2mps11_pmic_probe()

2017-04-15 Thread SF Markus Elfring
>> A multiplication for the size determination of a memory allocation >> indicated that an array data structure should be processed. >> Thus use the corresponding function "kcalloc". >> >> This issue was detected by using the Coccinelle software. > > Unfortunately you write mostly cryptic commit m

[patch 05/20] x86/mtrr: Remove get_online_cpus() from mtrr_save_state()

2017-04-15 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior mtrr_save_state() is invoked from native_cpu_up() which is in the context of a CPU hotplug operation and therefor calling get_online_cpus() is pointless. While this works in the current get_online_cpus() implementation it prevents from converting the hotplug locki

[patch 09/20] hwtracing/coresight-etm4x: Use cpuhp_setup_state_nocalls_locked()

2017-04-15 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior etm_probe4() holds get_online_cpus() while invoking cpuhp_setup_state_nocalls(). cpuhp_setup_state_nocalls() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use cpuhp_setup_state_nocalls_lo

[patch 06/20] cpufreq: Use cpuhp_setup_state_nocalls_locked()

2017-04-15 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior cpufreq holds get_online_cpus() while invoking cpuhp_setup_state_nocalls() to make subsys_interface_register() and the registration of hotplug calls atomic versus cpu hotplug. cpuhp_setup_state_nocalls() invokes get_online_cpus() as well. This is correct, but prev

[patch 16/20] perf/x86/intel: Drop get_online_cpus() in intel_snb_check_microcode()

2017-04-15 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior If intel_snb_check_microcode() is invoked via microcode_init -> perf_check_microcode -> intel_snb_check_microcode then get_online_cpus() is invoked nested. This works with the current implementation of get_online_cpus() but prevents converting it to a percpu rws

[patch 00/20] cpu/hotplug: Convert get_online_cpus() to a percpu_rwsem

2017-04-15 Thread Thomas Gleixner
get_online_cpus() is used in hot pathes in mainline and even more so in RT. That can show up badly under certain conditions because every locker contends on a global mutex. RT has it's own homebrewn mitigation which is an (badly done) open coded implementation of percpu_rwsems with recursion suppor

[patch 19/20] ACPI/processor: Use cpu_hotplug_disable() instead of get_online_cpus()

2017-04-15 Thread Thomas Gleixner
Converting the hotplug locking, i.e. get_online_cpus(), to a percpu rwsem unearthed a circular lock dependency which was hidden from lockdep due to the lockdep annotation of get_online_cpus() which prevents lockdep from creating full dependency chains. CPU0CPU1

[patch 10/20] perf/x86/intel/cqm: Use cpuhp_setup_state_locked()

2017-04-15 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior intel_cqm_init() holds get_online_cpus() while registerring the hotplug callbacks. cpuhp_setup_state() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use cpuhp_setup_state_locked() to avoi

[patch 18/20] PCI: Replace the racy recursion prevention

2017-04-15 Thread Thomas Gleixner
pci_call_probe() can called recursively when a physcial function is probed and the probing creates virtual functions, which are populated via pci_bus_add_device() which in turn can end up calling pci_call_probe() again. The code has an interesting way to prevent recursing into the workqueue code.

[patch 03/20] padata: Make padata_alloc() static

2017-04-15 Thread Thomas Gleixner
No users outside of padata.c Signed-off-by: Thomas Gleixner Cc: Steffen Klassert Cc: linux-cry...@vger.kernel.org --- include/linux/padata.h |3 --- kernel/padata.c| 34 +- 2 files changed, 17 insertions(+), 20 deletions(-) --- a/include/linux/pada

[patch 07/20] KVM/PPC/Book3S HV: Use cpuhp_setup_state_nocalls_locked()

2017-04-15 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior kvmppc_alloc_host_rm_ops() holds get_online_cpus() while invoking cpuhp_setup_state_nocalls(). cpuhp_setup_state_nocalls() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use cpuhp_setup_st

[patch 17/20] PCI: Use cpu_hotplug_disable() instead of get_online_cpus()

2017-04-15 Thread Thomas Gleixner
Converting the hotplug locking, i.e. get_online_cpus(), to a percpu rwsem unearthed a circular lock dependency which was hidden from lockdep due to the lockdep annotation of get_online_cpus() which prevents lockdep from creating full dependency chains. There are several variants of this. And exampl

[patch 12/20] s390/kernel: Use stop_machine_locked()

2017-04-15 Thread Thomas Gleixner
stp_work_fn() holds get_online_cpus() while invoking stop_machine(). stop_machine() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use stop_machine_locked() to avoid the nested call. Signed-off-by: Sebastian Andrzej Siewi

[patch 11/20] ARM/hw_breakpoint: Use cpuhp_setup_state_locked()

2017-04-15 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior arch_hw_breakpoint_init() holds get_online_cpus() while registerring the hotplug callbacks. cpuhp_setup_state() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use cpuhp_setup_state_locked(

[patch 13/20] powerpc/powernv: Use stop_machine_locked()

2017-04-15 Thread Thomas Gleixner
set_subcores_per_core() holds get_online_cpus() while invoking stop_machine(). stop_machine() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use stop_machine_locked() to avoid the nested call. Signed-off-by: Sebastian And

[patch 20/20] cpu/hotplug: Convert hotplug locking to percpu rwsem

2017-04-15 Thread Thomas Gleixner
There are no more (known) nested calls to get_online_cpus() so it's possible to remove the nested call magic and convert the mutex to a percpu-rwsem, which speeds up get/put_online_cpus() significantly for the uncontended case. The contended case (write locked for hotplug operations) is slow anywa

[patch 15/20] x86/perf: Drop EXPORT of perf_check_microcode

2017-04-15 Thread Thomas Gleixner
The only caller is the microcode update, which cannot be modular. Drop the export. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Borislav Petkov Cc: x...@kernel.org --- arch/x86/events/core.c |1 - 1 file changed, 1 deletion(-) --- a/arch/x86/events/core.c +++ b/arch/x86/events/c

[patch 08/20] hwtracing/coresight-etm3x: Use the locked version of cpuhp_setup_state_nocalls()

2017-04-15 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior etm_probe() holds get_online_cpus() while invoking cpuhp_setup_state_nocalls(). cpuhp_setup_state_nocalls() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use cpuhp_setup_state_nocalls_loc

[patch 04/20] padata: Avoid nested calls to get_online_cpus() in pcrypt_init_padata()

2017-04-15 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior pcrypt_init_padata() get_online_cpus() padata_alloc_possible() padata_alloc() get_online_cpus() The nested call to get_online_cpus() works with the current implementation, but prevents the conversion to a percpu rwsem. The other caller of padata

[patch 14/20] kernel/hotplug: Use stop_machine_locked() in takedown_cpu()

2017-04-15 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior takedown_cpu() is a cpu hotplug function invoking stop_machine(). The cpu hotplug machinery holds the hotplug lock for write. stop_machine() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem.

[patch 01/20] cpu/hotplug: Provide cpuhp_setup/remove_state[_nocalls]_locked()

2017-04-15 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior Some call sites of cpuhp_setup/remove_state[_nocalls]() are within a get_online_cpus() protected region. cpuhp_setup/remove_state[_nocalls]() call get_online_cpus() as well, which is possible in the current implementation but prevetns converting the hotplug lockin

[patch 02/20] stop_machine: Provide stop_machine_locked()

2017-04-15 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior Some call sites of stop_machine() are within a get_online_cpus() protected region. stop_machine() calls get_online_cpus() as well, which is possible in the current implementation but prevents converting the hotplug locking to a percpu rwsem. Provide stop_machine_

Re: [PATCH] misc: lkdtm: Add volatile to intentional NULL pointer reference

2017-04-15 Thread Kees Cook
On Fri, Apr 14, 2017 at 2:15 PM, Matthias Kaehlcke wrote: > From: Michael Davidson > > Add a volatile qualifier where a NULL pointer is deliberately > dereferenced to trigger a panic. > > Without the volatile qualifier clang will issue the following warning: > "indirection of non-volatile null po

Re: [RFC 0/8] Copy Offload with Peer-to-Peer PCI Memory

2017-04-15 Thread Logan Gunthorpe
Thanks, Benjamin, for the summary of some of the issues. On 14/04/17 04:07 PM, Benjamin Herrenschmidt wrote > So I assume the p2p code provides a way to address that too via special > dma_ops ? Or wrappers ? Not at this time. We will probably need a way to ensure the iommus do not attempt to rema

[PATCH] ASoC: topology: use j for internal loop counter

2017-04-15 Thread Colin King
From: Colin Ian King Currently variable i is being for 2 nested for loops. Fix this by using integer loop counter j for the inside for loop. Fixes: 1a7dd6e2f1929 ("ASoC: topology: Allow a widget to have multiple enum controls") Signed-off-by: Colin Ian King --- sound/soc/soc-topology.c | 5 ++

Re: [PATCH linux 2/2] net sched actions: fix refcount decrement on error

2017-04-15 Thread Cong Wang
On Fri, Apr 14, 2017 at 2:08 AM, Wolfgang Bumiller wrote: > Before I do that - trying to wrap my head around the interdependencies > here better to be thorough - I noticed that tcf_hash_release() can > return ACT_P_DELETED. The ACT_P_CREATED case means tcf_hash_create() > was used, in the other ca

Re: [PATCH linux 2/2] net sched actions: fix refcount decrement on error

2017-04-15 Thread Wolfgang Bumiller
> On April 15, 2017 at 8:20 PM Cong Wang wrote: > > > On Fri, Apr 14, 2017 at 2:08 AM, Wolfgang Bumiller > wrote: > > Before I do that - trying to wrap my head around the interdependencies > > here better to be thorough - I noticed that tcf_hash_release() can > > return ACT_P_DELETED. The ACT_

[GIT PULL 00/19] LightNVM patches for 4.12.

2017-04-15 Thread Matias Bjørling
Hi Jens, With this merge window, we like to push pblk upstream. It is a new host-side translation layer that implements support for exposing Open-Channel SSDs as block devices. We have described pblk in the LightNVM paper "LightNVM: The Linux Open-Channel SSD Subsystem" that was accepted at FAST

[GIT PULL 05/19] lightnvm: free reverse device map

2017-04-15 Thread Matias Bjørling
From: Javier González Free the reverse mapping table correctly on target tear down Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/lightnvm/core.c b/drivers/lig

[GIT PULL 01/19] lightnvm: Fix error handling

2017-04-15 Thread Matias Bjørling
From: Christophe JAILLET According to error handling in this function, it is likely that going to 'out' was expected here. Signed-off-by: Christophe JAILLET Signed-off-by: Matias Bjørling --- drivers/lightnvm/rrpc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dri

[GIT PULL 04/19] lightnvm: rename scrambler controller hint

2017-04-15 Thread Matias Bjørling
From: Javier González According to the OCSSD 1.2 specification, the 0x200 hint enables the media scrambler for the read/write opcode, providing that the controller has been correctly configured by the firmware. Rename the macro to represent this meaning. Signed-off-by: Javier González Signed-of

[GIT PULL 13/19] lightnvm: clean unused variable

2017-04-15 Thread Matias Bjørling
From: Javier González Clean unused variable on lightnvm core. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index eb9ab1a..258007a 100644 --- a/d

[GIT PULL 11/19] lightnvm: allow to init targets on factory mode

2017-04-15 Thread Matias Bjørling
From: Javier González Target initialization has two responsibilities: creating the target partition and instantiating the target. This patch enables to create a factory partition (e.g., do not trigger recovery on the given target). This is useful for target development and for being able to resto

[GIT PULL 12/19] lightnvm: make nvm_free static

2017-04-15 Thread Matias Bjørling
From: Javier González Prefix the nvm_free static function with a missing static keyword. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/cor

[GIT PULL 18/19] lightnvm: fix some WARN() messages

2017-04-15 Thread Matias Bjørling
From: Dan Carpenter WARN_ON() takes a condition, not an error message. I slightly tweaked some conditions so hopefully it's more clear. Signed-off-by: Dan Carpenter Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-read.c | 12 ++-- drivers/lightnvm/pblk-recovery.c | 2 +-

[GIT PULL 17/19] lightnvm: pblk-gc: fix an error pointer dereference in init

2017-04-15 Thread Matias Bjørling
From: Dan Carpenter These labels are reversed so we could end up dereferencing an error pointer or leaking. Fixes: 7f347ba6bb3a ("lightnvm: physical block device (pblk) target") Signed-off-by: Dan Carpenter Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-gc.c | 4 ++-- 1 file changed

[GIT PULL 19/19] lightnvm: fix some error code in pblk-init.c

2017-04-15 Thread Matias Bjørling
From: Dan Carpenter There were a bunch of places in pblk_lines_init() where we didn't set an error code. And in pblk_writer_init() we accidentally return 1 instead of a correct error code, which would result in a Oops later. Fixes: 11a5d6fdf919 ("lightnvm: physical block device (pblk) target")

[GIT PULL 08/19] lightnvm: double-clear of dev->lun_map on target init error

2017-04-15 Thread Matias Bjørling
From: Javier González The dev->lun_map bits are cleared twice if an target init error occurs. First in the target clean routine, and then next in the nvm_tgt_create error function. Make sure that it is only cleared once by extending nvm_remove_tgt_devi() with a clear bit, such that clearing of bi

[GIT PULL 14/19] lightnvm: fix type checks on rrpc

2017-04-15 Thread Matias Bjørling
From: Javier González sector_t is always unsigned, therefore avoid < 0 checks on it. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/rrpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrp

[GIT PULL 15/19] lightnvm: convert sprintf into strlcpy

2017-04-15 Thread Matias Bjørling
From: Javier González Convert sprintf calls to strlcpy in order to make possible buffer overflow more obvious. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/lightnvm/c

  1   2   >