Re: [tipc-discussion] [PATCH] TIPC: fix tipc_link_create error handling

2007-07-26 Thread David Miller
From: Florian Westphal <[EMAIL PROTECTED]> Date: Wed, 25 Jul 2007 00:02:56 +0200 > if printbuf allocation or tipc_node_attach_link() fails, invalid > references to the link are left in the associated node and bearer > structures. > Fix by allocating printbuf early and moving timer initialization >

Re: [tipc-discussion] [patch 1/1] Convert the semaphore to a mutex in net/tipc/socket.c

2007-12-12 Thread David Miller
From: Andrew Morton <[EMAIL PROTECTED]> Date: Tue, 11 Dec 2007 16:44:45 -0800 > So I'd propose this: I've applied this to net-2.6, thanks Andrew. - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace.

Re: [tipc-discussion] RE : /net/tipc/port.c: Use tipc_port_unlock

2008-01-08 Thread David Miller
From: Jon Paul Maloy <[EMAIL PROTECTED]> Date: Tue, 8 Jan 2008 10:34:58 -0500 (EST) > I have no objections. I've applied this patch, thanks everyone. - Check out the new SourceForge.net Marketplace. It's the best place to bu

Re: [tipc-discussion] [PATCH] TIPC Protocol: Convert tsock->sem in a mutex

2008-03-03 Thread David Miller
From: Matthias Kaehlcke <[EMAIL PROTECTED]> Date: Sun, 2 Mar 2008 19:36:37 +0100 > TIPC Protocol: The semaphore tsock->sem is used as mutex, convert it > to the mutex API > > Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> Applied, thanks a lot. Yes, I know the TIPC folks said they have a

Re: [tipc-discussion] [PATCH net-next 1/1] tipc: fix node reference count bug

2015-12-03 Thread David Miller
From: Jon Maloy Date: Wed, 2 Dec 2015 15:19:37 -0500 > Commit 5405ff6e15f40f2f ("tipc: convert node lock to rwlock") > introduced a bug to the node reference counter handling. When a > message is successfully sent in the function tipc_node_xmit(), > we return directly after releasing the node lo

Re: [tipc-discussion] [PATCH net-next v1 1/2] tipc: move netlink policies to netlink.h

2016-01-05 Thread David Miller
From: Richard Alpe Date: Tue, 5 Jan 2016 10:56:16 +0100 > Make the c files less cluttered and enable netlink attributes to be > shared between files. This will prove useful in a future patch where a > node message will contain a nested network. > > Signed-off-by: Richard Alpe > Acked-by: Jon Ma

Re: [tipc-discussion] [PATCH net-next v1 1/2] tipc: move netlink policies to netlink.h

2016-01-09 Thread David Miller
From: Richard Alpe Date: Thu, 7 Jan 2016 11:20:08 +0100 > Do you have any suggestion on how to handle the case where a policy > (table) is shared between c files, like the net policy in the > subsequent patch? I could perhaps use extern in the c files (which > seems frown upon) or duplicate the p

Re: [tipc-discussion] [PATCH net-next v2] tipc: add peer removal functionality

2016-01-12 Thread David Miller
From: Richard Alpe Date: Tue, 12 Jan 2016 15:08:16 +0100 > Add TIPC_NL_PEER_REMOVE netlink command. This command can remove > an offline peer node from the internal data structures. > > This will be supported by the tipc user space tool in iproute2. > > Signed-off-by: Richard Alpe > Reviewed-b

Re: [tipc-discussion] [PATCH net v2] tipc: fix connection abort during subscription cancel

2016-01-27 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Wed, 27 Jan 2016 11:35:59 +0100 > In 'commit 7fe8097cef5f ("tipc: fix nullpointer bug when subscribing > to events")', we terminate the connection if the subscription > creation fails. > In the same commit, the subscription creation result was based on > the v

Re: [tipc-discussion] [PATCH net-next v1 1/2] tipc: fix link attribute propagation bug

2016-02-05 Thread David Miller
From: Richard Alpe Date: Mon, 1 Feb 2016 08:19:56 +0100 > Changing certain link attributes (link tolerance and link priority) > from the TIPC management tool is supposed to automatically take > effect at both endpoints of the affected link. > > Currently the media address is not instantiated for

Re: [tipc-discussion] [PATCH net-next v1 2/2] tipc: fix link priority propagation

2016-02-05 Thread David Miller
From: Richard Alpe Date: Mon, 1 Feb 2016 08:19:57 +0100 > Currently link priority changes isn't handled for active links. In > this patch we resolve this by changing our priority if the peer passes > a valid priority in a state message. > > Reviewed-by: Jon Maloy > Signed-off-by: Richard Alpe

Re: [tipc-discussion] [PATCH net-next v2 00/10] tipc: cleanups, fixes & improvements for topology server

2016-02-06 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Tue, 2 Feb 2016 10:52:07 +0100 > This series contains topology server cleanups, fixes and improvements. > > Cleanups in #1-#4: > We remove duplicate data structures and aligin the rest of the code > accordingly. > > Fixes in #5-#8: > The bugs occur either d

Re: [tipc-discussion] [PATCH net 1/1] tipc: fix premature addition of node to lookup table

