Re: [PATCH 1/2] usbnet: Delete an error message for a failed memory allocation in usbnet_write_cmd_async()

2017-05-22 Thread Oliver Neukum
Am Montag, den 22.05.2017, 07:09 +0200 schrieb SF Markus Elfring: > From: Markus Elfring > Date: Mon, 22 May 2017 06:33:48 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Link: > http://events.l

Re: [PATCH 2/2] usbnet: Improve a size determination in usbnet_write_cmd_async()

2017-05-22 Thread Oliver Neukum
Am Montag, den 22.05.2017, 07:10 +0200 schrieb SF Markus Elfring: > From: Markus Elfring > Date: Mon, 22 May 2017 06:42:33 +0200 > > Replace the specification of a data structure by a pointer dereference > as the parameter for the operator "sizeof" to make the corresponding size > determination a

[PATCH net-next] net/wan/fsl_ucc_hdlc: fix muram allocation error

2017-05-22 Thread Holger Brunck
sizeof(priv->ucc_pram) is 4 as it is the size of a pointer, but we want to reserve space for the struct ucc_hdlc_param. Signed-off-by: Holger Brunck Cc: Zhao Qiang --- drivers/net/wan/fsl_ucc_hdlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wan/fsl_ucc_hdlc

[PATCH] flowcache: Delete an error message for a failed memory allocation in flow_cache_cpu_prepare()

2017-05-22 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 09:19:51 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Sign

Re: [PATCH] Bluetooth: Delete error messages for failed memory allocations in two functions

2017-05-22 Thread Marcel Holtmann
Hallo Markus, > Omit two extra messages for memory allocation failures in these functions. > > This issue was detected by using the Coccinelle software. > > Link: > http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf > Signed-off-by: Markus Elfring >

Re: [PATCH 0/2] ieee802154: ca8210: Adjustments for two function implementations

2017-05-22 Thread Marcel Holtmann
Hi Markus, > Two update suggestions were taken into account > from static source code analysis. > > Markus Elfring (2): > Delete an error message for a failed memory allocation in ca8210_probe() > Delete an error message for a failed memory allocation in ca8210_skb_rx() > > drivers/net/ieee802

[PATCH 0/3] net-pktgen: Adjustments for some function implementations

2017-05-22 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 11:01:23 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (3): Improve four size determinations Delete an error message for a failed memory allocation in pktgen_create_thread() Adjust five c

[PATCH 1/3] net: pktgen: Improve four size determinations

2017-05-22 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 10:34:11 +0200 Replace the specification of four data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by:

[PATCH 2/3] net: pktgen: Delete an error message for a failed memory allocation in pktgen_create_thread()

2017-05-22 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 10:38:46 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Sign

[PATCH] net: fec: add post PHY reset delay DT property

2017-05-22 Thread Quentin Schulz
Some PHY require to wait for a bit after the reset GPIO has been toggled. This adds support for the DT property `phy-reset-post-delay` which gives the delay in milliseconds to wait after reset. If the DT property is not given, no delay is observed. Post reset delay greater than 1000ms are invalid

[PATCH 3/3] net: pktgen: Adjust five checks for null pointers

2017-05-22 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 10:44:16 +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 pl

Re: [PATCH] Accept packets that the H.245 ALG can't process

2017-05-22 Thread Sergei Shtylyov
Hello! On 5/22/2017 5:07 AM, Blair Steven wrote: When two VoIP end points are configured differently (fast connect / not fast connect) the ALG was failing to find a matching expectation and dropping packets in one direction. Dropping packets not the job of an ALG, and as such the behaviour

Re: [PATCHv4] wlcore: add wl1285 compatible

2017-05-22 Thread Kalle Valo
Sebastian Reichel writes: > Motorola Droid 4 uses a WL1285C. With differences between the > chips not being public let's add explicit binding for wl1285 > instead of relying on wl1283 being very similar. > > Reviewed-by: Rob Herring > Acked-by: Kalle Valo > Acked-by: Tony Lindgren > Signed-off

Re: [PATCH 1/2] vhost/scsi: Improve a size determination in four functions

2017-05-22 Thread Stefan Hajnoczi
On Sat, May 20, 2017 at 04:31:13PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 20 May 2017 13:48:44 +0200 > > Replace the specification of four data structures by pointer dereferences > as the parameter for the operator "sizeof" to make the corresponding size > determinati

Re: [PATCH 1/1] dt-binding: net: wireless: fix node name in the BCM43xx example

