Re: [PATCH 1/2] team: fix memory leak

2017-04-23 Thread Jiri Pirko
Sun, Apr 23, 2017 at 09:29:24AM CEST, bianpan2...@163.com wrote: >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. > Looks

Regarding patch: vlan: avoid a synchronize_net when parent device goes down

2017-04-23 Thread prasad padiyar
Hi, I had a query regarding the patch in the subject line. >From the patch pasted below vlan = vlan_dev_priv(vlandev); if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING)) -dev_change_flags(vlandev, flgs & ~IFF_UP); +list_add(>close_list,

Re: [PATCH 1/2] ixgbe: add XDP support for pass and drop actions

2017-04-23 Thread John Fastabend
On 17-04-23 09:05 PM, Jakub Kicinski wrote: > Hi! > > On Sun, 23 Apr 2017 18:31:19 -0700, John Fastabend wrote: >> +static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog) >> +{ >> +int i, frame_size = dev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; >> +struct

Re: [PATCH 1/2] ixgbe: add XDP support for pass and drop actions

2017-04-23 Thread Jakub Kicinski
Hi! On Sun, 23 Apr 2017 18:31:19 -0700, John Fastabend wrote: > +static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog) > +{ > + int i, frame_size = dev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; > + struct ixgbe_adapter *adapter = netdev_priv(dev); > + struct

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

2017-04-23 Thread Jakub Kicinski
On Sun, 23 Apr 2017 15:00:23 +0800, Pan Bian wrote: > 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

Re: [PATCH RFC (resend) net-next 0/6] virtio-net: Add support for virtio-net header extensions

2017-04-23 Thread Jason Wang
On 2017年04月21日 21:08, Vlad Yasevich wrote: On 04/21/2017 12:05 AM, Jason Wang wrote: On 2017年04月20日 23:34, Vlad Yasevich wrote: On 04/17/2017 11:01 PM, Jason Wang wrote: On 2017年04月16日 00:38, Vladislav Yasevich wrote: Curreclty virtion net header is fixed size and adding things to it is

[PATCH 0/2] ixgbe updates

2017-04-23 Thread John Fastabend
Hi Jeff, Here are two patch updates for your tree. I merged in Alex's build fix and Jakub's comments. Lightly tested xdp1 and xdp2. --- John Fastabend (2): ixgbe: add XDP support for pass and drop actions ixgbe: add support for XDP_TX action 0 files changed -- Signature

[PATCH 2/2] ixgbe: add support for XDP_TX action

2017-04-23 Thread John Fastabend
From: John Fastabend Add support for XDP_TX action. A couple design choices were made here. First I use a new ring pointer structure xdp_ring[] in the adapter struct instead of pushing the newly allocated xdp TX rings into the tx_ring[] structure. This means we have to

[PATCH 1/2] ixgbe: add XDP support for pass and drop actions

2017-04-23 Thread John Fastabend
Basic XDP drop support for ixgbe. Uses READ_ONCE/xchg semantics on XDP programs instead of rcu primitives as suggested by Daniel Borkmann and Alex Duyck. Signed-off-by: John Fastabend Acked-by: Alexander Duyck --- 0 files changed diff

Re: [PATCH net-next V3 2/2] rtnl: Add support for netdev event attribute to link messages

2017-04-23 Thread David Ahern
On 4/21/17 11:31 AM, Vladislav Yasevich wrote: > @@ -1276,9 +1277,40 @@ static int rtnl_xdp_fill(struct sk_buff *skb, struct > net_device *dev) > return err; > } > > +static int rtnl_fill_link_event(struct sk_buff *skb, unsigned long event) > +{ > + u32 rtnl_event; > + > + switch

[PATCH 1/1] rndis_wlan: add return value validation

2017-04-23 Thread Pan Bian
From: Pan Bian Function create_singlethread_workqueue() will return a NULL pointer if there is no enough memory, and its return value should be validated before using. However, in function rndis_wlan_bind(), its return value is not checked. This may cause NULL dereference

RE:drivers:net:ethernet:adi:bfin_mac: Use FIELD_SIZEOF defined kernel macro

2017-04-23 Thread Karim Eshapa
On Sun, 23 Apr 2017 22:56:38 +0200, Geert Uytterhoeven: >IMHO this makes the code less safe and less future-proof. >What if the type of info is ever changed? >There's no safety check to validate that the FIELD_SIZEOF() operates on the >same data as the strlcpy() destination. Really make sense :)

Re: [PATCH v4 net-next] mdio_bus: Issue GPIO RESET to PHYs.

2017-04-23 Thread Andrew Lunn
On Fri, Apr 21, 2017 at 03:31:09PM +0200, Lars-Peter Clausen wrote: > On 04/21/2017 03:15 PM, Roger Quadros wrote: > > diff --git a/Documentation/devicetree/bindings/net/mdio.txt > > b/Documentation/devicetree/bindings/net/mdio.txt > > new file mode 100644 > > index 000..4ffbbac > > ---

Re: [PATCH RFC] ptr_ring: add ptr_ring_unconsume

2017-04-23 Thread Michael S. Tsirkin
On Tue, Apr 18, 2017 at 11:07:42AM +0800, Jason Wang wrote: > > > On 2017年04月17日 07:19, Michael S. Tsirkin wrote: > > Applications that consume a batch of entries in one go > > can benefit from ability to return some of them back > > into the ring. > > > > Add an API for that - assuming there's

I find one aspect of the ip link show command confusing and I'd like you to fix it, please

2017-04-23 Thread Jeff Silverman
People, When my NIC is up, but not connected, I see: root@jeff-desktop:~# ip link show enp3s0 2: enp3s0: mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 link/ether 00:10:18:cc:9c:77 brd ff:ff:ff:ff:ff:ff root@jeff-desktop:~# ip link show

Re: [PATCH 1/1] drivers:net:ethernet:adi:bfin_mac: Use FIELD_SIZEOF defined kernel macro

2017-04-23 Thread Geert Uytterhoeven
Hi Karim, On Sun, Apr 23, 2017 at 8:02 PM, Karim Eshapa wrote: > Use FIELD_SIZEOF defined kernel macro kernel.h > > Signed-off-by: Karim Eshapa > --- > drivers/net/ethernet/adi/bfin_mac.c | 14 +- > 1 file changed, 9 insertions(+), 5

Re: [ovs-dev] [PATCH 1/1] openvswitch: check return value of nla_nest_start

2017-04-23 Thread Pravin Shelar
On Sat, Apr 22, 2017 at 11:43 PM, Pan Bian wrote: > Function nla_nest_start() will return a NULL pointer on error, and its > return value should be validated before it is used. However, in function > queue_userspace_packet(), its return value is ignored. This may result > in

Re: [PATCH 1/1] drivers:net:ethernet:adi:bfin_mac: Use FIELD_SIZEOF defined kernel macro

2017-04-23 Thread kbuild test robot
Hi Karim, [auto build test ERROR on net-next/master] [also build test ERROR on v4.11-rc7 next-20170421] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH net-next] bpf, doc: update list of architectures that do eBPF JIT