2016-02-16 Thread David Miller
From: Jon Maloy Date: Wed, 10 Feb 2016 16:14:57 -0500 > In commit 5266698661401a ("tipc: let broadcast packet reception > use new link receive function") we introduced a new per-node > broadcast reception link instance. This link is created at the > moment the node itself is created. Unfortunatel

Re: [tipc-discussion] [PATCH net-next v1] tipc: refactor node xmit and fix memory leaks

2016-02-16 Thread David Miller
From: Richard Alpe Date: Thu, 11 Feb 2016 10:43:15 +0100 > Refactor tipc_node_xmit() to fail fast and fail early. Fix several > potential memory leaks in unexpected error paths. > > Reported-by: Dmitry Vyukov > Reviewed-by: Jon Maloy > Signed-off-by: Richard Alpe Applied, thanks. --

Re: [tipc-discussion] [PATCH net-next 1/1] tipc: eliminate risk of finding to-be-deleted node instance

2016-02-25 Thread David Miller
From: Jon Maloy Date: Wed, 24 Feb 2016 11:00:19 -0500 > Although we have never seen it happen, we have identified the > following problematic scenario when nodes are stopped and deleted: > > CPU0:CPU1: > > tipc_node_xxx() //ref == 1

Re: [tipc-discussion] [PATCH net-next 1/1] tipc: fix crash during node removal

2016-02-25 Thread David Miller
From: Jon Maloy Date: Wed, 24 Feb 2016 11:10:48 -0500 > When the TIPC module is unloaded, we have identified a race condition > that allows a node reference counter to go to zero and the node instance > being freed before the node timer is finished with accessing it. This > leads to occasional cr

Re: [tipc-discussion] [PATCH net v1 1/1] tipc: Revert "tipc: use existing sk_write_queue for outgoing packet chain"

2016-03-03 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Tue, 1 Mar 2016 11:07:09 +0100 > reverts commit 94153e36e709e ("tipc: use existing sk_write_queue for > outgoing packet chain") > > In Commit 94153e36e709e, we assume that we fill & empty the socket's > sk_write_queue within the same lock_sock() session. > >

Re: [tipc-discussion] [PATCH net-next v1 2/4] tipc: don't check link reset on non existing link

2016-03-06 Thread David Miller
From: Richard Alpe Date: Thu, 3 Mar 2016 14:20:41 +0100 > Make sure we have a link before checking if it has been reset or not. > > Prior to this patch tipc_link_is_reset() could be called with a non > existing link, resulting in a null pointer dereference. > > Signed-off-by: Richard Alpe > Ac

Re: [tipc-discussion] [PATCH net-next v1 3/4] tipc: safely copy UDP netlink data from user

2016-03-06 Thread David Miller
From: Richard Alpe Date: Thu, 3 Mar 2016 14:20:42 +0100 > The netlink policy for TIPC_NLA_UDP_LOCAL and TIPC_NLA_UDP_REMOTE > is of type binary with a defined length. This causes the policy > framework to threat the defined length as maximum length. > > There is however no protection against a u

Re: [tipc-discussion] [PATCH net-next v1 4/4] tipc: make sure required IPv6 addresses are scoped

2016-03-06 Thread David Miller
From: Richard Alpe Date: Thu, 3 Mar 2016 14:20:43 +0100 > Make sure the user has provided a scope for multicast and link local > addresses used locally by a UDP bearer. > > Signed-off-by: Richard Alpe > Acked-by: Jon Maloy > Reviewed-by: Erik Hugne Applied. -

Re: [tipc-discussion] [PATCH net-next v1 1/4] tipc: add net device to skb before UDP xmit

2016-03-06 Thread David Miller
From: Richard Alpe Date: Thu, 3 Mar 2016 14:20:40 +0100 > Prior to this patch enabling a IPv4 UDP bearer caused a null pointer > dereference in iptunnel_xmit_stats(), when it tried to dereference the > net device from the skb. To resolve this we now point the skb device > to the net device resolv

Re: [tipc-discussion] [PATCH net v1 1/1] tipc: fix nullptr crash during subscription cancel

2016-03-06 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Thu, 3 Mar 2016 17:54:54 +0100 > commit 4d5cfcba2f6e ('tipc: fix connection abort during subscription > cancel'), removes the check for a valid subscription before calling > tipc_nametbl_subscribe(). > > This will lead to a nullptr exception when we process a

Re: [tipc-discussion] [PATCH net-next 1/1] tipc: remove pre-allocated message header in link struct

2016-03-06 Thread David Miller
From: Jon Maloy Date: Thu, 3 Mar 2016 14:23:21 -0500 > Until now, we have kept a pre-allocated protocol message header > aggregated into struct tipc_link. Apart from adding unnecessary > footprint to the link instances, this requires extra code both to > initialize and re-initialize it. > > We

Re: [tipc-discussion] [PATCH net-next v2] tipc: move netlink policies to netlink.c

2016-03-07 Thread David Miller
From: Richard Alpe Date: Fri, 4 Mar 2016 17:04:42 +0100 > Make the c files less cluttered and enable netlink attributes to be > shared between files. > > Signed-off-by: Richard Alpe > Reviewed-by: Jon Maloy > Acked-by: Parthasarathy Bhuvaragan Applied, thanks for cleaning this up. -

Re: [tipc-discussion] [PATCH net-next v1] tipc: make sure IPv6 header fits in skb headroom