2017-05-22 Thread Arend van Spriel
On 5/21/2017 4:19 PM, Andreas Färber wrote: Hi, Am 16.05.2017 um 21:56 schrieb Martin Blumenstingl: On Tue, May 16, 2017 at 12:05 AM, Arend Van Spriel wrote: On 15-5-2017 22:13, Martin Blumenstingl wrote: The example in the BCM43xx documentation uses "brcmf" as node name. However, wireless d

Re: [PATCH 2/2] vhost/scsi: Delete error messages for failed memory allocations in five functions

2017-05-22 Thread Stefan Hajnoczi
On Sat, May 20, 2017 at 04:32:17PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 20 May 2017 15:50:30 +0200 > > Omit seven extra messages for memory allocation failures in these functions. > > This issue was detected by using the Coccinelle software. > > Link: > http://ev

[PATCH] vhost: Coalesce vq_err formats, pr_fmt misuse, add missing newlines

2017-05-22 Thread Joe Perches
vhost logging uses of vq_err has a few defects and style inconsistencies. o pr_debug already uses pr_fmt so its use in vq_err is defective however no #defines of pr_fmt exist in this code so no actual defects exist o vq_err uses need terminating newlines so add the missing ones o Coalesce form

Re: [patch net-next 2/2] net/sched: fix filter flushing

2017-05-22 Thread Jamal Hadi Salim
On 17-05-21 03:19 PM, Jiri Pirko wrote: Sun, May 21, 2017 at 08:27:21PM CEST, xiyou.wangc...@gmail.com wrote: On Sat, May 20, 2017 at 10:54 PM, Jiri Pirko wrote: Sun, May 21, 2017 at 02:16:45AM CEST, xiyou.wangc...@gmail.com wrote: On Sat, May 20, 2017 at 6:01 AM, Jiri Pirko wrote: +static

4.12-RC2 BUG: scheduling while atomic: irq/47-iwlwifi

2017-05-22 Thread Sander Eikelenboom
Comm: irq/47-iwlwifi Not tainted 4.12.0-rc2-t440s-20170522+ #1 [ 119.021763] Hardware name: LENOVO 20AQS03H00/20AQS03H00, BIOS GJET91WW (2.41 ) 09/21/2016 [ 119.021766] Call Trace: [ 119.021778] ? dump_stack+0x5c/0x84 [ 119.021784] ? __schedule_bug+0x4c/0x70 [ 119.021792] ? __schedule

Re: [PATCH 2/2] vhost/scsi: Delete error messages for failed memory allocations in five functions

2017-05-22 Thread SF Markus Elfring
>> Link: >> http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf > > Please include an actual explanation for this change instead of linking > to slides. Do you care for a bit of code size reduction by removal of questionable error messages? > Why are

Re: 4.12-RC2 BUG: scheduling while atomic: irq/47-iwlwifi

2017-05-22 Thread Johannes Berg
On Mon, 2017-05-22 at 12:36 +0200, Sander Eikelenboom wrote: > Hi, > > I encountered this splat with 4.12-RC2. Ugh, yeah, I should've seen that in the review. Arend, please take a look at this. cfg80211_sched_scan_results() cannot sleep, so you can't rtnl_lock() in there. Looks like you can just

Re: [PATCH net-next 9/9] ipv6: remove unused variables in esp6

2017-05-22 Thread Steffen Klassert
On Fri, May 19, 2017 at 09:55:56AM -0700, Stephen Hemminger wrote: > Resolves warnings: > net/ipv6/esp6.c: In function ‘esp_ssg_unref’: > net/ipv6/esp6.c:121:10: warning: variable ‘seqhi’ set but not used > [-Wunused-but-set-variable] > net/ipv6/esp6.c: In function ‘esp6_output_head’: > net/ipv6/e

[PATCH 0/3] stmmac: pci: Refactor DMI probing

2017-05-22 Thread Jan Kiszka
Some cleanups of the way we probe DMI platforms in the driver. Reduces a bit of open-coding and makes the logic easier reusable for any potential DMI platform != Quark. Tested on IOT2000 and Galileo Gen2. Jan Jan Kiszka (3): stmmac: pci: Overcome stmmac_pci_info structure stmmac: pci: Make s

[PATCH 2/3] stmmac: pci: Make stmmac_pci_find_phy_addr truly generic

2017-05-22 Thread Jan Kiszka
Move the special case for the early Galileo firmware into quark_default_setup. This allows to use stmmac_pci_find_phy_addr for non-quark cases. Signed-off-by: Jan Kiszka --- drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-

[PATCH 3/3] stmmac: pci: Use dmi_system_id table for retrieving PHY addresses

2017-05-22 Thread Jan Kiszka
Avoids reimplementation of DMI matching in stmmac_pci_find_phy_addr. Signed-off-by: Jan Kiszka --- drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 77 ++-- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/d