2017-04-23 Thread David Miller
From: Alexei Starovoitov Date: Sun, 23 Apr 2017 09:01:00 -0700 > update the list and remove 'in the future' statement, > since all still alive 64-bit architectures now do eBPF JIT. > > Signed-off-by: Alexei Starovoitov Applied, thanks :)

Re: [PATCH] brcm80211: brcmfmac: Ensure that incoming skb's are writable

2017-04-23 Thread Arend Van Spriel
On 21-4-2017 11:22, James Hughes wrote: > On 20 April 2017 at 20:48, Arend van Spriel > wrote: >> + linux-wireless >> >> On 4/20/2017 1:16 PM, James Hughes wrote: >>> >>> The driver was adding header information to incoming skb >>> without ensuring the head was

Re: [PATCH 1/1] cfg80211: add return value validation

2017-04-23 Thread Johannes Berg
This is not a cfg80211 patch, please resend with the correct subject. Thanks, johannes

Re: [PATCH net] ravb: Double free on error in ravb_start_xmit()

2017-04-23 Thread Sergei Shtylyov
Hello! On 04/22/2017 01:46 PM, Dan Carpenter wrote: If skb_put_padto() fails then it frees the skb. I shifted that code up a bit to make my error handling a little simpler. Fixes: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver") Signed-off-by: Dan Carpenter