2016-03-14 Thread David Miller
From: Richard Alpe Date: Mon, 14 Mar 2016 09:43:52 +0100 > Expand headroom further in order to be able to fit the larger IPv6 > header. Prior to this patch this caused a skb under panic for certain > tipc packets when using IPv6 UDP bearer(s). > > Signed-off-by: Richard Alpe > Acked-by: Jon Mal

Re: [tipc-discussion] [PATCH net-next v3 0/2] tipc: some small fixes

2016-04-07 Thread David Miller
From: Jon Maloy Date: Thu, 7 Apr 2016 10:09:12 -0400 > When fix a minor buffer leak, and ensure that bearers filter packets > correctly while they are being shut down. > > v2: Corrected typos in commit #3, as per feedback from S. Shtylyov > v3: Removed commit #3 from the series. Improved versio

Re: [tipc-discussion] [PATCH net 0/2] tipc: name distributor pernet queue

2016-04-11 Thread David Miller
From: Jon Maloy Date: Thu, 7 Apr 2016 10:40:42 -0400 > Commit #1 fixes a potential issue with deferred binding table > updates being pushed to the wrong namespace. > > Commit #2 solves a problem with deferred binding table updates > remaining in the the defer queue after the issuing node has g

Re: [tipc-discussion] [PATCH net-next 1/1] tipc: remove remnants of old broadcast code

2016-04-13 Thread David Miller
From: Jon Maloy Date: Wed, 13 Apr 2016 11:45:47 -0400 > We remove a couple of leftover fields in struct tipc_bearer. Those > were used by the old broadcast implementation, and are not needed > any longer. There is no functional changes in this commit. > > Acked-by: Ying Xue > Signed-off-by: Jon

Re: [tipc-discussion] [PATCH net-next v1 1/1] tipc: fix a race condition leading to subscriber refcnt bug

2016-04-14 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Tue, 12 Apr 2016 13:05:21 +0200 > Until now, the requests sent to topology server are queued > to a workqueue by the generic server framework. > These messages are processed by worker threads and trigger the > registered callbacks. > To reduce latency on unipr

Re: [tipc-discussion] [PATCH net-next 0/5] tipc: improvements to the link setup algorithm

2016-04-15 Thread David Miller
From: Jon Maloy Date: Fri, 15 Apr 2016 13:33:02 -0400 > This series addresses some smaller issues regarding the link setup > algorithm. The first commit fixes a rare bug we have discovered during > testing; the second one may have some future impact on cluster > scalabilty, while remaining ones

Re: [tipc-discussion] [PATCH net-next v1 1/1] tipc: fix stale links after re-enabling bearer

2016-04-24 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Thu, 21 Apr 2016 15:51:13 +0200 > Commit 42b18f605fea ("tipc: refactor function tipc_link_timeout()"), > introduced a bug which prevents sending of probe messages during > link synchronization phase. This leads to hanging links, if the > bearer is disabled/ena

Re: [tipc-discussion] [patch] tipc: remove an unnecessary NULL check

2016-04-28 Thread David Miller
From: Dan Carpenter Date: Wed, 27 Apr 2016 11:05:28 +0300 > This is never called with a NULL "buf" and anyway, we dereference 's' on > the lines before so it would Oops before we reach the check. > > Signed-off-by: Dan Carpenter Applied to net-next, thanks. ---

Re: [tipc-discussion] [PATCH net-next 1/1] tipc: set 'active' state correctly for first established link

2016-05-01 Thread David Miller
From: Jon Maloy Date: Thu, 28 Apr 2016 20:16:08 -0400 > When we are displaying statistics for the first link established between > two peers, it will always be presented as STANDBY although it in reality > is ACTIVE. > > This happens because we forget to set the 'active' flag in the link > insta

Re: [tipc-discussion] [PATCH net v2 1/1] tipc: only process unicast on intended node

2016-05-01 Thread David Miller
From: Jon Maloy Date: Fri, 29 Apr 2016 10:40:24 -0400 > From: Hamish Martin > > We have observed complete lock up of broadcast-link transmission due to > unacknowledged packets never being removed from the 'transmq' queue. This > is traced to nodes having their ack field set beyond the sequence

Re: [tipc-discussion] [PATCH net-next 0/3] tipc: redesign socket-level flow control

2016-05-03 Thread David Miller
From: Jon Maloy Date: Mon, 2 May 2016 10:22:33 -0400 > The socket-level flow control in TIPC has long been due for a major > overhaul. This series fixes this. Series applied, thanks Jon. -- Find and fix application per

Re: [tipc-discussion] [PATCH net-next 1/1] tipc: eliminate risk of double link_up events

2016-05-12 Thread David Miller
From: Jon Maloy Date: Wed, 11 May 2016 19:15:45 -0400 > When an ACTIVATE or data packet is received in a link in state > ESTABLISHING, the link does not immediately change state to > ESTABLISHED, but does instead return a LINK_UP event to the caller, > which will execute the state change in a dif

Re: [tipc-discussion] [PATCH net-next] tipc: check nl sock before parsing nested attributes

2016-05-16 Thread David Miller
From: Richard Alpe Date: Mon, 16 May 2016 11:14:54 +0200 > Make sure the socket for which the user is listing publication exists > before parsing the socket netlink attributes. > > Prior to this patch a call without any socket caused a NULL pointer > dereference in tipc_nl_publ_dump(). > > Test