[PATCH 1/3] stmmac: pci: Overcome stmmac_pci_info structure

2017-05-22 Thread Jan Kiszka
First, pass the PCI device reference as function parameter. Then the setup function knows which stmmac_pci_dmi_data structure to use. Finally, we are left with a setup function in stmmac_pci_info and can convert the structure into a function pointer. By converting stmmac_default_data to that type,

Re: [PATCH 2/2] vhost/scsi: Delete error messages for failed memory allocations in five functions

2017-05-22 Thread Stefan Hajnoczi
On Mon, May 22, 2017 at 12:50:39PM +0200, SF Markus Elfring wrote: > > Why are you trying to get rid of memory allocation failure messages? > > Do you find information from a Linux allocation failure report sufficient > for any function implementations here? If kmalloc() and friends guarantee to

[PATCH net-next 00/11] qed/qede: Mostly-cleanup series

2017-05-22 Thread Yuval Mintz
This series contains some cleanup of the qed and qede code: - #1 contains mostly static/endian changes in order to allow qede to pass sparse compilation cleanly. - #2, #5 and #6 are either semantic or remove dead-code from driver. - #9, #10 and #11 relate to printing and slightly change some

[PATCH net-next 03/11] qed: !main_ptt for tunnel configuration

2017-05-22 Thread Yuval Mintz
From: Manish Chopra Flows configuring tunnel ports in HW use the main_ptt which should be reserved for core-functionality. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 3 ++- drivers/net/ethernet/qlogic/qed/qed_l2.c

[PATCH net-next 01/11] qede: Fix sparse warnings

2017-05-22 Thread Yuval Mintz
From: Manish Chopra Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qede/qede_dcbnl.c | 1 - drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 10 ++ drivers/net/ethernet/qlogic/qede/qede_fp.c | 25 ++--- drivers/net/e

[PATCH net-next 02/11] qed: Align DP_ERR style with other DP macros

2017-05-22 Thread Yuval Mintz
Signed-off-by: Yuval Mintz --- include/linux/qed/qed_if.h | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h index c70ac13..ff590cb 100644 --- a/include/linux/qed/qed_if.h +++ b/include/linux/qed/qed_if.h @@ -70

[PATCH net-next 04/11] qed: Log incorrectly installed board

2017-05-22 Thread Yuval Mintz
From: Tomer Tayar In case nvram layout of board is incorrect, board may exhibit peculiar oddities. Log such a rare event. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 5 + drivers/net/ethernet/qlogic/qed/qed_hsi.h | 2 ++ 2 files ch

[PATCH net-next 08/11] qed: Enable RoCE parser searching on fp init

2017-05-22 Thread Yuval Mintz
From: Michal Kalderon Since we're closing the parser searching for RDMA when stoping the fastpath, we need to re-enable it when starting the fastpath once again. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 7 +++ 1 file changed

[PATCH net-next 06/11] qed: Remove BB_A0 references

2017-05-22 Thread Yuval Mintz
A0 never went public, so no need to protect against it. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed.h | 6 -- drivers/net/ethernet/qlogic/qed/qed_dev.c | 6 -- 2 files changed, 12 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed.h b/drivers/net/e

[PATCH net-next 09/11] qed: Provide MBI information in dev_info

2017-05-22 Thread Yuval Mintz
From: Tomer Tayar Pass additional information about package installed on persistent memory so that protocol drivers would be able to log it. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 6 ++ drivers/net/ethernet/qlogic/qed/qed_ma

[PATCH net-next 07/11] qed: Flush slowpath tasklet on stop

2017-05-22 Thread Yuval Mintz
From: Tomer Tayar Today, driver has a synchronization point while closing the device which synchronizes its slowpath interrupt line. However, that's insufficient as that ISR would schedule the slowpath-tasklet - so even after ISR is over it's possible the handling of the interrupt has not complet

[PATCH net-next 05/11] qed: Drop the 's' from num_ports_in_engines

2017-05-22 Thread Yuval Mintz
From: Tomer Tayar The parameter reflects the number of physical ports connected to a single engine, not all. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 36 +++-

[PATCH net-next 11/11] qed: Replace set_id() api with set_name()

2017-05-22 Thread Yuval Mintz
Current API between qed and protocol modules allows passing an additional private string - but it doesn't get utilized by qed anywhere. Clarify the API by removing it and renaming it 'set_name'. CC: Manish Rangankar Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed.h|

Re: [PATCH 3/3] stmmac: pci: Use dmi_system_id table for retrieving PHY addresses

2017-05-22 Thread Joe Perches
On Mon, 2017-05-22 at 13:12 +0200, Jan Kiszka wrote: > Avoids reimplementation of DMI matching in stmmac_pci_find_phy_addr. [] > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c > b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c [] > @@ -31,65 +31,78 @@ [] > +static const struct stm