[PATCH 1/1] drivers:net:ethernet:adi:bfin_mac: Use FIELD_SIZEOF defined kernel macro

2017-04-23 Thread Karim Eshapa
Use FIELD_SIZEOF defined kernel macro kernel.h Signed-off-by: Karim Eshapa --- drivers/net/ethernet/adi/bfin_mac.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/adi/bfin_mac.c

Re: [PATCH iproute2 net 3/8] tc/pedit: Introduce 'add' operation

2017-04-23 Thread Jamal Hadi Salim
Thanks for the excellent work. On 17-04-23 08:53 AM, Amir Vadai wrote: This command could be useful to increase/decrease fields value. Does this contradict the "retain" feature? Example rule to retain the second nibble but set the first to 0xA (essentially it X-ORs): tc filter add dev lo

Re: [PATCH net-next] bpf, doc: update list of architectures that do eBPF JIT

2017-04-23 Thread Daniel Borkmann
On 04/23/2017 06:01 PM, Alexei Starovoitov wrote: update the list and remove 'in the future' statement, since all still alive 64-bit architectures now do eBPF JIT. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann mips64 is the only 'still

[PATCH v2] net: can: usb: gs_usb: Fix buffer on stack

2017-04-23 Thread Maksim Salau
Allocate buffers on HEAP instead of STACK for local structures that are to be sent using usb_control_msg(). Signed-off-by: Maksim Salau --- Changes in v2: dropped redundant assignment. drivers/net/can/usb/gs_usb.c | 17 - 1 file changed, 12

Re: [Intel-wired-lan] NFS over NAT causes e1000e transmit hangs

2017-04-23 Thread Eric Dumazet
On Sun, 2017-04-23 at 10:08 -0700, Florian Fainelli wrote: > > On 04/22/2017 11:46 PM, Neftin, Sasha wrote: > > On 4/20/2017 00:15, Florian Fainelli wrote: > >> On 04/19/2017 01:52 AM, Neftin, Sasha wrote: > >>> On 4/18/2017 22:05, Florian Fainelli wrote: > On 04/18/2017 12:03 PM, Eric

Re: [PATCH iproute2 1/1] actions: Add support for user cookies

2017-04-23 Thread Jamal Hadi Salim
On 17-04-23 12:11 PM, Stephen Hemminger wrote: On Sat, 22 Apr 2017 08:36:23 -0400 Applied. Please update man page as well. Will do. cheers, jamal

Re: [PATCH] net: can: usb: gs_usb: Fix buffer on stack

2017-04-23 Thread Maksim Salau
> > + struct gs_identify_mode *imode = NULL; > > No need to assign imode to NULL here. Thanks, Fabio. I'll fix this in v2. Maksim

[PATCH net-next 1/1] net sched actions: Complete the JUMPX opcode

2017-04-23 Thread Jamal Hadi Salim
From: Jamal Hadi Salim per discussion at netconf/netdev: When we have an action that is capable of branching (example a policer), we can achieve a continuation of the action graph by programming a "continue" where we find an exact replica of the same filter rule with a lower

Re: [Intel-wired-lan] NFS over NAT causes e1000e transmit hangs

2017-04-23 Thread Florian Fainelli
On 04/22/2017 11:46 PM, Neftin, Sasha wrote: > On 4/20/2017 00:15, Florian Fainelli wrote: >> On 04/19/2017 01:52 AM, Neftin, Sasha wrote: >>> On 4/18/2017 22:05, Florian Fainelli wrote: On 04/18/2017 12:03 PM, Eric Dumazet wrote: > On Tue, 2017-04-18 at 11:18 -0700, Florian Fainelli

Re: [PATCH iproute2] iplink: Expose IFLA_*_FWMARK attributes for supported link types

2017-04-23 Thread Stephen Hemminger
On Fri, 21 Apr 2017 14:14:53 -0400 Craig Gallek wrote: > From: Craig Gallek > > This attribute allows the administrator to adjust the packet marking > attribute of tunnels that support policy based routing. > > Signed-off-by: Craig Gallek

