<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/net/tipc/name_table.c, branch v4.14</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-03-29T01:03:33Z</updated>
<entry>
<title>tipc: adjust the policy of holding subscription kref</title>
<updated>2017-03-29T01:03:33Z</updated>
<author>
<name>Ying Xue</name>
<email>ying.xue@windriver.com</email>
</author>
<published>2017-03-28T10:28:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7efea60dcffc151870d1abbfccdb1f11cd4b7f21'/>
<id>urn:sha1:7efea60dcffc151870d1abbfccdb1f11cd4b7f21</id>
<content type='text'>
When a new subscription object is inserted into name_seq-&gt;subscriptions
list, it's under name_seq-&gt;lock protection; when a subscription is
deleted from the list, it's also under the same lock protection;
similarly, when accessing a subscription by going through subscriptions
list, the entire process is also protected by the name_seq-&gt;lock.

Therefore, if subscription refcount is increased before it's inserted
into subscriptions list, and its refcount is decreased after it's
deleted from the list, it will be unnecessary to hold refcount at all
before accessing subscription object which is obtained by going through
subscriptions list under name_seq-&gt;lock protection.

Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: add functionality to lookup multicast destination nodes</title>
<updated>2017-01-20T17:10:16Z</updated>
<author>
<name>Jon Paul Maloy</name>
<email>jon.maloy@ericsson.com</email>
</author>
<published>2017-01-18T18:50:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2ae0b8af1fe35ddaa2e46704ae31a2f9cac0349d'/>
<id>urn:sha1:2ae0b8af1fe35ddaa2e46704ae31a2f9cac0349d</id>
<content type='text'>
As a further preparation for the upcoming 'replicast' functionality,
we add some necessary structs and functions for looking up and returning
a list of all nodes that host destinations for a given multicast message.

Reviewed-by: Parthasarathy Bhuvaragan &lt;parthasarathy.bhuvaragan@ericsson.com&gt;
Acked-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: modify struct tipc_plist to be more versatile</title>
<updated>2017-01-03T16:13:05Z</updated>
<author>
<name>Jon Paul Maloy</name>
<email>jon.maloy@ericsson.com</email>
</author>
<published>2017-01-03T15:55:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4d8642d896c53966d32d5e343c3620813dd0e7c8'/>
<id>urn:sha1:4d8642d896c53966d32d5e343c3620813dd0e7c8</id>
<content type='text'>
During multicast reception we currently use a simple linked list with
push/pop semantics to store port numbers.

We now see a need for a more generic list for storing values of type
u32. We therefore make some modifications to this list, while replacing
the prefix 'tipc_plist_' with 'u32_'. We also add a couple of new
functions which will come to use in the next commits.

Acked-by: Parthasarathy Bhuvaragan &lt;parthasarathy.bhuvaragan@ericsson.com&gt;
Acked-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: move netlink policies to netlink.c</title>
<updated>2016-03-07T19:56:41Z</updated>
<author>
<name>Richard Alpe</name>
<email>richard.alpe@ericsson.com</email>
</author>
<published>2016-03-04T16:04:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=49cc66eaee19e772997b63b057ea4b4bf7d48db0'/>
<id>urn:sha1:49cc66eaee19e772997b63b057ea4b4bf7d48db0</id>
<content type='text'>
Make the c files less cluttered and enable netlink attributes to be
shared between files.

Signed-off-by: Richard Alpe &lt;richard.alpe@ericsson.com&gt;
Reviewed-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Acked-by: Parthasarathy Bhuvaragan &lt;parthasarathy.bhuvaragan@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: remove struct tipc_name_seq from struct tipc_subscription</title>
<updated>2016-02-06T08:40:43Z</updated>
<author>
<name>Parthasarathy Bhuvaragan</name>
<email>parthasarathy.bhuvaragan@ericsson.com</email>
</author>
<published>2016-02-02T09:52:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a4273c73ebf06515eab6b5a84817a175ad8acdc4'/>
<id>urn:sha1:a4273c73ebf06515eab6b5a84817a175ad8acdc4</id>
<content type='text'>
Until now, struct tipc_subscriber has duplicate fields for
type, upper and lower (as member of struct tipc_name_seq) at:
1. as member seq in struct tipc_subscription
2. as member seq in struct tipc_subscr, which is contained
   in struct tipc_event
