File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -511,13 +511,13 @@ void mptcp_pm_fully_established(struct mptcp_sock *msk, const struct sock *ssk)
511511 * be sure to serve this event only once.
512512 */
513513 if (READ_ONCE (pm -> work_pending ) &&
514- !(msk -> pm . status & BIT (MPTCP_PM_ALREADY_ESTABLISHED )))
514+ !(pm -> status & BIT (MPTCP_PM_ALREADY_ESTABLISHED )))
515515 mptcp_pm_schedule_work (msk , MPTCP_PM_ESTABLISHED );
516516
517- if ((msk -> pm . status & BIT (MPTCP_PM_ALREADY_ESTABLISHED )) == 0 )
517+ if ((pm -> status & BIT (MPTCP_PM_ALREADY_ESTABLISHED )) == 0 )
518518 announce = true;
519519
520- msk -> pm . status |= BIT (MPTCP_PM_ALREADY_ESTABLISHED );
520+ pm -> status |= BIT (MPTCP_PM_ALREADY_ESTABLISHED );
521521 spin_unlock_bh (& pm -> lock );
522522
523523 if (announce )
@@ -1009,7 +1009,7 @@ void mptcp_pm_data_reset(struct mptcp_sock *msk)
10091009 WRITE_ONCE (pm -> addr_signal , 0 );
10101010 WRITE_ONCE (pm -> remote_deny_join_id0 , false);
10111011 pm -> status = 0 ;
1012- bitmap_fill (msk -> pm . id_avail_bitmap , MPTCP_PM_MAX_ADDR_ID + 1 );
1012+ bitmap_fill (pm -> id_avail_bitmap , MPTCP_PM_MAX_ADDR_ID + 1 );
10131013}
10141014
10151015void mptcp_pm_data_init (struct mptcp_sock * msk )
Original file line number Diff line number Diff line change @@ -710,11 +710,10 @@ int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk,
710710 return ret ;
711711
712712 /* address not found, add to local list */
713- entry = kmalloc ( sizeof (* entry ), GFP_ATOMIC );
713+ entry = kmemdup ( skc , sizeof (* skc ), GFP_ATOMIC );
714714 if (!entry )
715715 return - ENOMEM ;
716716
717- * entry = * skc ;
718717 entry -> addr .port = 0 ;
719718 ret = mptcp_pm_nl_append_new_local_addr (pernet , entry , true, false);
720719 if (ret < 0 )
@@ -817,13 +816,12 @@ int mptcp_pm_nl_add_addr_doit(struct sk_buff *skb, struct genl_info *info)
817816 return - EINVAL ;
818817 }
819818
820- entry = kzalloc ( sizeof (* entry ), GFP_KERNEL_ACCOUNT );
819+ entry = kmemdup ( & addr , sizeof (addr ), GFP_KERNEL_ACCOUNT );
821820 if (!entry ) {
822821 GENL_SET_ERR_MSG (info , "can't allocate addr" );
823822 return - ENOMEM ;
824823 }
825824
826- * entry = addr ;
827825 if (entry -> addr .port ) {
828826 ret = mptcp_pm_nl_create_listen_socket (skb -> sk , entry );
829827 if (ret ) {
You can’t perform that action at this time.
0 commit comments