Re: [tipc-discussion] [PATCH net] tipc: fix nametable publication field in nl compat

2016-05-17 Thread David Miller
From: Richard Alpe Date: Tue, 17 May 2016 16:57:37 +0200 > The publication field of the old netlink API should contain the > publication key and not the publication reference. > > Fixes: 44a8ae94fd55 (tipc: convert legacy nl name table dump to nl compat) > Signed-off-by: Richard Alpe > Acked-by

Re: [tipc-discussion] [PATCH] net/tipc: fix potential null pointer dereference in several tipc netlink compat functions

2016-05-23 Thread David Miller
From: Baozeng Ding Date: Sun, 22 May 2016 00:22:48 +0800 > @@ -916,10 +970,16 @@ static int tipc_nl_compat_sk_dump(struct > tipc_nl_compat_msg *msg, > static int tipc_nl_compat_media_dump(struct tipc_nl_compat_msg *msg, > struct nlattr **attrs) > { > +int err; > s

Re: [tipc-discussion] [PATCH v2] tipc: fix potential null pointer dereferences in some compat functions

2016-05-25 Thread David Miller
From: Baozeng Ding Date: Tue, 24 May 2016 22:33:24 +0800 > Before calling the nla_parse_nested function, make sure the pointer to the > attribute is not null. This patch fixes several potential null pointer > dereference vulnerabilities in the tipc netlink functions. > > Signed-off-by: Baozeng D

Re: [tipc-discussion] [PATCH net-next 0/2] tipc: two small fixes

2016-06-08 Thread David Miller
From: Jon Maloy Date: Wed, 8 Jun 2016 12:00:03 -0400 > We fix a couple of rarely seen anomalies discovered during testing. Series applied, thanks Jon. -- What NetFlow Analyzer can do for you? Monitors network bandwidth

Re: [tipc-discussion] [PATCH] tipc: fix potential null pointer dereference in the nla_data function

2016-06-10 Thread David Miller
From: Baozeng Ding Date: Fri, 10 Jun 2016 10:26:59 +0800 > Before calling the nla_data function, make sure the argument is not null. > Fix potential null pointer dereference vulnerability for this. > > Signed-off-by: Baozeng Ding TIPC maintainers, please review. --

Re: [tipc-discussion] [PATCH] tipc: fix potential null pointer dereference in the nla_data function

2016-06-11 Thread David Miller
From: Erik Hugne Date: Sat, 11 Jun 2016 09:46:32 +0200 > On Jun 11, 2016 08:24, "David Miller" wrote: >> >> From: Baozeng Ding >> Date: Fri, 10 Jun 2016 10:26:59 +0800 >> >> > Before calling the nla_data function, make sure the argument

Re: [tipc-discussion] [PATCH net-next 1/1] tipc: add neighbor monitoring framework

2016-06-15 Thread David Miller
From: Jon Maloy Date: Mon, 13 Jun 2016 20:46:22 -0400 > TIPC based clusters are by default set up with full-mesh link > connectivity between all nodes. Those links are expected to provide > a short failure detection time, by default set to 1500 ms. Because > of this, the background load for neigh

Re: [tipc-discussion] [PATCH] tipc: fix suspicious RCU usage

2016-06-15 Thread David Miller
From: Ying Xue Date: Wed, 15 Jun 2016 14:10:57 +0800 > When run tipcTS&tipcTC test suite, the following complaint appears: ... > The warning appears as rtnl_dereference() is wrongly used in > tipc_l2_send_msg() under RCU read lock protection. Instead the proper > usage should be that rcu_derefer

Re: [tipc-discussion] [PATCH] tipc: eliminate uninitialized variable warning

2016-06-15 Thread David Miller
From: Ying Xue Date: Wed, 15 Jun 2016 14:11:31 +0800 > net/tipc/link.c: In function ‘tipc_link_timeout’: > net/tipc/link.c:744:28: warning: ‘mtyp’ may be used uninitialized in this > function [-Wuninitialized] > > Fixes: 42b18f605fea ("tipc: refactor function tipc_link_timeout()") > Acked-by: J

Re: [tipc-discussion] [patch -next] tipc: potential shift wrapping bug in map_set()

2016-06-17 Thread David Miller
From: Dan Carpenter Date: Fri, 17 Jun 2016 12:22:26 +0300 > "up_map" is a u64 type but we're not using the high 32 bits. > > Fixes: 35c55c9877f8 ('tipc: add neighbor monitoring framework') > Signed-off-by: Dan Carpenter Applied.

Re: [tipc-discussion] [PATCH net 1/1] tipc: fix socket timer deadlock

2016-06-17 Thread David Miller
From: Jon Maloy Date: Fri, 17 Jun 2016 06:35:57 -0400 > We sometimes observe a 'deadly embrace' type deadlock occurring > between mutually connected sockets on the same node. This happens > when the one-hour peer supervision timers happen to expire > simultaneously in both sockets. > > The scena

Re: [tipc-discussion] [PATCH net 1/1] tipc: unclone unbundled buffers before forwarding

2016-06-22 Thread David Miller
From: Jon Maloy Date: Mon, 20 Jun 2016 09:20:46 -0400 > When extracting an individual message from a received "bundle" buffer, > we just create a clone of the base buffer, and adjust it to point into > the right position of the linearized data area of the latter. This works > well for regular mes

Re: [tipc-discussion] [PATCH] tipc: Use kmemdup instead of kmalloc and memcpy

2016-06-27 Thread David Miller
From: Amitoj Kaur Chawla Date: Thu, 23 Jun 2016 10:19:37 +0530 > Replace calls to kmalloc followed by a memcpy with a direct call to > kmemdup. > > The Coccinelle semantic patch used to make this change is as follows: > @@ > expression from,to,size,flag; > statement S; > @@ > > - to = \(kmallo

Re: [tipc-discussion] [PATCH net-next 1/2] tipc: honor msg2addr return value

2016-06-29 Thread David Miller
From: Richard Alpe Date: Mon, 27 Jun 2016 13:34:06 +0200 > The UDP msg2addr function tipc_udp_msg2addr() can return -EINVAL which > prior to this patch was unhanded in the caller. > > Signed-off-by: Richard Alpe > Acked-by: Jon Maloy > Acked-by: Ying Xue Applied. ---

Re: [tipc-discussion] [PATCH net-next 2/2] tipc: rename udp_port in struct udp_media_addr

2016-06-29 Thread David Miller
From: Richard Alpe Date: Mon, 27 Jun 2016 13:34:07 +0200 > Context implies that port in struct "udp_media_addr" is referring > to a UDP port. > > Signed-off-by: Richard Alpe > Acked-by: Jon Maloy > Acked-by: Ying Xue Applied. -

Re: [tipc-discussion] [PATCH net-next] tipc: fix nl compat regression for link statistics

2016-07-01 Thread David Miller
From: Richard Alpe Date: Fri, 1 Jul 2016 11:11:21 +0200 > Fix incorrect use of nla_strlcpy() where the first NLA_HDRLEN bytes > of the link name where left out. > > Making the output of tipc-config -ls look something like: > Link statistics: > dcast-link > 1:data0-1.1.2:data0 > 1:data0-1.1.3:dat

Re: [tipc-discussion] [PATCH net 0/3] tipc: three small fixes

2016-07-11 Thread David Miller
From: Jon Maloy Date: Mon, 11 Jul 2016 16:08:34 -0400 > Fixes for some broadcast link problems that may occur in large systems. Series applied, thanks Jon. -- What NetFlow Analyzer can do for you? Monitors network bandw

Re: [tipc-discussion] [PATCH net-next v1 0/5] tipc: netlink updates for neighbour monitor

2016-07-25 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Fri, 22 Jul 2016 08:42:43 +0200 > This series contains the updates to configure and read the attributes for > neighbour monitor. > > Parthasarathy Bhuvaragan (5): > tipc: introduce constants for tipc address validation > tipc: make cluster size threshold

Re: [tipc-discussion] [PATCH net-next v2 0/5] tipc: netlink updates for neighbour monitor

2016-07-26 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Tue, 26 Jul 2016 08:47:17 +0200 > This series contains the updates to configure and read the attributes for > neighbour monitor. > > v2: rebase on top of net-next Series applied, thanks. --

Re: [tipc-discussion] [PATCH -next] tipc: fix imbalance read_unlock_bh in __tipc_nl_add_monitor()

2016-07-30 Thread David Miller
From: Wei Yongjun Date: Thu, 28 Jul 2016 02:07:49 + > In the error handling case of nla_nest_start() failed read_unlock_bh() > is called to unlock a lock that had not been taken yet. sparse warns > about the context imbalance as the following: > > net/tipc/monitor.c:799:23: warning: > cont

Re: [tipc-discussion] [PATCH net v1 1/1] tipc: fix variable dereference before NULL check

2016-08-10 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Wed, 10 Aug 2016 14:07:34 +0200 > In commit cf6f7e1d5109 ("tipc: dump monitor attributes"), > I dereferenced a pointer before checking if its valid. > This is reported by static check Smatch as: > net/tipc/monitor.c:733 tipc_nl_add_monitor_peer() > warn:

Re: [tipc-discussion] [PATCH net-next 0/2] tipc: bearer and link improvements

2016-08-18 Thread David Miller
From: Jon Maloy Date: Tue, 16 Aug 2016 11:53:49 -0400 > The first commit makes it possible to set and check the 'blocked' state > of a bearer from the generic bearer layer. The second commit is a small > improvement to the link congestion mechanism. Applied, thanks.

Re: [tipc-discussion] [PATCH -next] tipc: use kfree_skb() instead of kfree()

2016-08-23 Thread David Miller
From: "Xue, Ying" Date: Wed, 24 Aug 2016 02:47:32 + > Acked-by: Ying Xue Please do not ACK patches like this. If you quote the patch with no demarcation in the initial column for the quoted text, like so: > From: Wei Yongjun [mailto:weiyj...@gmail.com] > Sent: Wednesday, August 24, 2016

Re: [tipc-discussion] [PATCH -next] tipc: use kfree_skb() instead of kfree()

2016-08-23 Thread David Miller
From: Wei Yongjun Date: Tue, 23 Aug 2016 23:01:02 + > From: Wei Yongjun > > Use kfree_skb() instead of kfree() to free sk_buff. > > Fixes: 0d051bf93c06 ("tipc: make bearer packet filtering generic") > Signed-off-by: Wei Yongjun Applied, thanks. --

Re: [tipc-discussion] [PATCH net-next 0/7] tipc: introduce UDP replicast

2016-08-26 Thread David Miller
From: Richard Alpe Date: Fri, 26 Aug 2016 10:52:49 +0200 > This series introduces UDP replicast. A concept where we emulate multicast by > sending multiple unicast messages to configured peers. This allows TIPC to be > used in environments where IP multicast is disabled. > > There is a correspon

Re: [tipc-discussion] [PATCH net v1] tipc: fix random link resets while adding a second bearer

2016-09-01 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Thu, 1 Sep 2016 16:22:16 +0200 > In a dual bearer configuration, if the second tipc link becomes > active while the first link still has pending nametable "bulk" > updates, it randomly leads to reset of the second link. > > When a link is established, the fun

Re: [tipc-discussion] [PATCH net-next 0/3] tipc: improve broadcast NACK mechanism

2016-09-02 Thread David Miller
From: Jon Maloy Date: Thu, 1 Sep 2016 13:52:48 -0400 > The broadcast protocol has turned out to not scale well beyond 70-80 > nodes, while it is now possible to build TIPC clusters of at least ten > times that size. This commit series improves the NACK/retransmission > mechanism of the broadcast

Re: [tipc-discussion] [PATCH -next] tipc: fix possible memory leak in tipc_udp_enable()

2016-09-13 Thread David Miller
From: Wei Yongjun Date: Sat, 10 Sep 2016 00:56:55 + > From: Wei Yongjun > > 'ub' is malloced in tipc_udp_enable() and should be freed before > leaving from the error handling cases, otherwise it will cause > memory leak. > > Fixes: ba5aa84a2d22 ("tipc: split UDP nl address parsing") > Sign

Re: [tipc-discussion] [patch] tipc: info leak in __tipc_nl_add_udp_addr()

2016-10-13 Thread David Miller
From: Dan Carpenter Date: Thu, 13 Oct 2016 11:06:06 +0300 > We should clear out the padding and unused struct members so that we > don't expose stack information to userspace. > > Fixes: fdb3accc2c15 ('tipc: add the ability to get UDP options via netlink') > Signed-off-by: Dan Carpenter Applie

Re: [tipc-discussion] [PATCH net-next v1 04/16] tipc: rename struct tipc_skb_cb member handle to bytes_read

2016-10-29 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Thu, 27 Oct 2016 16:22:25 +0200 > @@ -95,7 +95,7 @@ struct plist; > #define TIPC_MEDIA_INFO_OFFSET 5 > > struct tipc_skb_cb { > - void *handle; > + u32 bytes_read; > struct sk_buff *tail; > bool validated; > bool wakeup_pend

Re: [tipc-discussion] [PATCH net 1/1] tipc: fix broadcast link synchronization problem

2016-10-29 Thread David Miller
From: Jon Maloy Date: Thu, 27 Oct 2016 18:51:55 -0400 > In commit 2d18ac4ba745 ("tipc: extend broadcast link initialization > criteria") we tried to fix a problem with the initial synchronization > of broadcast link acknowledge values. Unfortunately that solution is > not sufficient to solve the

Re: [tipc-discussion] [PATCH net-next v2 00/16] tipc: socket layer improvements

2016-11-01 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Tue, 1 Nov 2016 14:02:33 +0100 > The following issues with the current socket layer hinders socket > diagnostics implementation, which led to this patch series. Series applied, thank you. --

Re: [tipc-discussion] [PATCH net 1/1] tipc: eliminate obsolete socket locking policy description

2016-11-19 Thread David Miller
From: Jon Maloy Date: Sat, 19 Nov 2016 14:47:07 -0500 > The comment block in socket.c describing the locking policy is > obsolete, and does not reflect current reality. We remove it in this > commit. > > Since the current locking policy is much simpler and follows a > mainstream approach, we see

Re: [tipc-discussion] [PATCH net 1/1] tipc: fix compatibility bug in link monitoring

2016-11-25 Thread David Miller
From: Jon Maloy Date: Wed, 23 Nov 2016 21:05:26 -0500 > commit 817298102b0b ("tipc: fix link priority propagation") introduced a > compatibility problem between TIPC versions newer than Linux 4.6 and > those older than Linux 4.4. In versions later than 4.4, link STATE > messages only contain a no

Re: [tipc-discussion] [PATCH net 1/1] tipc: improve sanity check for received domain records

2016-11-25 Thread David Miller
From: Jon Maloy Date: Wed, 23 Nov 2016 23:46:09 -0500 > In commit 35c55c9877f8 ("tipc: add neighbor monitoring framework") we > added a data area to the link monitor STATE messages under the > assumption that previous versions did not use any such data area. > > For versions older than Linux 4.3

Re: [tipc-discussion] [PATCH net 1/1] tipc: resolve connection flow control compatibility problem

2016-11-25 Thread David Miller
From: Jon Maloy Date: Thu, 24 Nov 2016 18:47:07 -0500 > In commit 10724cc7bb78 ("tipc: redesign connection-level flow control") > we replaced the previous message based flow control with one based on > 1k blocks. In order to ensure backwards compatibility the mechanism > falls back to using messa

Re: [tipc-discussion] [PATCH net 1/1] tipc: fix link statistics counter errors

2016-11-27 Thread David Miller
From: Jon Maloy Date: Fri, 25 Nov 2016 10:35:02 -0500 > In commit e4bf4f76962b ("tipc: simplify packet sequence number > handling") we changed the internal representation of the packet > sequence number counters from u32 to u16, reflecting what is really > sent over the wire. > > Since then some

Re: [tipc-discussion] [PATCH net v3] tipc: check minimum bearer MTU

2016-12-02 Thread David Miller
From: Michal Kubecek Date: Fri, 2 Dec 2016 09:33:41 +0100 (CET) > Qian Zhang (张谦) reported a potential socket buffer overflow in > tipc_msg_build() which is also known as CVE-2016-8632: due to > insufficient checks, a buffer overflow can occur if MTU is too short for > even tipc headers. As anyo

Re: [tipc-discussion] [PATCH 3.10 01/17] tipc: fix oops when creating server socket fails

2016-12-06 Thread David Miller
Jon, just directly submit this to -stable if that's what you want. If you email this kind of stuff to me privately nothing is going to happen to it. -- Developer Access Program for Intel Xeon Phi Processors Access to Int

Re: [tipc-discussion] [PATCH net 1/1] tipc: don't send FIN message from connectionless socket

2016-12-22 Thread David Miller
From: Jon Maloy Date: Thu, 22 Dec 2016 07:22:29 -0500 > In commit 6f00089c7372 ("tipc: remove SS_DISCONNECTING state") the > check for socket type is in the wrong place, causing a closing socket > to always send out a FIN message even when the socket was never > connected. This is normally harmle

Re: [tipc-discussion] [net-next 0/3] tipc: improve interaction socket-link

2017-01-03 Thread David Miller
From: Jon Maloy Date: Tue, 3 Jan 2017 10:55:08 -0500 > We fix a very real starvation problem that may occur when a link > encounters send buffer congestion. At the same time we make the > interaction between the socket and link layer simpler and more > consistent. Series applied, thanks Jon.

Re: [tipc-discussion] [PATCH net v1 1/1] tipc: allocate user memory with GFP_KERNEL flag

2017-01-16 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Fri, 13 Jan 2017 15:46:25 +0100 > Until now, we allocate memory always with GFP_ATOMIC flag. > When the system is under memory pressure and a user tries to send, > the send fails due to low memory. However, the user application > can wait for free memory if we

Re: [tipc-discussion] [net-next 0/3] tipc: improve interaction socket-link

2017-01-16 Thread David Miller
From: Jon Maloy Date: Tue, 3 Jan 2017 10:26:45 -0500 > We fix a very real starvation problem that may occur when a link > encounters send buffer congestion. At the same time we make the > interaction between the socket and link layer simpler and more > consistent. This doesn't apply to net-ne

Re: [tipc-discussion] [net-next 0/3] tipc: improve interaction socket-link

2017-01-16 Thread David Miller
From: Jon Maloy Date: Mon, 16 Jan 2017 20:35:08 + > > >> -Original Message- >> From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] >> On Behalf Of David Miller >> Sent: Monday, 16 January, 2017 14:45 >> To: Jon Mal

Re: [tipc-discussion] [net-next 0/4] tipc: emulate multicast through replication

2017-01-20 Thread David Miller
From: Jon Maloy Date: Wed, 18 Jan 2017 13:50:49 -0500 > TIPC multicast messages are currently distributed via L2 broadcast > or IP multicast to all nodes in the cluster, irrespective of the > number of real destinations of the message. > > In this series we introduce an option to transport messa

Re: [tipc-discussion] [PATCH net v1 0/6] topology server fixes for nametable soft lockup

2017-01-24 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Tue, 24 Jan 2017 13:00:42 +0100 > In this series, we revert the commit 333f796235a527 ("tipc: fix a > race condition leading to subscriber refcnt bug") and provide an > alternate solution to fix the race conditions in commits 2-4. > > We have to do this as th

Re: [tipc-discussion] [patch net-next] tipc: uninitialized return code in tipc_setsockopt()

2017-01-25 Thread David Miller
From: Dan Carpenter Date: Tue, 24 Jan 2017 12:49:35 +0300 > We shuffled some code around and added some new case statements here and > now "res" isn't initialized on all paths. > > Fixes: 01fd12bb189a ("tipc: make replicast a user selectable option") > Signed-off-by: Dan Carpenter Applied, tha

Re: [tipc-discussion] [PATCH net 1/1] tipc: move premature initilalization of stack variables

2017-02-24 Thread David Miller
From: Jon Maloy Date: Thu, 23 Feb 2017 11:10:31 -0500 > In the function tipc_rcv() we initialize a couple of stack variables > from the message header before that same header has been validated. > In rare cases when the arriving header is non-linar, the validation > function itself may linearize

Re: [tipc-discussion] [PATCH net v1 1/1] tipc: fix nametbl deadlock at tipc_nametbl_unsubscribe

2017-03-22 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Tue, 21 Mar 2017 10:47:49 +0100 > From: Ying Xue > > Until now, tipc_nametbl_unsubscribe() is called at subscriptions > reference count cleanup. Usually the subscriptions cleanup is > called at subscription timeout or at subscription cancel or at > subscribe

Re: [tipc-discussion] [PATCH net-next v1 0/2] tipc: subscription refcount simplifications

2017-03-28 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Tue, 28 Mar 2017 12:28:26 +0200 > The first patch makes the subscription refcount cleanup lockless and > the second updates the subscription refcount policy. Series applied, thanks.

Re: [tipc-discussion] [PATCH net-next v1 0/2] tipc: add socketpair support

2017-03-29 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Wed, 29 Mar 2017 11:22:15 +0200 > We add socketpair support for connection oriented sockets in > the first patch and for connection less in the second. Series applied, thanks. -- Che

Re: [tipc-discussion] [PATCH stable 4.4] tipc: fix crash during node removal

2017-04-21 Thread David Miller
Please submit this directly to sta...@vger.kernel.org, I only submit changes back to the two most recent -stable trees which right now is 4.10.x and 4.9.x Thank you. -- Check out the vibrant tech community on one of the

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

2017-04-24 Thread David Miller
From: Pan Bian Date: Sun, 23 Apr 2017 15:09:19 +0800 > 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 nlms

Re: [tipc-discussion] [PATCH net v1 1/2] tipc: fix socket flow control accounting error at tipc_send_stream

2017-04-25 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Mon, 24 Apr 2017 15:00:42 +0200 > Until now in tipc_send_stream(), we return -1 when the socket > encounters link congestion even if the socket had successfully > sent partial data. This is incorrect as the application resends > the same the partial data leadi

Re: [tipc-discussion] [PATCH net v1 0/3] tipc: fix hanging socket connections

2017-04-28 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Wed, 26 Apr 2017 10:04:59 +0200 > This patch series contains fixes for the socket layer to > prevent hanging / stale connections. Series applied, thank you. -- Check out the vibrant

Re: [tipc-discussion] [net-next 0/2] tipc: refactor socket receive functions

2017-05-02 Thread David Miller
From: Jon Maloy Date: Tue, 2 May 2017 18:16:52 +0200 > We try to make the functions tipc_sk_recvmsg() and > tipc_sk_recvstream() more readable. Series applied, thanks. -- Check out the vibrant tech community on one of t

Re: [tipc-discussion] [PATCH net 1/1] tipc: make macro tipc_wait_for_cond() smp safe

2017-05-11 Thread David Miller
From: Jon Maloy Date: Thu, 11 May 2017 20:28:15 +0200 > The macro tipc_wait_for_cond() is embedding the macro sk_wait_event() > to fulfil its task. The latter, in turn, is evaluating the stated > condition outside the socket lock context. This is problematic if > the condition is accessing non-tr

Re: [tipc-discussion] [PATCH] net: tipc: Fix a sleep-in-atomic bug in tipc_msg_reverse

2017-06-10 Thread David Miller
From: Jia-Ju Bai Date: Sat, 10 Jun 2017 17:03:35 +0800 > The kernel may sleep under a rcu read lock in tipc_msg_reverse, and the > function call path is: > tipc_l2_rcv_msg (acquire the lock by rcu_read_lock) > tipc_rcv > tipc_sk_rcv > tipc_msg_reverse > pskb_expand_head(GFP_KE

Re: [tipc-discussion] [net 1/1] tipc: remove premature ESTABLISH FSM event at link synchronization

2017-08-09 Thread David Miller
From: Jon Maloy Date: Tue, 8 Aug 2017 22:23:56 +0200 > When a link between two nodes come up, both endpoints will initially > send out a STATE message to the peer, to increase the probability that > the peer endpoint also is up when the first traffic message arrives. > Thereafter, if the establis

Re: [tipc-discussion] [net 1/1] tipc: accept PACKET_MULTICAST packets

2017-08-14 Thread David Miller
From: Jon Maloy Date: Mon, 14 Aug 2017 17:55:56 +0200 > On L2 bearers, the TIPC broadcast function is sending out packets using > the corresponding L2 broadcast address. At reception, we filter such > packets under the assumption that they will also be delivered as > broadcast packets. > > This

Re: [tipc-discussion] [net 1/1] tipc: avoid inheriting msg_non_seq flag when message is returned

2017-08-14 Thread David Miller
From: Jon Maloy Date: Mon, 14 Aug 2017 18:28:49 +0200 > In the function msg_reverse(), we reverse the header while trying to > reuse the original buffer whenever possible. Those rejected/returned > messages are always transmitted as unicast, but the msg_non_seq field > is not explicitly set to ze

Re: [tipc-discussion] [net-next 1/1] tipc: don't reset stale broadcast send link

2017-08-21 Thread David Miller
From: Jon Maloy Date: Mon, 21 Aug 2017 17:59:30 +0200 > When the broadcast send link after 100 attempts has failed to > transfer a packet to all peers, we consider it stale, and reset > it. Thereafter it needs to re-synchronize with the peers, something > currently done by just resetting and re-e

Re: [tipc-discussion] [PATCH net v1 0/2] tipc: topology server fixes

2017-08-22 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Tue, 22 Aug 2017 12:28:39 +0200 > The following commits fixes two race conditions causing general > protection faults. Series applied, thank you. -- Check out the vibrant tech commun

  1   2   3   4   >