Re: [PATCH v2 0/2] kbuild: cleanup asm-offset generation, and make it work with clang

2017-04-23 Thread Masahiro Yamada
2017-04-21 15:21 GMT+09:00 Masahiro Yamada : > 1/2 is a trivial cleanup of sed script > > 2/2 imports clang work-around from U-Boot. Series, applied to linux-kbuild/kbuild. -- Best Regards Masahiro Yamada

[PATCH 1/1] mt7601u: check return value of alloc_skb

2017-04-23 Thread Pan Bian
Function alloc_skb() will return a NULL pointer if there is no enough memory. However, in function mt7601u_mcu_msg_alloc(), its return value is not validated before it is used. This patch fixes it. Signed-off-by: Pan Bian --- drivers/net/wireless/mediatek/mt7601u/mcu.c | 10 -- 1 file ch

[PATCH 1/1] tipc: check return value of nlmsg_new

2017-04-23 Thread Pan Bian
Function nlmsg_new() will return a NULL pointer if there is no enough memory, and its return value should be checked before it is used. However, in function tipc_nl_node_get_monitor(), the validation of the return value of function nlmsg_new() is missed. This patch fixes the bug. Signed-off-by: Pa

Re: [PATCH] kbuild: drop -Wno-unknown-warning-option from clang options

2017-04-23 Thread Masahiro Yamada
2017-04-13 7:25 GMT+09:00 Masahiro Yamada : > Since commit c3f0d0bc5b01 ("kbuild, LLVMLinux: Add -Werror to > cc-option to support clang"), cc-option and friends work correctly > for clang. > > However, the combination of -Werror and -Wno-unknown-warning-option > makes clang happy with any unknown

Re: [PATCH 1/1] tipc: check return value of nlmsg_new

2017-04-23 Thread Joe Perches
On Sun, 2017-04-23 at 15:09 +0800, Pan Bian wrote: > Function nlmsg_new() will return a NULL pointer if there is no enough > memory, and its return value should be checked before it is used. > However, in function tipc_nl_node_get_monitor(), the validation of the > return value of function nlmsg_ne

[PATCH v2 1/2] tiocsti-restrict : Add owner user namespace to tty_struct

2017-04-23 Thread Matt Brown
This patch adds struct user_namespace *owner_user_ns to the tty_struct. Then it is set to current_user_ns() in the alloc_tty_struct function. This is done to facilitate capability checks against the original user namespace that allocated the tty. E.g. ns_capable(tty->owner_user_ns,CAP_SYS_ADMIN)

[PATCH v2 2/2] tiocsti-restrict : make TIOCSTI ioctl require CAP_SYS_ADMIN

2017-04-23 Thread Matt Brown
This introduces the tiocsti_restrict sysctl, whose default is controlled via CONFIG_SECURITY_TIOCSTI_RESTRICT. When activated, this control restricts all TIOCSTI ioctl calls from non CAP_SYS_ADMIN users. This patch was inspired from GRKERNSEC_HARDEN_TTY. This patch would have prevented https://bu

[PATCH 1/2] team: fix memory leak

2017-04-23 Thread Pan Bian
In function team_nl_send_port_list_get(), pointer skb keeps the return value of nlmsg_new(). When the call to genlmsg_put() fails, the memory is not freed. This will result in a memory leak bug. This patch fixes it. Signed-off-by: Pan Bian --- drivers/net/team/team.c | 4 +++- 1 file changed, 3

[PATCH 2/2] team: fix memory leak

2017-04-23 Thread Pan Bian
In function team_nl_send_options_get(), pointer skb keeps the return value of function nlmsg_new(). When the call to genlmsg_put() fails, the control flow directly returns and does not free skb. This will result in a memory leak bug. This patch fixes it. Signed-off-by: Pan Bian --- drivers/net/t

Re: [PATCH v2 03/12] IB/ocrdma: Improve size determinations in ten functions

2017-04-23 Thread Leon Romanovsky
On Sat, Apr 22, 2017 at 04:36:19PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 22 Apr 2017 13:26:49 +0200 > > Replace the specification of data types by pointer dereferences > as the parameter for the operator "sizeof" to make the corresponding size > determinations a bit s

Re: [PATCH 1/1] tipc: check return value of nlmsg_new

2017-04-23 Thread PanBian
On Sun, Apr 23, 2017 at 12:17:16AM -0700, Joe Perches wrote: > On Sun, 2017-04-23 at 15:09 +0800, Pan Bian wrote: > > Function nlmsg_new() will return a NULL pointer if there is no enough > > memory, and its return value should be checked before it is used. > > However, in function tipc_nl_node_get