[PATCH net-next 10/11] qede: Log probe of PCI device

2017-05-22 Thread Yuval Mintz
Replace meaningless logged print ('Ending successfully qede probe') with a single-liner containing interesting information about probed device. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qede/qede_main.c | 40 ++-- 1 file changed, 38 insertions(+), 2 delet

Re: vhost/scsi: Delete error messages for failed memory allocations in five functions

2017-05-22 Thread SF Markus Elfring
>> Do you find information from a Linux allocation failure report sufficient >> for any function implementations here? > > If kmalloc() and friends guarantee to print a warning and backtrace on > every allocation failure, then there's no need for error messages in > callers. > > That seems like g

[PATCH v4 next 1/3] modules:capabilities: allow __request_module() to take a capability argument

2017-05-22 Thread Djalal Harouni
This is a preparation patch for the module auto-load restriction feature. In order to restrict module auto-load operations we need to check if the caller has CAP_SYS_MODULE capability. This allows to align security checks of automatic module loading with the checks of the explicit operations. How

[PATCH v4 next 3/3] modules:capabilities: add a per-task modules auto-load mode

2017-05-22 Thread Djalal Harouni
Previous patches added the global sysctl "modules_autoload_mode". This patch make it possible to support process trees, containers, and sandboxes by providing an inherited per-task "modules_autoload_mode" flag that cannot be re-enabled once disabled. This allows to restrict automatic module loading

[PATCH v4 next 0/3] modules: automatic module loading restrictions

2017-05-22 Thread Djalal Harouni
documentation and code comments. All suggestions were improved and fixed. Please see changelog for more details. These patches are against next-20170522 == Currently, an explicit call to load or unload kernel modules require CAP_SYS_MODULE capability. However unprivileged users have always

[PATCH v4 next 2/3] modules:capabilities: automatic module loading restriction

2017-05-22 Thread Djalal Harouni
Currently, an explicit call to load or unload kernel modules require CAP_SYS_MODULE capability. However unprivileged users have always been able to load some modules using the implicit auto-load operation. An automatic module loading happens when programs request a kernel feature from a module that

Re: 4.12-RC2 BUG: scheduling while atomic: irq/47-iwlwifi

2017-05-22 Thread Arend van Spriel
On 5/22/2017 12:57 PM, Johannes Berg wrote: On Mon, 2017-05-22 at 12:36 +0200, Sander Eikelenboom wrote: Hi, I encountered this splat with 4.12-RC2. Ugh, yeah, I should've seen that in the review. Arend, please take a look at this. cfg80211_sched_scan_results() cannot sleep, so you can't rtn

Re: [kernel-hardening] [PATCH v4 next 0/3] modules: automatic module loading restrictions