The former structure contains the type, upper and lower
values in network byte order and the later contains the
intact copy of the request.
The struct tipc_subscription contains a field swap to
determine if request needs network byte order conversion.
Thus by using swap, we can convert the request when
required instead of duplicating it.

In this commit,
1. we remove the references to these elements as members of
   struct tipc_subscription and replace them with elements
   from struct tipc_subscr.
2. provide new functions to convert the user request into
   network byte order.

Acked-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: Parthasarathy Bhuvaragan &lt;parthasarathy.bhuvaragan@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: reduce code dependency between binding table and node layer</title>
<updated>2015-11-20T19:06:10Z</updated>
<author>
<name>Jon Paul Maloy</name>
<email>jon.maloy@ericsson.com</email>
</author>
<published>2015-11-19T19:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1d7e1c2595bd20c5274a8e49d89cf0cf483759de'/>
<id>urn:sha1:1d7e1c2595bd20c5274a8e49d89cf0cf483759de</id>
<content type='text'>
The file name_distr.c currently contains three functions,
named_cluster_distribute(), tipc_publ_subcscribe() and
tipc_publ_unsubscribe() that all directly access fields in
struct tipc_node. We want to eliminate such dependencies, so
we move those functions to the file node.c and rename them to
tipc_node_broadcast(), tipc_node_subscribe() and tipc_node_unsubscribe()
respectively.