Re: [PATCH iproute2] gre6: fix copy/paste bugs in GREv6 attribute manipulation

2017-04-23 Thread Stephen Hemminger
On Fri, 21 Apr 2017 14:14:25 -0400 Craig Gallek wrote: > From: Craig Gallek > > Fixes: af89576d7a8c("iproute2: GRE over IPv6 tunnel support.") > Signed-off-by: Craig Gallek Thanks. Applied.

Re: tools/testing/selftests/bpf/Makefile

2017-04-23 Thread Alexei Starovoitov
On Sat, Apr 22, 2017 at 03:45:01PM -0400, David Miller wrote: > > Alexei, that unconditional -D__x86_64__ isn't going to work. It in > fact makes the build break on sparc because the types.h asm headers > explicitly check for things like __sparc__ && __arch64__ etc. yeah. it was a quick

Re: [PATCH iproute2 1/1] actions: Add support for user cookies

2017-04-23 Thread Stephen Hemminger
On Sat, 22 Apr 2017 08:36:23 -0400 Jamal Hadi Salim wrote: > From: Jamal Hadi Salim > > Make use of 128b user cookies > > Introduce optional 128-bit action cookie. > Like all other cookie schemes in the networking world (eg in protocols > like http or

[PATCH net-next] bpf, doc: update list of architectures that do eBPF JIT

2017-04-23 Thread Alexei Starovoitov
update the list and remove 'in the future' statement, since all still alive 64-bit architectures now do eBPF JIT. Signed-off-by: Alexei Starovoitov --- mips64 is the only 'still alive' 64-bit arch without eBPF JIT :) --- Documentation/networking/filter.txt | 7 +++ 1 file

Re: [PATCH v2 net] net: ipv6: regenerate host route if moved to gc list

2017-04-23 Thread David Ahern
On 4/22/17 8:28 PM, Martin KaFai Lau wrote: >> The code path to fixup_permanent_addr is under RTNL, so the if check on >> ifp->rt and rt6i_ref is ok -- neither can be changed since RTNL is held. >> >> Since ifp->rt can be accessed outside of RTNL, the spinlock is needed to >> change its value. >

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

2017-04-23 Thread Jon Maloy
Acknowledged. Thank you for doing this job. ///jon > -Original Message- > From: Pan Bian [mailto:bianpan2...@163.com] > Sent: Sunday, April 23, 2017 03:09 AM > To: Jon Maloy ; Ying Xue > ; David S. Miller > Cc:

[PATCH 1/1] cfg80211: add return value validation

2017-04-23 Thread Pan Bian
From: Pan Bian Function create_singlethread_workqueue() will return a NULL pointer if there is no enough memory, and its return value should be validated before using. However, in function rndis_wlan_bind(), its return value is not checked. This may cause NULL dereference

[PATCH 1/1] libertas: check return value of alloc_workqueue

2017-04-23 Thread Pan Bian
From: Pan Bian Function alloc_workqueue() will return a NULL pointer if there is no enough memory, and its return value should be validated before using. However, in function if_spi_probe(), its return value is not checked. This may result in a NULL dereference bug. This

[PATCH iproute2 net 8/8] tc/pedit: p_udp: introduce pedit udp support

2017-04-23 Thread Amir Vadai
From: Or Gerlitz For example, forward udp traffic destined to port 999 to veth0 and set tcp port to 888: $ tc filter add dev enp0s9 protocol ip parent : \ flower \ ip_proto udp \ dst_port 999 \ action pedit ex munge \ udp dport set 888 \

[PATCH iproute2 net 7/8] tc/pedit: p_tcp: introduce pedit tcp support

2017-04-23 Thread Amir Vadai
For example, forward tcp traffic destined to port 80 to veth0 and set tcp port to 8080: $ tc filter add dev enp0s9 protocol ip parent : \ flower \ ip_proto tcp \ dst_port 80 \ action pedit ex munge \ tcp dport set 8080 \ action mirred egress \ redirect dev

