All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v4 0/7] tipc: Fix missing RTNL lock protection during setting link properties
@ 2018-02-14  5:37 Ying Xue
  2018-02-14  5:37 ` [PATCH net v4 1/7] tipc: Refactor __tipc_nl_compat_doit Ying Xue
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Ying Xue @ 2018-02-14  5:37 UTC (permalink / raw)
  To: davem, ktkhai, jon.maloy; +Cc: netdev, syzkaller-bugs, tipc-discussion

At present it's unsafe to configure link properties through netlink
as the entire setting process is not under RTNL lock protection. Now
TIPC supports two different sets of netlink APIs at the same time, and
they share the same set of backend functions to configure bearer,
media and net properties. In order to solve the missing RTNL issue,
we have to make the whole __tipc_nl_compat_doit() protected by RTNL,
which means any function called within it cannot take RTNL any more.
So in the series we first introduce the following new functions which
doesn't hold RTNl lock:

 - __tipc_nl_bearer_disable()
 - __tipc_nl_bearer_enable()
 - __tipc_nl_bearer_set()
 - __tipc_nl_media_set()
 - __tipc_nl_net_set()

Meanwhile, __tipc_nl_compat_doit() has been reconstructed to minimize
the time of holding RTNL lock.

Changes in v4:
 - Per suggestion of Kirill Tkhai, divided original big one patch into
   seven small ones so that they can be easily reviewed.

Changes in v3: 
 - Optimized return method of __tipc_nl_bearer_enable() regarding
   the comments from David M and Kirill Tkhai
 - Moved the allocations of memory in __tipc_nl_compat_doit() out
   of RTNL lock to minimize the time of holding RTNL lock according
   to the suggestion of Kirill Tkhai.

Changes in v2:
 - The whole operation of setting bearer/media properties has been
   protected under RTNL, as per feedback from David M.

Ying Xue (7):
  tipc: Refactor __tipc_nl_compat_doit
  tipc: Introduce __tipc_nl_bearer_disable
  tipc: Introduce __tipc_nl_bearer_enable
  tipc: Introduce __tipc_nl_bearer_set
  tipc: Introduce __tipc_nl_media_set
  tipc: Introduce __tipc_nl_net_set
  tipc: Fix missing RTNL lock protection during setting link properties

 net/tipc/bearer.c         | 82 +++++++++++++++++++++++++++++------------------
 net/tipc/bearer.h         |  4 +++
 net/tipc/net.c            | 15 +++++++--
 net/tipc/net.h            |  1 +
 net/tipc/netlink_compat.c | 43 +++++++++++++------------
 5 files changed, 91 insertions(+), 54 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-02-14 19:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-14  5:37 [PATCH net v4 0/7] tipc: Fix missing RTNL lock protection during setting link properties Ying Xue
2018-02-14  5:37 ` [PATCH net v4 1/7] tipc: Refactor __tipc_nl_compat_doit Ying Xue
2018-02-14  5:37 ` [PATCH net v4 2/7] tipc: Introduce __tipc_nl_bearer_disable Ying Xue
2018-02-14  5:38 ` [PATCH net v4 3/7] tipc: Introduce __tipc_nl_bearer_enable Ying Xue
2018-02-14  5:38 ` [PATCH net v4 4/7] tipc: Introduce __tipc_nl_bearer_set Ying Xue
2018-02-14  5:38 ` [PATCH net v4 5/7] tipc: Introduce __tipc_nl_media_set Ying Xue
2018-02-14  5:38 ` [PATCH net v4 6/7] tipc: Introduce __tipc_nl_net_set Ying Xue
2018-02-14  5:38 ` [PATCH net v4 7/7] tipc: Fix missing RTNL lock protection during setting link properties Ying Xue
2018-02-14 10:16   ` Kirill Tkhai
2018-02-14 19:46 ` [PATCH net v4 0/7] " David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.