Hi Guna,
See below.

///jon


lmcjon@gotha:~/tipc/tipc-2.0/net-next/net/tipc$ git show c7cad0d6f70cd4ce86
commit c7cad0d6f70cd4ce8644ffe528a4df1cdc2e77f5
Author: Jon Paul Maloy <[email protected]>
Date:   Thu Nov 19 14:30:40 2015 -0500

     tipc: move linearization of buffers to generic code

     In commit 5cbb28a4bf65c7e4 ("tipc: linearize arriving NAME_DISTR
     and LINK_PROTO buffers") we added linearization of NAME_DISTRIBUTOR,
     LINK_PROTOCOL/RESET and LINK_PROTOCOL/ACTIVATE to the function
     tipc_udp_recv(). The location of the change was selected in order
     to make the commit easily appliable to 'net' and 'stable'.

     We now move this linearization to where it should be done, in the
     functions tipc_named_rcv() and tipc_link_proto_rcv() respectively.

     Reviewed-by: Ying Xue <[email protected]>
     Signed-off-by: Jon Maloy <[email protected]>
     Signed-off-by: David S. Miller <[email protected]>

diff --git a/net/tipc/link.c b/net/tipc/link.c
index 9efbdbd..fa452fb 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1260,6 +1260,8 @@ static int tipc_link_proto_rcv(struct tipc_link 
*l, struct sk_buff *skb,
                 /* fall thru' */

         case ACTIVATE_MSG:
+               skb_linearize(skb);
+               hdr = buf_msg(skb);

                 /* Complete own link name with peer's interface name */
                 if_name =  strrchr(l->name, ':') + 1;
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index c07612b..f51c8bd 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -397,6 +397,7 @@ void tipc_named_rcv(struct net *net, struct 
sk_buff_head *inputq)

         spin_lock_bh(&tn->nametbl_lock);
         for (skb = skb_dequeue(inputq); skb; skb = skb_dequeue(inputq)) {
+               skb_linearize(skb);
                 msg = buf_msg(skb);
                 mtype = msg_type(msg);
                 item = (struct distr_item *)msg_data(msg);
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c
index ad2719a..816914e 100644
--- a/net/tipc/udp_media.c
+++ b/net/tipc/udp_media.c
@@ -48,7 +48,6 @@
  #include <linux/tipc_netlink.h>
  #include "core.h"
  #include "bearer.h"
-#include "msg.h"

  /* IANA assigned UDP port */
  #define UDP_PORT_DEFAULT       6118
@@ -221,10 +220,6 @@ static int tipc_udp_recv(struct sock *sk, struct 
sk_buff *skb)
  {
         struct udp_bearer *ub;
         struct tipc_bearer *b;
-       int usr = msg_user(buf_msg(skb));
-
-       if ((usr == LINK_PROTOCOL) || (usr == NAME_DISTRIBUTOR))
-               skb_linearize(skb);

         ub = rcu_dereference_sk_user_data(sk);
         if (!ub) {
lmcjon@gotha:~/tipc/tipc-2.0/net-next/net/tipc$




On 04/08/2016 10:23 AM, GUNA wrote:
> Jon,
>
> You indicated the patch is available for "Dropping name table..."
> issue in 4.5 kernel. Could you let me know the patch detail associated
> with the fix, so I could manually merge in my 4.4.0 kernel. At this
> time, I could not able to use 4.5 kernel.
>
> If there is any other relevant fixes for "Name table mismatch..."
> please let me know as well.
>
> - Guna
>
> ------------------------------------------------------------------------------
> _______________________________________________
> tipc-discussion mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tipc-discussion


------------------------------------------------------------------------------
_______________________________________________
tipc-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to