Reviewed-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: rename functions defined in subscr.c</title>
<updated>2015-05-04T19:04:00Z</updated>
<author>
<name>Ying Xue</name>
<email>ying.xue@windriver.com</email>
</author>
<published>2015-05-04T02:36:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=57f1d1868fb5d71a20bfb1bc807274471c2ff459'/>
<id>urn:sha1:57f1d1868fb5d71a20bfb1bc807274471c2ff459</id>
<content type='text'>
When a topology server accepts a connection request from its client,
it allocates a connection instance and a tipc_subscriber structure
object. The former is used to communicate with client, and the latter
is often treated as a subscriber which manages all subscription events
requested from a same client. When a topology server receives a request
of subscribing name services from a client through the connection, it
creates a tipc_subscription structure instance which is seen as a
subscription recording what name services are subscribed. In order to
manage all subscriptions from a same client, topology server links
them into the subscrp_list of the subscriber. So subscriber and
subscription completely represents different meanings respectively,
but function names associated with them make us so confused that we
are unable to easily tell which function is against subscriber and
which is to subscription. So we want to eliminate the confusion by
renaming them.

Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Jon Maloy &lt;jon.maloy@ericson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: fix a potential deadlock when nametable is purged</title>
<updated>2015-03-18T02:11:26Z</updated>
<author>
<name>Ying Xue</name>
<email>ying.xue@windriver.com</email>
</author>
<published>2015-03-18T01:32:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8460504bdd9aa5996dfc5dd69cd61582a25139ec'/>
<id>urn:sha1:8460504bdd9aa5996dfc5dd69cd61582a25139ec</id>
<content type='text'>
[   28.531768] =============================================
[   28.532322] [ INFO: possible recursive locking detected ]
[   28.532322] 3.19.0+ #194 Not tainted
[   28.532322] ---------------------------------------------
[   28.532322] insmod/583 is trying to acquire lock:
[   28.532322]  (&amp;(&amp;nseq-&gt;lock)-&gt;rlock){+.....}, at: [&lt;ffffffffa000d219&gt;] tipc_nametbl_remove_publ+0x49/0x2e0 [tipc]
[   28.532322]
[   28.532322] but task is already holding lock:
[   28.532322]  (&amp;(&amp;nseq-&gt;lock)-&gt;rlock){+.....}, at: [&lt;ffffffffa000e0dc&gt;] tipc_nametbl_stop+0xfc/0x1f0 [tipc]
[   28.532322]
[   28.532322] other info that might help us debug this:
[   28.532322]  Possible unsafe locking scenario:
[   28.532322]
[   28.532322]        CPU0
[   28.532322]        ----
[   28.532322]   lock(&amp;(&amp;nseq-&gt;lock)-&gt;rlock);
[   28.532322]   lock(&amp;(&amp;nseq-&gt;lock)-&gt;rlock);
[   28.532322]
[   28.532322]  *** DEADLOCK ***
[   28.532322]
[   28.532322]  May be due to missing lock nesting notation
[   28.532322]
[   28.532322] 3 locks held by insmod/583:
[   28.532322]  #0:  (net_mutex){+.+.+.}, at: [&lt;ffffffff8163e30f&gt;] register_pernet_subsys+0x1f/0x50
[   28.532322]  #1:  (&amp;(&amp;tn-&gt;nametbl_lock)-&gt;rlock){+.....}, at: [&lt;ffffffffa000e091&gt;] tipc_nametbl_stop+0xb1/0x1f0 [tipc]
[   28.532322]  #2:  (&amp;(&amp;nseq-&gt;lock)-&gt;rlock){+.....}, at: [&lt;ffffffffa000e0dc&gt;] tipc_nametbl_stop+0xfc/0x1f0 [tipc]
[   28.532322]
[   28.532322] stack backtrace:
[   28.532322] CPU: 1 PID: 583 Comm: insmod Not tainted 3.19.0+ #194
[   28.532322] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
[   28.532322]  ffffffff82394460 ffff8800144cb928 ffffffff81792f3e 0000000000000007
[   28.532322]  ffffffff82394460 ffff8800144cba28 ffffffff810a8080 ffff8800144cb998
[   28.532322]  ffffffff810a4df3 ffff880013e9cb10 ffffffff82b0d330 ffff880013e9cb38
[   28.532322] Call Trace:
[   28.532322]  [&lt;ffffffff81792f3e&gt;] dump_stack+0x4c/0x65
[   28.532322]  [&lt;ffffffff810a8080&gt;] __lock_acquire+0x740/0x1ca0
[   28.532322]  [&lt;ffffffff810a4df3&gt;] ? __bfs+0x23/0x270
[   28.532322]  [&lt;ffffffff810a7506&gt;] ? check_irq_usage+0x96/0xe0
[   28.532322]  [&lt;ffffffff810a8a73&gt;] ? __lock_acquire+0x1133/0x1ca0
[   28.532322]  [&lt;ffffffffa000d219&gt;] ? tipc_nametbl_remove_publ+0x49/0x2e0 [tipc]
[   28.532322]  [&lt;ffffffff810a9c0c&gt;] lock_acquire+0x9c/0x140
[   28.532322]  [&lt;ffffffffa000d219&gt;] ? tipc_nametbl_remove_publ+0x49/0x2e0 [tipc]
[   28.532322]  [&lt;ffffffff8179c41f&gt;] _raw_spin_lock_bh+0x3f/0x50
[   28.532322]  [&lt;ffffffffa000d219&gt;] ? tipc_nametbl_remove_publ+0x49/0x2e0 [tipc]
[   28.532322]  [&lt;ffffffffa000d219&gt;] tipc_nametbl_remove_publ+0x49/0x2e0 [tipc]
[   28.532322]  [&lt;ffffffffa000e11e&gt;] tipc_nametbl_stop+0x13e/0x1f0 [tipc]
[   28.532322]  [&lt;ffffffffa000dfe5&gt;] ? tipc_nametbl_stop+0x5/0x1f0 [tipc]
[   28.532322]  [&lt;ffffffffa0004bab&gt;] tipc_init_net+0x13b/0x150 [tipc]
[   28.532322]  [&lt;ffffffffa0004a75&gt;] ? tipc_init_net+0x5/0x150 [tipc]
[   28.532322]  [&lt;ffffffff8163dece&gt;] ops_init+0x4e/0x150
[   28.532322]  [&lt;ffffffff810aa66d&gt;] ? trace_hardirqs_on+0xd/0x10
[   28.532322]  [&lt;ffffffff8163e1d3&gt;] register_pernet_operations+0xf3/0x190
[   28.532322]  [&lt;ffffffff8163e31e&gt;] register_pernet_subsys+0x2e/0x50
[   28.532322]  [&lt;ffffffffa002406a&gt;] tipc_init+0x6a/0x1000 [tipc]
[   28.532322]  [&lt;ffffffffa0024000&gt;] ? 0xffffffffa0024000
[   28.532322]  [&lt;ffffffff810002d9&gt;] do_one_initcall+0x89/0x1c0
[   28.532322]  [&lt;ffffffff811b7cb0&gt;] ? kmem_cache_alloc_trace+0x50/0x1b0
[   28.532322]  [&lt;ffffffff810e725b&gt;] ? do_init_module+0x2b/0x200
[   28.532322]  [&lt;ffffffff810e7294&gt;] do_init_module+0x64/0x200
[   28.532322]  [&lt;ffffffff810e9353&gt;] load_module+0x12f3/0x18e0
[   28.532322]  [&lt;ffffffff810e5890&gt;] ? show_initstate+0x50/0x50
[   28.532322]  [&lt;ffffffff810e9a19&gt;] SyS_init_module+0xd9/0x110
[   28.532322]  [&lt;ffffffff8179f3b3&gt;] sysenter_dispatch+0x7/0x1f