[PATCH iproute2 net 5/8] tc/pedit: Support fields bigger than 32 bits

2017-04-23 Thread Amir Vadai
Make parse_val() accept fields up to 128 bits long, this should be enough for current use cases and involves a minimal change to code. Signed-off-by: Amir Vadai --- tc/m_pedit.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tc/m_pedit.c

[PATCH iproute2 net 6/8] tc/pedit: p_eth: ETH header editor

2017-04-23 Thread Amir Vadai
For example, forward tcp traffic to veth0 and set destination mac address to 11:22:33:44:55:66 : $ tc filter add dev enp0s9 protocol ip parent : \ flower \ ip_proto tcp \ action pedit ex munge \ eth dst set 11:22:33:44:55:66 \ action mirred egress \ redirect dev

[PATCH iproute2 net 0/8] tc/act_pedit: Support offset relative to conventional header

2017-04-23 Thread Amir Vadai
Hi Stephen, This patchset extends pedit to support modifying a field in an offset relative to the conventional network headers (kenrel support was added [1] in 4.11 rc1). Without the extended pedit, user could specify fields in TCP and ICMP headers, but the kernel code was using an offset

[PATCH iproute2 net 3/8] tc/pedit: Introduce 'add' operation

2017-04-23 Thread Amir Vadai
This command could be useful to increase/decrease fields value. Signed-off-by: Amir Vadai --- man/man8/tc-pedit.8 | 13 - tc/m_pedit.c| 18 +++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/man/man8/tc-pedit.8

[PATCH iproute2 net 4/8] tc/pedit: p_ip: introduce editing ttl header

2017-04-23 Thread Amir Vadai
Enable user to edit IP header ttl field. For example, to forward any TCP packet and decrease its TTL by one: $ tc filter add dev enp0s9 protocol ip parent : \ flower \ ip_proto tcp \ action pedit ex munge \ ip ttl add 0xff pipe \ action mirred egress \ redirect

[PATCH iproute2 net 2/8] tc/pedit: Extend pedit to specify offset relative to mac/transport headers

2017-04-23 Thread Amir Vadai
Utilize the extended pedit netlink to set an offset relative to a specific header type. Old netlink only enabled the user to set approximated offset relative to the IPv4 header. To use this extended functionality need to use the 'ex' keyword after 'pedit' and before any 'munge'. e.g: $ tc filter

[PATCH iproute2 net 1/8] tc/pedit: Fix a typo in pedit usage message

2017-04-23 Thread Amir Vadai
Signed-off-by: Amir Vadai --- tc/m_pedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_pedit.c b/tc/m_pedit.c index 8e9bf0720dfe..939a6a1455a5 100644 --- a/tc/m_pedit.c +++ b/tc/m_pedit.c @@ -40,7 +40,7 @@ static void explain(void)

[PATCH 1/1] qlcnic: fix unchecked return value

2017-04-23 Thread Pan Bian
From: Pan Bian Function pci_find_ext_capability() may return 0, which is an invalid address. In function qlcnic_sriov_virtid_fn(), its return value is used without validation. This may result in invalid memory access bugs. This patch fixes the bug. Signed-off-by: Pan Bian

[net 5/7] net/mlx5: Fix UAR memory leak

2017-04-23 Thread Saeed Mahameed
From: Maor Gottlieb When UAR is released, we deallocate the device resource, but don't unmmap the UAR mapping memory. Fix the leak by unmapping this memory. Fixes: a6d51b68611e9 ('net/mlx5: Introduce blue flame register allocator) Signed-off-by: Maor Gottlieb

[net 2/7] net/mlx5: E-Switch, Correctly deal with inline mode on ConnectX-5

2017-04-23 Thread Saeed Mahameed
From: Or Gerlitz On ConnectX5 the wqe inline mode is "none" and hence the FW reports MLX5_CAP_INLINE_MODE_NOT_REQUIRED. Fix our devlink callbacks to deal with that on get and set. Also fix the tc flow parsing code not to fail anything when inline isn't required. Fixes:

[net 6/7] net/mlx5e: Fix small packet threshold