2017-05-22 Thread Solar Designer
Hi Djalal, Thank you for your work on this! On Mon, May 22, 2017 at 01:57:03PM +0200, Djalal Harouni wrote: > *) When modules_autoload_mode is set to (2), automatic module loading is > disabled for all. Once set, this value can not be changed. What purpose does this securelevel-like property ("O

[PATCH] net: set default value for somaxconn

2017-05-22 Thread Roman Kapl
The default value for somaxconn is set in sysctl_core_net_init(), but this function is not called when kernel is configured without CONFIG_SYSCTL. This results in the kernel not being able to accept TCP connections, because the backlog has zero size. Usually, the user ends up with: "TCP: request_s

Re: [patch net-next 2/2] net/sched: fix filter flushing

2017-05-22 Thread Jiri Pirko
Mon, May 22, 2017 at 12:42:44PM CEST, j...@mojatatu.com wrote: >On 17-05-21 03:19 PM, Jiri Pirko wrote: >> Sun, May 21, 2017 at 08:27:21PM CEST, xiyou.wangc...@gmail.com wrote: >> > On Sat, May 20, 2017 at 10:54 PM, Jiri Pirko wrote: >> > > Sun, May 21, 2017 at 02:16:45AM CEST, xiyou.wangc...@gmai

[PATCH v2 1/4] net-next: stmmac: Convert new_state to bool

2017-05-22 Thread Corentin Labbe
This patch convert new_state from int to bool since it store only 1 or 0 Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers

[PATCH v2 2/4] net-next: stmmac: Remove unnecessary parenthesis

2017-05-22 Thread Corentin Labbe
Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 94b37323844b..190686e39835 100644 --

[PATCH v2 4/4] net-next: stmmac: rework the speed selection

2017-05-22 Thread Corentin Labbe
The current stmmac_adjust_link() part which handle speed have some if (has_platform) code and my dwmac-sun8i will add more of them. So we need to handle better speed selection. Moreover the struct link member speed and port are hard to guess their purpose. And their unique usage are to be combined

[PATCH v2 0/4] net-next: stmmac: rework the speed selection

2017-05-22 Thread Corentin Labbe
Hello The current stmmac_adjust_link() part which handle speed have some if (has_platform) code and my dwmac-sun8i will add more of them. So we need to handle better speed selection. Moreover the struct link member speed and port are hard to guess their purpose. And their unique usage are to be c

[PATCH v2 3/4] net-next: stmmac: use SPEED_xxx instead of raw value

2017-05-22 Thread Corentin Labbe
Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 190686e39835..9bf09100c199 100

Re: [PATCH 2/2] vhost/scsi: Delete error messages for failed memory allocations in five functions

2017-05-22 Thread Dan Carpenter
On Mon, May 22, 2017 at 12:23:20PM +0100, Stefan Hajnoczi wrote: > I'm not sure if kmalloc() and friends guarantee to show > a message (not just the first time, but for every failed allocation)? > It prints multiple times, but it's ratelimited. It can also be disabled using a config option. See

Re: [PATCH 3/3] stmmac: pci: Use dmi_system_id table for retrieving PHY addresses

2017-05-22 Thread Jan Kiszka
On 2017-05-22 13:33, Joe Perches wrote: > On Mon, 2017-05-22 at 13:12 +0200, Jan Kiszka wrote: >> Avoids reimplementation of DMI matching in stmmac_pci_find_phy_addr. > [] >> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c >> b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c > [] >>

[PATCH v2] cdc-ether: divorce initialisation with a filter reset and a generic method

2017-05-22 Thread Oliver Neukum
Some devices need their multicast filter reset but others are crashed by that. So the methods need to be separated. Signed-off-by: Oliver Neukum Reported-by: "Ridgway, Keith" --- drivers/net/usb/cdc_ether.c | 31 --- include/linux/usb/usbnet.h | 1 + 2 files change

[PATCH 0/2] NFC-digital: Adjustments for four function implementations

2017-05-22 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 14:50:05 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Improve a size determination in four functions Delete an error message for a failed memory allocation in digital_in_send() net/nfc

[PATCH 1/2] NFC: digital: Improve a size determination in four functions

2017-05-22 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 14:11:01 +0200 Replace the specification of four data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by:

[PATCH 2/2] NFC: digital: Delete an error message for a failed memory allocation in digital_in_send()

2017-05-22 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 14:24:24 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Sign

Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit

2017-05-22 Thread Daniel Borkmann
On 05/20/2017 10:01 PM, Shubham Bansal wrote: [...] Before I send the patch, I have tested the JIT compiler on ARMv7 but not on ARMv5 or ARMv6. So can you tell me which arch versions I should test it for? Also for my testing, CONFIG_FRAME_POINTER and CONFIG_CPU_BIG_ENDIAN are both disabled. But I

Re: [PATCH v2 1/4] net-next: stmmac: Convert new_state to bool

2017-05-22 Thread Joe Perches
On Mon, 2017-05-22 at 14:33 +0200, Corentin Labbe wrote: > This patch convert new_state from int to bool since it store only 1 or 0 [] > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c [] > @@ -849,11 +849,11 @@ static void stmma

Re: [PATCH 3/3] stmmac: pci: Use dmi_system_id table for retrieving PHY addresses

2017-05-22 Thread Joe Perches
On Mon, 2017-05-22 at 14:49 +0200, Jan Kiszka wrote: > On 2017-05-22 13:33, Joe Perches wrote: > > On Mon, 2017-05-22 at 13:12 +0200, Jan Kiszka wrote: > > > Avoids reimplementation of DMI matching in stmmac_pci_find_phy_addr. > > > > [] > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmma

[PATCH 2/2] Add missing include

2017-05-22 Thread Baruch Siach
From: Thomas Petazzoni The u_intXX_t types are defined in , so it should be included before using those types. Otherwise, with certain C libraries, the build fails with: In file included from ../include/iptables.h:4:0, from m_ipt.c:18: ../include/iptables_common.h:47:16: error:

[PATCH 1/2] ip: include libc headers first

2017-05-22 Thread Baruch Siach
Including libc headers first helps as a workaround to redefinition of struct ethhdr with a suitably patched musl libc that suppresses the kernel if_ether.h. Signed-off-by: Baruch Siach --- ip/iplink_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iplink_bridge.c b

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-22 Thread Oliver Neukum
Am Freitag, den 19.05.2017, 14:46 + schrieb David Laight: > For XHCI it isn't too bad because it will do arbitrary scatter-gather > (apart from the ring end). > But I believe the earlier controllers only support fragments that > end on usb packet boundaries. > > I looked at the usbnet code a f

Re: [kernel-hardening] [PATCH v4 next 0/3] modules: automatic module loading restrictions

2017-05-22 Thread Djalal Harouni
Hi Alexander, On Mon, May 22, 2017 at 2:08 PM, Solar Designer wrote: > Hi Djalal, > > Thank you for your work on this! > > On Mon, May 22, 2017 at 01:57:03PM +0200, Djalal Harouni wrote: >> *) When modules_autoload_mode is set to (2), automatic module loading is >> disabled for all. Once set, thi