Before tipc_purge_publications() calls tipc_nametbl_remove_publ() to
remove a publication with a name sequence, the name sequence's lock
is held. However, when tipc_nametbl_remove_publ() calling
tipc_nameseq_remove_publ() to remove the publication, it first tries
to query name sequence instance with the publication, and then holds
the lock of the found name sequence. But as the lock may be already
taken in tipc_purge_publications(), deadlock happens like above
scenario demonstrated. As tipc_nameseq_remove_publ() doesn't grab name
sequence's lock, the deadlock can be avoided if it's directly invoked
by tipc_purge_publications().

Fixes: 97ede29e80ee ("tipc: convert name table read-write lock to RCU")
Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Erik Hugne &lt;erik.hugne@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: nl compat add noop and remove legacy nl framework</title>
<updated>2015-02-09T21:20:49Z</updated>
<author>
<name>Richard Alpe</name>
<email>richard.alpe@ericsson.com</email>
</author>
<published>2015-02-09T08:50:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=22ae7cff509f3bb22caaa0003f67eeb93d338fed'/>
<id>urn:sha1:22ae7cff509f3bb22caaa0003f67eeb93d338fed</id>
<content type='text'>
Add TIPC_CMD_NOOP to compat layer and remove the old framework.

All legacy nl commands are now converted to the compat layer in
netlink_compat.c.

Signed-off-by: Richard Alpe &lt;richard.alpe@ericsson.com&gt;
Reviewed-by: Erik Hugne &lt;erik.hugne@ericsson.com&gt;
Reviewed-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: convert legacy nl name table dump to nl compat</title>
<updated>2015-02-09T21:20:48Z</updated>
<author>
<name>Richard Alpe</name>
<email>richard.alpe@ericsson.com</email>
</author>
<published>2015-02-09T08:50:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=44a8ae94fd5525aa06a8c71cb52efbc418fb8b7c'/>
<id>urn:sha1:44a8ae94fd5525aa06a8c71cb52efbc418fb8b7c</id>
<content type='text'>
Add functionality for printing a dump header and convert
TIPC_CMD_SHOW_NAME_TABLE to compat dumpit.

Signed-off-by: Richard Alpe &lt;richard.alpe@ericsson.com&gt;
Reviewed-by: Erik Hugne &lt;erik.hugne@ericsson.com&gt;
Reviewed-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