undefined reference to`ccu_gate_helper_disable in clk/sunxi-ng/ccu_common on linux-next

2017-04-23 Thread Corentin Labbe
Hello I got this build error with linux-next-20170421 MODPOST vmlinux.o drivers/built-in.o: In function `ccu_pll_notifier_cb': drivers/clk/sunxi-ng/ccu_common.c:71: undefined reference to `ccu_gate_helper_disable' drivers/clk/sunxi-ng/ccu_common.c:73: undefined reference to `ccu_gate_helper_en

Re: [PATCH 1/3] nvme: Fix APST comment

2017-04-23 Thread Christoph Hellwig
On Fri, Apr 21, 2017 at 04:19:22PM -0700, Andy Lutomirski wrote: > There was a typo in the description of the timeout heuristic. Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 2/3] nvme: Display raw APST configuration via DYNAMIC_DEBUG

2017-04-23 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 3/3] nvme: Add nvme_core.force_apst to ignore the NO_APST quirk

2017-04-23 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH 1/1] tipc: check return value of nlmsg_new

2017-04-23 Thread Joe Perches
On Sun, 2017-04-23 at 16:00 +0800, PanBian wrote: > On Sun, Apr 23, 2017 at 12:17:16AM -0700, Joe Perches wrote: > > On Sun, 2017-04-23 at 15:09 +0800, Pan Bian wrote: > > > Function nlmsg_new() will return a NULL pointer if there is no enough > > > memory, and its return value should be checked be

[PATCH 0/2] Add PCIe host driver support for some Mediatek SoCs

2017-04-23 Thread Ryder Lee
Hi, This patch series add PCIe host controller driver and dt-binding documentation for Mediatek mt7623 SoCs families. This driver was validated using Broadcom Tigon3 ethernet card. Ryder Lee (2): PCI: mediatek: Add Mediatek PCIe host controller support dt-bindings: pcie: Add documentation fo

[PATCH 1/2] phy: add PCIe phy driver for mt7623 SoCs families

2017-04-23 Thread Ryder Lee
support PCIe phy of mt7623 SoCs families Signed-off-by: Ryder Lee --- drivers/phy/Kconfig | 9 ++ drivers/phy/Makefile | 1 + drivers/phy/phy-mt7623-pcie.c | 290 ++ 3 files changed, 300 insertions(+) create mode 100644 drivers/phy/

[PATCH 2/2] dt-bindings: phy: Add documentation for Mediatek PCIe PHY

2017-04-23 Thread Ryder Lee
Add documentation for PCIe PHY available in MT7623 series SoCs. Signed-off-by: Ryder Lee --- .../devicetree/bindings/phy/phy-mt7623-pcie.txt| 67 ++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-mt7623-pcie.txt diff --git

[PATCH 2/2] dt-bindings: pcie: Add documentation for Mediatek PCIe

2017-04-23 Thread Ryder Lee
Add documentation for PCIe host driver available in MT7623 series SoCs. Signed-off-by: Ryder Lee --- .../bindings/pci/mediatek,mt7623-pcie.txt | 153 + 1 file changed, 153 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/mediatek,mt7623-pcie.t

[PATCH 0/2] Add PCIe phy driver for some Mediatek SoCs

2017-04-23 Thread Ryder Lee
Hi, This patch series add PCIe phy driver and related dt-binding file for Mediatek mt7623 SoCs families. Thanks. Ryder Lee (2): phy: add PCIe phy driver for mt7623 SoCs families dt-bindings: phy: Add documentation for Mediatek PCIe PHY .../devicetree/bindings/phy/phy-mt7623-pcie.txt|

[PATCH 1/2] PCI: mediatek: Add Mediatek PCIe host controller support

2017-04-23 Thread Ryder Lee
Add support for the Mediatek PCIe controller which can be found on MT7623A/N, MT2701 and MT8521p platforms. Signed-off-by: Ryder Lee --- drivers/pci/host/Kconfig | 11 + drivers/pci/host/Makefile| 1 + drivers/pci/host/pcie-mediatek.c | 611

Re: [PATCH] scsi: pmcraid: use normal copy_from_user

2017-04-23 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 2/4] scsi: pmcraid: fix lock imbalance in pmcraid_reset_reload()

2017-04-23 Thread Christoph Hellwig
On Thu, Apr 20, 2017 at 07:54:46PM +0200, Arnd Bergmann wrote: > sparse found a bug that has always been present since the driver > was merged: > > drivers/scsi/pmcraid.c:2353:12: warning: context imbalance in > 'pmcraid_reset_reload' - different lock contexts for basic block > > This adds the m

Re: [PATCH v6 0/7] perf report: Show branch type

2017-04-23 Thread Jin, Yao
On 4/20/2017 5:36 PM, Jiri Olsa wrote: On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote: v6: Update according to the review comments from Jiri Olsa . Major modifications are: 1. Move that multiline conditional code inside {} brackets. 2. Move branch_type_stat_display()

Re: [PATCH 3/4] scsi: pmcraid: fix endianess sparse annotations

2017-04-23 Thread Christoph Hellwig
> mb(); > - iowrite32(le32_to_cpu(cmd->ioa_cb->ioarcb.ioarcb_bus_addr), > - pinstance->ioarrin); > + iowrite32(le64_to_cpu(cmd->ioa_cb->ioarcb.ioarcb_bus_addr), > pinstance->ioarrin); It really seems like some of these fields should be swapped once and store in an in-m

Re: [PATCH] scsi: mvumi: add check for dma mapping errors

2017-04-23 Thread Christoph Hellwig
On Sat, Apr 22, 2017 at 02:17:50AM +0300, Alexey Khoroshilov wrote: > } else { > - scmd->SCp.dma_handle = scsi_bufflen(scmd) ? > - pci_map_single(mhba->pdev, scsi_sglist(scmd), > - scsi_bufflen(scmd), > -

Re: [PATCH 4/4] scsi: pmcraid: fix minor sparse warnings

2017-04-23 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

[PATCH 1/1] power: check return value of devm_kzalloc

2017-04-23 Thread Pan Bian
Function devm_kzalloc() will return a NULL pointer if there is no enough memory. However, in function isp1704_charger_probe(), the return value of devm_kzalloc() is used without validation. This may result in a bad memory access bug. This patch fixes the bug. Signed-off-by: Pan Bian --- drivers/

[PATCH 0/2] dmaengine: k3dma: Fine-tuning for five function implementations

2017-04-23 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 23 Apr 2017 10:56:54 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (2): Use devm_kcalloc() in k3_dma_probe() Adjust six checks for null pointers drivers/dma/k3dma.c | 20 ++-- 1 file c

[PATCH 1/2] dmaengine: k3dma: Use devm_kcalloc() in k3_dma_probe()

2017-04-23 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 23 Apr 2017 10:30:32 +0200 * Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "devm_kcalloc". This issue was detected by using the Coccinelle softwa

[PATCH 2/2] dmaengine: k3dma: Adjust six checks for null pointers

2017-04-23 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 23 Apr 2017 10:47:04 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code pla

[PATCH 1/1] iw_cxgb4: check return value of alloc_skb

2017-04-23 Thread Pan Bian
Function alloc_skb() will return a NULL pointer when there is no enough memory. However, the return value of alloc_skb() is directly used without validation in function send_fw_pass_open_req(). This patches checks the return value of alloc_skb() against NULL. Signed-off-by: Pan Bian --- drivers/

Re: [GIT PULL rcu/next] RCU commits for 4.12

2017-04-23 Thread Ingo Molnar
* Paul E. McKenney wrote: > Hello, Ingo, > > This pull request contains the following changes: > > 1.Documentation updates. > > http://lkml.kernel.org/r/20170412163956.ga15...@linux.vnet.ibm.com > > 2.Miscellaneous fixes. > > http://lkml.kernel.org/r/20170417232714.ga19.

Re: [PATCH] mm: gup: fix access_ok() argument type

2017-04-23 Thread Ingo Molnar
* Arnd Bergmann wrote: > MIPS just got changed to only accept a pointer argument for access_ok(), > causing one warning in drivers/scsi/pmcraid.c. I tried changing x86 > the same way and found the same warning in __get_user_pages_fast() > and nowhere else in the kernel during randconfig testing:

[PATCH v3 00/15] staging: ccree: add Arm TrustZone CryptoCell REE driver

2017-04-23 Thread Gilad Ben-Yossef
Arm TrustZone CryptoCell 700 is a family of cryptographic hardware accelerators. It is supported by a long lived series of out of tree drivers, which I am now in the process of unifying and upstreaming. This is the first drop, supporting the new CryptoCell 712 REE. The code still needs some cleanu

[PATCH 1/1] m5602_s5k83a: check return value of kthread_create

2017-04-23 Thread Pan Bian
From: Pan Bian Function kthread_create() returns an ERR_PTR on error. However, in function s5k83a_start(), its return value is used without validation. This may result in a bad memory access bug. This patch fixes the bug. Signed-off-by: Pan Bian --- drivers/media/usb/gspca/m5602/m5602_s5k83a.c

[PATCH v3 03/15] staging: ccree: add skcipher support

2017-04-23 Thread Gilad Ben-Yossef
Add CryptoCell skcipher support Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/Kconfig |8 + drivers/staging/ccree/Makefile |2 +- drivers/staging/ccree/cc_crypto_ctx.h | 21 + drivers/staging/ccree/ssi_buffer_mgr.c | 147 drivers/staging/ccree/ssi_bu

[PATCH v3 02/15] staging: ccree: add ahash support

2017-04-23 Thread Gilad Ben-Yossef
Add CryptoCell async. hash and HMAC support. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/Kconfig |6 + drivers/staging/ccree/Makefile |2 +- drivers/staging/ccree/cc_crypto_ctx.h | 22 + drivers/staging/ccree/hash_defs.h | 78 + drivers/staging/cc

[PATCH v3 05/15] staging: ccree: add AEAD support

2017-04-23 Thread Gilad Ben-Yossef
Add CryptoCell AEAD support Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/Kconfig |1 + drivers/staging/ccree/Makefile |2 +- drivers/staging/ccree/cc_crypto_ctx.h | 21 + drivers/staging/ccree/ssi_aead.c | 2826 driv

[PATCH v3 04/15] staging: ccree: add IV generation support

2017-04-23 Thread Gilad Ben-Yossef
Add CryptoCell IV hardware generation support. This patch adds the needed support to drive the HW but does not expose the ability via the kernel crypto API yet. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/Makefile | 2 +- drivers/staging/ccree/ssi_buffer_mgr.c | 2 +

[PATCH v3 07/15] staging: ccree: add TODO list

2017-04-23 Thread Gilad Ben-Yossef
Add TODO list for moving out of staging tree for ccree crypto driver Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/TODO | 30 ++ 1 file changed, 30 insertions(+) create mode 100644 drivers/staging/ccree/TODO diff --git a/drivers/staging/ccree/TODO b/driv

[PATCH v3 06/15] staging: ccree: add FIPS support

2017-04-23 Thread Gilad Ben-Yossef
Add FIPS mode support to CryptoCell driver Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/Kconfig |9 + drivers/staging/ccree/Makefile |1 + drivers/staging/ccree/ssi_aead.c|6 + drivers/staging/ccree/ssi_cipher.c | 52 + drivers/staging/c

[PATCH v3 08/15] staging: ccree: add DT bindings for Arm CryptoCell

2017-04-23 Thread Gilad Ben-Yossef
This adds DT bindings for the Arm TrustZone CryptoCell cryptographic accelerator IP. Signed-off-by: Gilad Ben-Yossef --- .../devicetree/bindings/crypto/arm-cryptocell.txt | 27 ++ 1 file changed, 27 insertions(+) create mode 100644 drivers/staging/ccree/Documentation/devic

[PATCH v3 15/15] staging: ccree: fix ifnullfree.cocci warnings

2017-04-23 Thread Gilad Ben-Yossef
From: kbuild test robot drivers/staging/ccree/ssi_hash.c:317:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_h

[PATCH v3 14/15] staging: ccree: fix ifnullfree.cocci warnings

2017-04-23 Thread Gilad Ben-Yossef
From: kbuild test robot drivers/staging/ccree/ssi_buffer_mgr.c:530:3-19: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before

[PATCH v3 13/15] staging: ccree: fix array_size.cocci warnings

2017-04-23 Thread Gilad Ben-Yossef
From: kbuild test robot drivers/staging/ccree/ssi_sysfs.c:319:34-35: WARNING: Use ARRAY_SIZE drivers/staging/ccree/ssi_sysfs.c:429:34-35: WARNING: Use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Semantic patch information: This makes an effort to find cas

[PATCH v3 10/15] staging: ccree: remove useless NULL test of field

2017-04-23 Thread Gilad Ben-Yossef
Remove kbuild test robot reported NULL check for a struct field address. Signed-off-by: Gilad Ben-Yossef Reported-by: kbuild test robot --- drivers/staging/ccree/ssi_buffer_mgr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/dri

[PATCH v3 12/15] staging: ccree: fix semicolon.cocci warnings

2017-04-23 Thread Gilad Ben-Yossef
From: kbuild test robot drivers/staging/ccree/ssi_request_mgr.c:623:3-4: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Gilad Ben-Yossef Signed-off-by: Fengguang Wu --- drivers/staging/ccree/ssi_request_mgr.c | 2 +- 1 fil

[PATCH v3 11/15] staging: ccree: fix platform_no_drv_owner.cocci warnings

2017-04-23 Thread Gilad Ben-Yossef
From: kbuild test robot drivers/staging/ccree/ssi_driver.c:484:6-11: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Gilad Ben-Yossef Signed-off-

[PATCH v3 09/15] MAINTAINERS: add Gilad BY as ccree maintainer

2017-04-23 Thread Gilad Ben-Yossef
I work for Arm on maintaining the TrustZone CryptoCell driver. Signed-off-by: Gilad Ben-Yossef --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 676c139..f21caa1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3066,6 +3066,13 @@ F: dr

Re: [PATCH 3/4] nfs: remove the objlayout driver

2017-04-23 Thread Boaz Harrosh
On 04/21/2017 05:00 PM, Trond Myklebust wrote: > Maintenance is not development. It’s about doing all the followup > _after_ the feature is declared to be developed. That’s been missing > for quite some time in the case of the OSD pNFS code, which is why > I’m not even bothering to consider staging

Re: [PATCH] ore: fix spelling mistake: "Multples" -> "multiples"

2017-04-23 Thread Boaz Harrosh
On 04/22/2017 03:48 PM, Colin King wrote: > From: Colin Ian King > > trivial fix to spelling mistake in ORE_ERR message and make word all > lower case. > > Signed-off-by: Colin Ian King Thanks ACK-by: Boaz Harrosh > --- > fs/exofs/ore.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-

Re: [PATCH v2 1/9] staging: ccree: introduce CryptoCell HW driver

2017-04-23 Thread Gilad Ben-Yossef
Hi, [ Re sending with all recipients this time ... ] On Thu, Apr 20, 2017 at 5:01 PM, Greg Kroah-Hartman wrote: >> > Oh, I have to ask, do you really mean "any later version" here and >> > elsewhere? >> > >> > If so, then your MODULE_LICENSE() marking is wrong, please fix that up, >> > or fix u

[PATCH v2] mmc: sdio: Fix sdio wait busy implement limitation

2017-04-23 Thread Jiajie Hao
The host may issue an I/O abort by writing to the CCCR at any time during I/O read operation via CMD52. And host may need suspend transcation during write busy stage in SDIO suspend/resume scenario. >From other side, a card may accept CMD52 during data transfer phase. Previous implement would bloc

[PATCH 1/1] wan: pc300too: abort path on failure

2017-04-23 Thread Pan Bian
From: Pan Bian In function pc300_pci_init_one(), on the ioremap error path, function pc300_pci_remove_one() is called to free the allocated memory. However, the path is not terminated, and the freed memory will be used later, resulting in use-after-free bugs. This path fixes the bug. Signed-off-

Re: [PATCH v2 6/9] staging: ccree: add FIPS support

2017-04-23 Thread Gilad Ben-Yossef
Hi, Thank you for the review. On Thu, Apr 20, 2017 at 4:39 PM, Stephan Müller wrote: >> +/* The function verifies that tdes keys are not weak.*/ >> +static int ssi_fips_verify_3des_keys(const u8 *key, unsigned int keylen) >> +{ >> +#ifdef CCREE_FIPS_SUPPORT >> +tdes_keys_t *tdes_key = (

[PATCH] Revert "x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation"

2017-04-23 Thread Ingo Molnar
* Dan Williams wrote: > > I can't find the issue either. > > > > Is it something reproducible without hardware? In KVM? > > You can do it in KVM, just boot with the memmap=ss!nn parameter to > simulate pmem. In this case I'm booting with memmap=4G!8G, you should > also specify "nokaslr". > > >

Re: [RFC][PATCH] proc: invalidate the deleting or deleted proc dentry

2017-04-23 Thread Hou Tao
Hi, any comment ? On 2017/4/13 21:49, Hou Tao wrote: > After the invocation of remove_proc_entry() for a proc fs directory, > if the related dentry had been held by some processes (eg., by chdir), > the lookup afterwards will still return the old proc_dir_entry. The > new created proc fs files und

[PATCH 1/1] staging: comedi: addi_apci_3xxx: check return value

2017-04-23 Thread Pan Bian
From: Pan Bian Function pci_ioremap_bar() will return a NULL pointer if there is no enough memory. However, in function apci3xxx_auto_attach(), the return value of function pci_ioremap_bar() is not validated. This may result in NULL dereference in following access to dev->mmio. This patch fixes t

tango_nand: is logic right in error cases? (was Re: fsl_ifc_nand: are blank pages protected by ECC?)

2017-04-23 Thread Pavel Machek
Hi! > > Maybe I figured it out. Unfortunately, it is only compile tested. Does > > it look approximately right? > > Yep that's definitely better. Just one thing missing (see below), > otherwise it looks good. I'm copying from tango_nand, therefore I had to check tango_nand, too. static int chec

[PATCH 1/1] net: bcmgenet: fix incorrect return value checks

2017-04-23 Thread Pan Bian
From: Pan Bian Function platform_get_irq() will return a negative value on errors. However, in function bcmgenet_probe(), 0 is considered as a flag of error. This patch fixes the bug by checking whether the return value of platform_get_irq() is less than 0. Signed-off-by: Pan Bian --- drivers/

Re: [PATCH] mailbox: fix completion order for blocking requests

2017-04-23 Thread Jassi Brar
On Tue, Apr 11, 2017 at 6:15 PM, Alexey Klimov wrote: > On Thu, Apr 06, 2017 at 10:45:26PM +0530, Jassi Brar wrote: >> On 6 April 2017 at 22:28, Alexey Klimov wrote: >> > Hi Jassi/Sudeep, >> > >> > On Wed, Mar 29, 2017 at 07:01:09PM +0100, Sudeep Holla wrote: >> >> >> >> >> >> On 29/03/17 18:43,

[PATCH] staging: android: ion: fix coding style issue

2017-04-23 Thread Adheer Chandravanshi
Use tab instead of spaces for indentation, as reported by checkpatch.pl Signed-off-by: Adheer Chandravanshi --- drivers/staging/android/ion/ion_cma_heap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/andro

Re: [PATCH 1/2] dmaengine: s3c24xx: Use devm_kcalloc() in s3c24xx_dma_probe()

2017-04-23 Thread Tobias Jakobi
Hello Markus, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 22 Apr 2017 23:00:23 +0200 > > * A multiplication for the size determination of a memory allocation > indicated that an array data structure should be processed. > Thus use the corresponding function "devm_kcalloc".

[PATCH 1/1] char: xillybus: check return value

2017-04-23 Thread Pan Bian
From: Pan Bian Function of_address_to_resource() tries to translate device tree address and return as resource. If the translation fails, it will return a negative errno. However, function xilly_drv_probe() does not validate its return value, which may result in a bad memory access bug. This patc

[PATCH 1/1] iommu/amd: fix incorrect error handling

2017-04-23 Thread Pan Bian
From: Pan Bian In function amd_iommu_bind_pasid(), the control flow jumps to label out_free when pasid_state->mm and mm is NULL. And mmput(mm) is called. In function mmput(mm), mm is referenced without validation. This will result in a NULL dereference bug. This patch fixes the bug. Signed-off-b

Re: [PATCH] mm, vmscan: do not loop on too_many_isolated for ever

2017-04-23 Thread Tetsuo Handa
On 2017/03/10 20:44, Tetsuo Handa wrote: > Michal Hocko wrote: >> On Thu 09-03-17 13:05:40, Johannes Weiner wrote: >>> On Tue, Mar 07, 2017 at 02:52:36PM -0500, Rik van Riel wrote: It only does this to some extent. If reclaim made no progress, for example due to immediately bailing

Re: [PATCH v2 3/3] powerpc/mm: Implement CONFIG_DEBUG_RODATA on PPC32

2017-04-23 Thread Michael Ellerman
christophe leroy writes: > Le 22/04/2017 à 08:08, Michael Ellerman a écrit : >> "Naveen N. Rao" writes: >>> Excerpts from Christophe Leroy's message of April 21, 2017 18:32: diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 32509de6ce4c..06d2ac53f471 1

RE: [PATCH v1 1/8] lib/uuid: Introduce uuid_{be|le}_cmp_p{p}() helpers

2017-04-23 Thread Winkler, Tomas
> New helpers take pointers to uuid_{be|le} as parameters. > > When using them on a raw data we don't need to do an ugly dereference and, > in some cases, a type casting. > > Cc: Andrew Morton > Cc: Arnd Bergmann > Cc: Liam Girdwood > Cc: Mark Brown > Cc: Vinod Koul > Cc: Srinivas Pandruvada

Re: [PATCH 1/2] PCI: mediatek: Add Mediatek PCIe host controller support

2017-04-23 Thread kbuild test robot
-some-Mediatek-SoCs/20170423-163432 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O

[PATCH 2/5] plugin:python: check asprintf() errors

2017-04-23 Thread Federico Vaga
The code was validating the string but the man page for asprintf(3) says clearly: If memory allocation wasn't possible, or some other error occurs, these functions will return -1, and the contents of strp are undefined. So, we cannot really rely on the returned string pointer.

trace-cmd bug fixes

2017-04-23 Thread Federico Vaga
This set of patches contains some fixes found while studying the trace-cmd code.

[PATCH 4/5] trace-cmd: fix argument parsing minor BUG

2017-04-23 Thread Federico Vaga
For some reason the list command does not use anymore `getopt()` to parse the arguments, instead it uses a custum implementation. During this change [5da0eff trace-cmd: Add regex for listing of events] the variable `optind` has been forgotten. To reproduce the problem try to use invalid arguments

[PATCH 5/5] trace-cmd: BUG fix malloc() pointer validation

2017-04-23 Thread Federico Vaga
To reproduce the bug mkdir /sys/kernel/debug/tracing/instances/test ./trace-cmd show -B test -s -f Failed to allocate instance path snapshot Signed-off-by: Federico Vaga --- trace-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace-cmd.c b/trace-cmd.c index a05df92

[PATCH 1/5] plugin:python: fix compiler warning

2017-04-23 Thread Federico Vaga
The function `load_plugin` is passed, as argument, to `trace_util_load_plugins()` but the prototype was not exactly the same. Signed-off-by: Federico Vaga --- plugin_python.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugin_python.c b/plugin_python.c index da07d

[PATCH 3/5] trace-cmd:read: BUG initialize input_files item to zero

2017-04-23 Thread Federico Vaga
On allocation the data structure was not initialized. Later on some attribute of this structure are used (e.g. tsoffset) assuming that the default value is zero, but it is not always true. Signed-off-by: Federico Vaga --- trace-read.c | 1 + 1 file changed, 1 insertion(+) diff --git a/trace-rea

[PATCH v5 00/11] Initial Allwinner Display Engine 2.0 Support

2017-04-23 Thread Icenowy Zheng
This patchset is the initial patchset for Allwinner DE2 support. It contains the support of clocks in DE2 and the mixers in DE2. The SoC used to develop this patchset is V3s, as V3s is the simplest one of the SoCs that have DE2. (Allwinner V3s features only one mixer, although its clock control u

[PATCH v5 01/11] dt-bindings: add binding for the Allwinner DE2 CCU

2017-04-23 Thread Icenowy Zheng
Allwinner "Display Engine 2.0" contains some clock controls in it. In order to add them as clock drivers, we need a device tree binding. Add the binding here. Also add the device tree binding headers. Signed-off-by: Icenowy Zheng --- Changes in v5: - Moved dt-binding headers here. - Changed dt-

[PATCH v5 02/11] clk: sunxi-ng: add support for DE2 CCU

2017-04-23 Thread Icenowy Zheng
The "Display Engine 2.0" in Allwinner newer SoCs contains a clock management unit for its subunits, like the DE CCU in A80. Add a sunxi-ng style driver for it. Signed-off-by: Icenowy Zheng --- Changes in v5: - Removed dt-bindings headers (they're now in patch 1). Changes in v4: - Fixed the incon

[PATCH v5 06/11] drm/sun4i: add support for Allwinner DE2 mixers

2017-04-23 Thread Icenowy Zheng
Allwinner have a new "Display Engine 2.0" in their new SoCs, which comes with mixers to do graphic processing and feed data to TCON, like the old backends and frontends. Add support for the mixer on Allwinner V3s SoC; it's the simplest one. Currently a lot of functions are still missing -- more i

[PATCH v5 03/11] dt-bindings: add bindings for DE2 on V3s SoC

2017-04-23 Thread Icenowy Zheng
Allwinner V3s SoC have a display engine which have a different pipeline with older SoCs. Add document for it (new compatibles and the new "mixer" part). Signed-off-by: Icenowy Zheng Acked-by: Rob Herring --- Changes in v4: - Removed the refactor at TCON chapter. Changes in v3: - Remove the des

[PATCH v5 08/11] drm/sun4i: tcon: add support for V3s TCON

2017-04-23 Thread Icenowy Zheng
Allwinner V3s SoC features a TCON without channel 1. Add support for it. Signed-off-by: Icenowy Zheng --- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 ++- drivers/gpu/drm/sun4i/sun4i_tcon.c | 5 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/

[PATCH v5 04/11] drm/sun4i: return only planes for layers created

2017-04-23 Thread Icenowy Zheng
As we are going to add support for the Allwinner DE2 Mixer in sun4i-drm driver, we will finally have two types of layers. Each layer is bound to a drm_plane that is CRTC-specific, so we create them when initializing CRTC (calling sun4i_layers_init, which will be generalized in next patch). The drm

Re: s3c24xx: Use devm_kcalloc() in s3c24xx_dma_probe()

2017-04-23 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 "devm_kcalloc". > I have trouble parsing that sentences. This looks like the typical > approach of native german speakers

[PATCH v5 07/11] drm/sun4i: Add compatible string for V3s display engine

2017-04-23 Thread Icenowy Zheng
Allwinner V3s features the new "Display Engine 2.0", which can now also be driven with our subdrivers in sun4i-drm. Add the compatible string for in sun4i_drv.c, in order to make the display engine and its components probed. Signed-off-by: Icenowy Zheng --- drivers/gpu/drm/sun4i/sun4i_drv.c | 1

[PATCH v5 09/11] ARM: dts: sun8i: add DE2 nodes for V3s SoC

2017-04-23 Thread Icenowy Zheng
Allwinner V3s SoC features a "Display Engine 2.0" with only one TCON which have RGB LCD output. Add device nodes for it as well as the TCON. Signed-off-by: Icenowy Zheng --- arch/arm/boot/dts/sun8i-v3s.dtsi | 87 1 file changed, 87 insertions(+) diff --

[PATCH v5 11/11] [DO NOT MERGE] ARM: dts: sun8i: enable LCD panel of Lichee Pi Zero

2017-04-23 Thread Icenowy Zheng
A 480x272 QiaoDian QD43003C0-40-7LED panel is available from Lichee Pi. This commit connects this panel to Lichee Pi Zero. Lichee Pi also provides a 800x480 panel without accurate model number, so do not merge this patch. It will finally come as device tree overlay. Signed-off-by: Icenowy Zheng

[PATCH v5 10/11] ARM: dts: sun8i: add pinmux for LCD pins of V3s SoC

2017-04-23 Thread Icenowy Zheng
Allwinner V3s SoC features a set of pins that have functionality of RGB LCD, the pins are at different pin ban than other SoCs. Add pinctrl node for them. Signed-off-by: Icenowy Zheng --- arch/arm/boot/dts/sun8i-v3s.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot

[PATCH v5 05/11] drm/sun4i: abstract a engine type

2017-04-23 Thread Icenowy Zheng
As we are going to add support for the Allwinner DE2 engine in sun4i-drm driver, we will finally have two types of display engines -- the DE1 backend and the DE2 mixer. They both do some display blending and feed graphics data to TCON, so I choose to call them both "engine" here. Abstract the engi

Re: s3c24xx: Use devm_kcalloc() in s3c24xx_dma_probe()

2017-04-23 Thread Tobias Jakobi
SF Markus Elfring wrote: >>> * A multiplication for the size determination of a memory allocation >>> indicated that an array data structure should be processed. >>> Thus use the corresponding function "devm_kcalloc". >> I have trouble parsing that sentences. This looks like the typical >> appr

Question on the five-level page table support patches

2017-04-23 Thread John Paul Adrian Glaubitz
Hi Kirill! I recently read the LWN article on your and your colleagues work to add five-level page table support for x86 to the Linux kernel [1] and I got your email address from the last patch of the series. Since this extends the address space beyond 48-bits, as you may know, it will cause pote

Re: s3c24xx: Use devm_kcalloc() in s3c24xx_dma_probe()

2017-04-23 Thread SF Markus Elfring
>> WARNING: Prefer devm_kcalloc over devm_kzalloc with multiply > For example. Also I just noticed some previous comment by Krzysztof that > pointed that out already. > > My suggestion: One sentence describing that the current situation is. Why do you find the sentence for the multiplication info

[PATCH 1/1] usb: hub: check return value

2017-04-23 Thread Pan Bian
From: Pan Bian Function usb_autopm_get_interface() will return a negative errno on failure, and function usb_autopm_put_interface() should not be called if it fails. However, in function usb_remove_device(), the return value of function usb_autopm_get_interface() is not validated before calling u

[tip:timers/urgent] tick: Make sure tick timer is active when bypassing reprogramming

2017-04-23 Thread tip-bot for Frederic Weisbecker
Commit-ID: 22aa2ad45fd8a6ef56eb60038fc0ac7059c0a986 Gitweb: http://git.kernel.org/tip/22aa2ad45fd8a6ef56eb60038fc0ac7059c0a986 Author: Frederic Weisbecker AuthorDate: Fri, 21 Apr 2017 16:00:55 +0200 Committer: Thomas Gleixner CommitDate: Sun, 23 Apr 2017 13:33:18 +0200 tick: Make sure

[tip:timers/urgent] nohz: Fix again collision between tick and other hrtimers

2017-04-23 Thread tip-bot for Frederic Weisbecker
Commit-ID: d58bd60c773d8b16c19c4b9533bceee3761eb804 Gitweb: http://git.kernel.org/tip/d58bd60c773d8b16c19c4b9533bceee3761eb804 Author: Frederic Weisbecker AuthorDate: Fri, 21 Apr 2017 16:00:54 +0200 Committer: Thomas Gleixner CommitDate: Sun, 23 Apr 2017 13:33:18 +0200 nohz: Fix again

[GIT pull] irq fix for 4.11

2017-04-23 Thread Thomas Gleixner
Linus, please pull the latest irq-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-for-linus The (hopefully) final fix for the irq affinity spreading logic. Thanks, tglx --> Keith Busch (1): genirq/affinity:

Re: [v3,7/7] powerpc: kprobes: remove duplicate saving of msr

2017-04-23 Thread Michael Ellerman
On Wed, 2017-04-19 at 12:51:06 UTC, "Naveen N. Rao" wrote: > set_current_kprobe() already saves regs->msr into kprobe_saved_msr. Remove > the redundant save. > > Signed-off-by: Naveen N. Rao > Reviewed-by: Masami Hiramatsu Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/d08f8

Re: [v4,1/6] powerpc: ftrace: minor cleanup

2017-04-23 Thread Michael Ellerman
On Wed, 2017-04-19 at 12:52:23 UTC, "Naveen N. Rao" wrote: > Move the stack setup and teardown code to the ftrace_graph_caller(). > This way, we don't incur the cost of setting it up unless function graph > is enabled for this function. > > Also, remove the extraneous LR restore code after the fun

[PATCH 1/1] staging: wilc1000: fix unchecked return value

2017-04-23 Thread Pan Bian
From: Pan Bian Function dev_alloc_skb() will return a NULL pointer if there is no enough memory. However, in function WILC_WFI_mon_xmit(), its return value is used without validation. This may result in a bad memory access bug. This patch fixes the bug. Signed-off-by: Pan Bian --- drivers/stag

  1   2   3   4   >