Re: [Patch net] vsock: use new wait API for vsock_stream_sendmsg()

2017-05-22 Thread Stefan Hajnoczi
On Fri, May 19, 2017 at 11:21:59AM -0700, Cong Wang wrote: > As reported by Michal, vsock_stream_sendmsg() could still > sleep at vsock_stream_has_space() after prepare_to_wait(): > > vsock_stream_has_space > vmci_transport_stream_has_space > vmci_qpair_produce_free_space > qp_

Re: [PATCH] net: fec: add post PHY reset delay DT property

2017-05-22 Thread Andrew Lunn
On Mon, May 22, 2017 at 11:15:17AM +0200, Quentin Schulz wrote: > Some PHY require to wait for a bit after the reset GPIO has been > toggled. This adds support for the DT property `phy-reset-post-delay` > which gives the delay in milliseconds to wait after reset. > > If the DT property is not give

Re: [PATCH] net: fec: add post PHY reset delay DT property

2017-05-22 Thread Quentin Schulz
Hi Andrew On 22/05/2017 15:57, Andrew Lunn wrote: > On Mon, May 22, 2017 at 11:15:17AM +0200, Quentin Schulz wrote: >> Some PHY require to wait for a bit after the reset GPIO has been >> toggled. This adds support for the DT property `phy-reset-post-delay` >> which gives the delay in milliseconds

[PATCH] kernel: bpf: remove dead code

2017-05-22 Thread Gustavo A. R. Silva
Execution cannot reach NET_IP_ALIGN inside the following statement: ip_align = strict ? 2 : NET_IP_ALIGN Addresses-Coverity-ID: 1409762 Signed-off-by: Gustavo A. R. Silva --- NOTE: variable ip_align could also be removed and use value 2 directly. kernel/bpf/verifier.c | 2 +- 1 file changed, 1

Re: [PATCH 2/2] vhost/scsi: Delete error messages for failed memory allocations in five functions

2017-05-22 Thread Stefan Hajnoczi
On Mon, May 22, 2017 at 03:38:33PM +0300, Dan Carpenter wrote: > On Mon, May 22, 2017 at 12:23:20PM +0100, Stefan Hajnoczi wrote: > > I'm not sure if kmalloc() and friends guarantee to show > > a message (not just the first time, but for every failed allocation)? > > > > It prints multiple times,

Re: vhost/scsi: Delete error messages for failed memory allocations in five functions

2017-05-22 Thread Stefan Hajnoczi
On Mon, May 22, 2017 at 01:34:34PM +0200, SF Markus Elfring wrote: > >> Do you find information from a Linux allocation failure report sufficient > >> for any function implementations here? > > > > If kmalloc() and friends guarantee to print a warning and backtrace on > > every allocation failure,

[PATCH 0/3] RDS: Adjustments for two function implementations

2017-05-22 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 16:02:03 +0200 Three update suggestions were taken into account from static source code analysis. Markus Elfring (3): Delete an error message for a failed memory allocation in rds_ib_add_one() Improve a size determination in rds_ib_add_one() Dele

[PATCH 1/3] RDS: IB: Delete an error message for a failed memory allocation in rds_ib_add_one()

2017-05-22 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 15:34:28 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Sign

[PATCH 2/3] RDS: IB: Improve a size determination in rds_ib_add_one()

2017-05-22 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 15:40:21 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Mar

[PATCH 3/3] RDS: TCP: Delete an error message for a failed memory allocation in rds_tcp_init_net()

2017-05-22 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 15:45:31 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Sign

Re: [PATCH] vhost: Coalesce vq_err formats, pr_fmt misuse, add missing newlines

2017-05-22 Thread Stefan Hajnoczi
On Mon, May 22, 2017 at 03:33:43AM -0700, Joe Perches wrote: > vhost logging uses of vq_err has a few defects and style inconsistencies. > > o pr_debug already uses pr_fmt so its use in vq_err is defective > however no #defines of pr_fmt exist in this code so no actual > defects exist > o vq_e