2017-04-23 Thread Saeed Mahameed
From: Eugenia Emantayev RX packet headers are meant to be contained in SKB linear part, and chose a threshold of 128. It turns out this is not enough, i.e. for IPv6 packet over VxLAN. In this case, UDP/IPv4 needs 42 bytes, GENEVE header is 8 bytes, and 86 bytes for

[net 3/7] net/mlx5e: Make sure the FW max encap size is enough for ipv4 tunnels

2017-04-23 Thread Saeed Mahameed
From: Or Gerlitz Otherwise the code that fills the ipv4 encapsulation headers could be writing beyond the allocated headers buffer. Fixes: a54e20b4fcae ('net/mlx5e: Add basic TC tunnel set action for SRIOV offloads') Signed-off-by: Or Gerlitz

[net 1/7] net/mlx5: Fix driver load bad flow when having fw initializing timeout

2017-04-23 Thread Saeed Mahameed
From: Mohamad Haj Yahia If FW is stuck in initializing state we will skip the driver load, but current error handling flow doesn't clean previously allocated command interface resources. Fixes: e3297246c2c8 ('net/mlx5_core: Wait for FW readiness on startup') Signed-off-by:

[net 4/7] net/mlx5e: Make sure the FW max encap size is enough for ipv6 tunnels

2017-04-23 Thread Saeed Mahameed
From: Or Gerlitz Otherwise the code that fills the ipv6 encapsulation headers could be writing beyond the allocated headers buffer. Fixes: ce99f6b97fcd ('net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels') Signed-off-by: Or Gerlitz

[pull request][net 0/7] Mellanox, mlx5 fixes 2017-04-22

2017-04-23 Thread Saeed Mahameed
Hi Dave, This series contains some mlx5 fixes for net. For your convenience, the series doesn't introduce any conflict with the ongoing net-next pull request. Please pull and let me know if there's any problem. For -stable: ("net/mlx5: E-Switch, Correctly deal with inline mode on ConnectX-5")

[net 7/7] net/mlx5e: Fix ETHTOOL_GRXCLSRLALL handling

2017-04-23 Thread Saeed Mahameed
From: Ilan Tayari Handler for ETHTOOL_GRXCLSRLALL must set info->data to the size of the table, regardless of the amount of entries in it. Existing code does not do that, and this breaks all usage of ethtool -N or -n without explicit location, with this error: rmgr: Invalid

[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:

[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

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

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

Re: [RFC] change the default Kconfig value of mlx5_en

2017-04-23 Thread Matan Barak
On 22/04/2017 12:28, Ian Kumlien wrote: On Sat, Apr 22, 2017 at 3:07 AM, Saeed Mahameed wrote: On Sat, Apr 22, 2017 at 3:47 AM, Ian Kumlien wrote: On Sat, Apr 22, 2017 at 2:34 AM, Saeed Mahameed wrote: On Sat, Apr

[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

[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

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

[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:

[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

Re: [Intel-wired-lan] NFS over NAT causes e1000e transmit hangs

2017-04-23 Thread Neftin, Sasha
On 4/20/2017 00:15, Florian Fainelli wrote: On 04/19/2017 01:52 AM, Neftin, Sasha wrote: On 4/18/2017 22:05, Florian Fainelli wrote: On 04/18/2017 12:03 PM, Eric Dumazet wrote: On Tue, 2017-04-18 at 11:18 -0700, Florian Fainelli wrote: Hi, I am using NFS over a NAT with two e1000e adapters

[PATCH 1/1] openvswitch: check return value of nla_nest_start

2017-04-23 Thread Pan Bian
Function nla_nest_start() will return a NULL pointer on error, and its return value should be validated before it is used. However, in function queue_userspace_packet(), its return value is ignored. This may result in NULL dereference when calling nla_nest_end(). This patch fixes the bug.

[PATCH 1/1] lwtunnel: check return value of nla_nest_start

2017-04-23 Thread Pan Bian
Function nla_nest_start() may return a NULL pointer on error. However, in function lwtunnel_fill_encap(), the return value of nla_nest_start() is not validated before it is used. This patch checks the return value of nla_nest_start() against NULL. Signed-off-by: Pan Bian ---