Re: linux-next: build failure after merge of the net-next tree

2017-05-22 Thread David Miller
From: Stephen Rothwell Date: Mon, 22 May 2017 13:43:00 +1000 > Hi Dave, > > On Sun, 21 May 2017 23:14:10 -0400 (EDT) David Miller > wrote: >> >> From: Stephen Rothwell >> Date: Mon, 22 May 2017 11:16:05 +1000 >> >> > After merging the net-next tree, today's linux-next build (powerpc >> > ppc

Re: vhost/scsi: Delete error messages for failed memory allocations in five functions

2017-05-22 Thread SF Markus Elfring
> No objection from me but please make sure to keep vq_err(). How long should I wait before I may dare to send another variant for the discussed update suggestion? Which commit message would be acceptable then for this update step? Regards, Markus

network performance degradation in virtio_net in 4.12-rc

2017-05-22 Thread Mikulas Patocka
Hi I see severe network performance degradation with the kernels 4.12-rc1 and 4.12-rc2 in the network virtio driver. Download rate drops down to about 100kB/s. I bisected it and it is caused by patch d85b758f72b05a774045545f24d70980e3e9aac4 ("virtio_net: fix support for small rings"). When I

Re: [PATCH 3/3] RDS: TCP: Delete an error message for a failed memory allocation in rds_tcp_init_net()

2017-05-22 Thread Sowmini Varadhan
On (05/22/17 16:13), SF Markus Elfring wrote: > > Omit an extra message for a memory allocation failure in this function. The change itself is harmless, but I'm curious about the "extra" part: "extra" from what? If this happens, hopefully this will be logged somewhere? Note that this type of (in

Re: [PATCHv4] wlcore: add wl1285 compatible

2017-05-22 Thread David Miller
From: Kalle Valo Date: Mon, 22 May 2017 12:28:20 +0300 > Sebastian Reichel writes: > >> Motorola Droid 4 uses a WL1285C. With differences between the >> chips not being public let's add explicit binding for wl1285 >> instead of relying on wl1283 being very similar. >> >> Reviewed-by: Rob Herrin

Re: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Andrew Lunn
On Fri, May 19, 2017 at 10:57:12PM +, woojung@microchip.com wrote: > +static struct { > + int index; > + char string[ETH_GSTRING_LEN]; Hi Woojung Since you need to respin for the skb_put_padto(), please make this const. > +static int get_vlan_table(struct dsa_switch *ds, u16 vid

Re: [PATCH v3 net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-22 Thread Andrew Lunn
On Fri, May 19, 2017 at 10:57:15PM +, woojung@microchip.com wrote: > From: Woojung Huh > > Adding Microchip 9477 Phy included in KSZ9477 Switch. > > Signed-off-by: Woojung Huh > Signed-off-by: Andrew Lunn Signed-off-by? I didn't contribute any code. It probably should be Reviewed-by:

Re: RDS: TCP: Delete an error message for a failed memory allocation in rds_tcp_init_net()

2017-05-22 Thread SF Markus Elfring
>> Omit an extra message for a memory allocation failure in this function. > > The change itself is harmless, but I'm curious about the "extra" > part: "extra" from what? If this happens, hopefully this will be logged > somewhere? Note that this type of (infrequent) logging noise is useful > in s

Re: [PATCH] kernel: bpf: remove dead code

2017-05-22 Thread David Miller
From: "Gustavo A. R. Silva" Date: Mon, 22 May 2017 09:07:46 -0500 > Execution cannot reach NET_IP_ALIGN inside the following statement: > ip_align = strict ? 2 : NET_IP_ALIGN > > Addresses-Coverity-ID: 1409762 > Signed-off-by: Gustavo A. R. Silva > --- > NOTE: variable ip_align could also be re

RE: [PATCH v3 net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-22 Thread Woojung.Huh
> > Signed-off-by: Woojung Huh > > Signed-off-by: Andrew Lunn > > Signed-off-by? I didn't contribute any code. It probably should be > > Reviewed-by: Andrew Lunn Andrew, Your reply on 5/13 was with "Signed-off" :) Will change to "Reviewed-by" in next patch. Woojung

Re: [PATCH] net: fec: add post PHY reset delay DT property

2017-05-22 Thread Andrew Lunn
On Mon, May 22, 2017 at 04:00:47PM +0200, Quentin Schulz wrote: > Hi Andrew > > On 22/05/2017 15:57, Andrew Lunn wrote: > > On Mon, May 22, 2017 at 11:15:17AM +0200, Quentin Schulz wrote: > >> Some PHY require to wait for a bit after the reset GPIO has been > >> toggled. This adds support for the

Re: [PATCHv4] wlcore: add wl1285 compatible

2017-05-22 Thread Kalle Valo
David Miller writes: > From: Kalle Valo > Date: Mon, 22 May 2017 12:28:20 +0300 > >> Sebastian Reichel writes: >> >>> Motorola Droid 4 uses a WL1285C. With differences between the >>> chips not being public let's add explicit binding for wl1285 >>> instead of relying on wl1283 being very simil

Re: [PATCH v3 net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-22 Thread Andrew Lunn
On Mon, May 22, 2017 at 02:38:39PM +, woojung@microchip.com wrote: > > > Signed-off-by: Woojung Huh > > > Signed-off-by: Andrew Lunn > > > > Signed-off-by? I didn't contribute any code. It probably should be > > > > Reviewed-by: Andrew Lunn > Andrew, > > Your reply on 5/13 was with "S

Re: [PATCH net-next 00/20] net: dsa: distribute switch events

2017-05-22 Thread David Miller
From: Vivien Didelot Date: Fri, 19 May 2017 17:00:35 -0400 > DSA is by nature the support for a switch fabric, which can be composed > of a single, or multiple interconnected Ethernet switch chips. > > The current DSA core behavior is to identify the slave port targeted by > a request (e.g. addi

[patch net-next] net: sched: cls_matchall: fix null pointer dereference

2017-05-22 Thread Jiri Pirko
From: Jiri Pirko Since the head is guaranteed by the check above to be null, the call_rcu would explode. Remove the previously logically dead code that was made logically very much alive and kicking. Fixes: 985538eee06f ("net/sched: remove redundant null check on head") Signed-off-by: Jiri Pirko

Re: RDS: TCP: Delete an error message for a failed memory allocation in rds_tcp_init_net()

2017-05-22 Thread Sowmini Varadhan
> Do you find information from a Linux allocation failure report sufficient > for such an use case? yes, I suppose that would cover the needed cases. Your change looks good to me. Acked-by: Sowmini Varadhan

Re: [PATCH net-next 00/20] net: dsa: distribute switch events

2017-05-22 Thread Andrew Lunn
On Mon, May 22, 2017 at 10:45:57AM -0400, David Miller wrote: > From: Vivien Didelot > Date: Fri, 19 May 2017 17:00:35 -0400 > > > DSA is by nature the support for a switch fabric, which can be composed > > of a single, or multiple interconnected Ethernet switch chips. > > > > The current DSA co

Re: [RFC net-next PATCH 3/5] net: introduce XDP driver features interface

2017-05-22 Thread Jesper Dangaard Brouer
On Sun, 21 May 2017 02:58:19 +0200 Daniel Borkmann wrote: > On 05/20/2017 09:53 AM, Jesper Dangaard Brouer wrote: > > On Fri, 19 May 2017 19:13:29 +0200 > > Daniel Borkmann wrote: > > > >> On 05/18/2017 05:41 PM, Jesper Dangaard Brouer wrote: > >>> There is a fundamental difference between n

Re: [PATCH] kernel: bpf: remove dead code

2017-05-22 Thread Gustavo A. R. Silva
Hi David, Quoting David Miller : From: "Gustavo A. R. Silva" Date: Mon, 22 May 2017 09:07:46 -0500 Execution cannot reach NET_IP_ALIGN inside the following statement: ip_align = strict ? 2 : NET_IP_ALIGN Addresses-Coverity-ID: 1409762 Signed-off-by: Gustavo A. R. Silva --- NOTE: variable i

Re: [PATCH] kernel: bpf: remove dead code

2017-05-22 Thread Daniel Borkmann
On 05/22/2017 04:38 PM, David Miller wrote: From: "Gustavo A. R. Silva" Date: Mon, 22 May 2017 09:07:46 -0500 Execution cannot reach NET_IP_ALIGN inside the following statement: ip_align = strict ? 2 : NET_IP_ALIGN Addresses-Coverity-ID: 1409762 Signed-off-by: Gustavo A. R. Silva --- NOTE: v

[patch net-next RFC] net: sched: cls_api: make reclassify return all the way back to the original tp

2017-05-22 Thread Jiri Pirko
From: Jiri Pirko With the introduction of chain goto action, the reclassification would cause the re-iteration of the actual chain. But it perhaps makes more sense to restart the whole thing. Thoughts? Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 8 +--- 1 file changed, 5 insertions

Re: [v4] brcmfmac: btcoex: replace init_timer with setup_timer

2017-05-22 Thread Kalle Valo
Xie Qirong wrote: > setup_timer.cocci suggested the following improvement: > drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use > setup_timer function for function on line 384. > > The combination of init_timer and setting up the data and function field > manually is equivale

  1   2   3   4   >