Commit graph android_kernel_sony_sdm845/net/tipc
Message SHA1
[PATCH] spin/rwlock init cleanups
locking init cleanups:

 - convert " = SPIN_LOCK_UNLOCKED" to spin_lock_init() or DEFINE_SPINLOCK()
 - convert rwlocks in a similar manner

this patch was generated automatically.

Motivation:

 - cleanliness
 - lockdep needs control of lock initialization, which the open-coded
   variants do not give
 - it's also useful for -rt and for lock debugging in general

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Ingo Molnar   authored and   Linus Torvalds   commited 2006-06-27 17:32:39 -07:00
34af946a22
[TIPC]: Fix incorrect correction to discovery timer frequency computation.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:53:47 -07:00
3ba07e65b2
[TIPC]: Get rid of dynamically allocated arrays in broadcast code.
This change improves an earlier change which replaced the large local
variable arrays used during broadcasting with dynamically allocated arrays.
The temporary arrays are now incoprorated into the multicast link data
structure.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:53:20 -07:00
65f51ef097
[TIPC]: Fixed link switchover bugs
Incorporates several related fixes:
- switchover now occurs when switching from an active link to a standby link
- failure of a standby link no longer initiates switchover
- links now display correct # of received packtes following reactivation

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:52:50 -07:00
5392d64688
[TIPC]: Enhanced & cleaned up system messages; fixed 2 obscure memory leaks.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:52:17 -07:00
a10bd924a4
[TIPC]: First phase of assert() cleanup
This also contains enhancements to simplify comparisons in name table
publication removal algorithm and to simplify name table sanity checking
when shutting down TIPC.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:51:37 -07:00
f131072c3d
[TIPC]: Disallow config operations that aren't supported in certain modes.
This change provides user-friendly feedback when TIPC is unable to perform
certain configuration operations that don't work properly in certain modes.
(In particular, any reconfiguration request that would temporarily take TIPC
from network mode to standalone mode, or from standalone mode to not running
mode, is disallowed.)

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:51:08 -07:00
e100ae92a6
[TIPC]: Fixed memory leak in tipc_link_send() when destination is unreachable
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:50:30 -07:00
c33d53b235
[TIPC]: Added missing warning for out-of-memory condition
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:50:01 -07:00
a75bf87427
[TIPC]: Withdrawing all names from nameless port now returns success, not error
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:49:33 -07:00
a7513528cd
[TIPC]: Optimized argument validation done by connect().
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:49:06 -07:00
51f9cc1ff8
[TIPC]: Simplify code for returning partial success of stream send request.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:48:22 -07:00
a3b0a5a9d0
[TIPC]: recvmsg() now returns TIPC ancillary data using correct level (SOL_TIPC)
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:47:44 -07:00
4b087b28a6
[TIPC]: Improved performance of error checking during socket creation.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:47:18 -07:00
499786516f
[TIPC]: Stream socket send indicates partial success if data partially sent.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:46:50 -07:00
1303e8f173
[TIPC]: Connected send now checks socket state when retrying congested send.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:45:53 -07:00
bdd94789d2
[TIPC]: Can now return destination name of form {0,x,y} via ancillary data.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:45:24 -07:00
3546c7508d
[TIPC]: Implied connect now saves dest name for retrieval as ancillary data.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:44:57 -07:00
3388007bc4
[TIPC]: Fixed connect() to detect a dest address that is missing or too short.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:44:27 -07:00
6b384de853
[TIPC]: Non-operation-affecting corrections to comments & function definitions.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:43:57 -07:00
e9024f0f79
[TIPC]: Validate entire interface name when locating bearer to enable.
This fix prevents a bearer from being enabled using the wrong interface.
For example, specifying "eth:eth14" might enable "eth:eth1" by mistake.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:43:21 -07:00
687a25f1cd
[TIPC]: Added support for MODULE_VERSION capability.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:42:47 -07:00
a592ea6362
[TIPC]: Fix misleading comment in buf_discard() routine.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:42:19 -07:00
8b1f0a92e9
[TIPC]: Fixed privilege checking typo in dest_name_check().
This patch originated by Stephane Ouellette <ouellettes@videotron.ca>.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:41:47 -07:00
70cb234770
[TIPC] Fix for NULL pointer dereference
This fixes a bug spotted by the coverity checker, bug id #366. If
(mod(seqno - prev) != 1) we set buf to NULL, dereference it in the for
case, and set it to whatever value happes to be at adress 0+next, if it
happens to be non-zero, we even stay in the loop. It seems that the author
intended to break there.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Eric Sesterhenn   authored and   David S. Miller   commited 2006-06-25 23:41:15 -07:00
3ac90216ab
[TIPC]: Allow compilation when CONFIG_TIPC_DEBUG is not set.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:40:35 -07:00
a4e0927902
[TIPC]: Multicast link failure now resets all links to "nacking" node.
This fix prevents node from crashing.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:40:01 -07:00
d356eeba8e
[TIPC]: Links now validate destination node specified by incoming messages.
This fix prevents link flopping and name table inconsistency problems arising
when a node is assigned a different <Z.C.N> value than it used previously.
(Changing the <Z.C.N> value causes other nodes to have two link endpoints
sending to the same MAC address using two different destination <Z.C.N> values,
requiring the receiving node to filter out the unwanted messages.)

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:39:31 -07:00
260082471e
[TIPC]: Allow ports to receive multicast messages through native API.
This fix prevents a kernel panic if an application mistakenly sends a
multicast message to  TIPC's topology service or configuration service.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:38:58 -07:00
9688243b63
[TIPC]: Corrected potential misuse of tipc_media_addr structure.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:38:29 -07:00
4938450789
[TIPC]: Use correct upper bound when validating network zone number.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:38:00 -07:00
2535ec50b7
[TIPC]: Prevent name table corruption if no room for new publication
Now exits cleanly if attempt to allocate larger array of subsequences fails,
without losing track of pointer to existing array.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Allan Stephens   authored and   David S. Miller   commited 2006-06-25 23:37:24 -07:00
9ab230f82f
[TIPC] Improved tolerance to promiscuous mode interface
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Jon Maloy   authored and   David S. Miller   commited 2006-06-25 23:36:43 -07:00
5e3c8854c1
[NET]: Remove redundant NULL checks before [kv]free
Redundant NULL check before kfree removal
from net/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Jesper Juhl   authored and   David S. Miller   commited 2006-04-18 15:57:55 -07:00
63903ca6af
[PATCH] s/;;/;/g
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Alexey Dobriyan   authored and   Linus Torvalds   commited 2006-03-24 07:33:24 -08:00
53b3531bbb
[TIPC]: Avoid compiler warning
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Per Liden   authored and   David S. Miller   commited 2006-03-20 22:38:33 -08:00
87546b1c25
[TIPC]: Reduce stack usage
The node_map struct can be quite large (516 bytes) and allocating two of
them on the stack is not a good idea since we might only have a 4K stack
to start with.

Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Per Liden   authored and   David S. Miller   commited 2006-03-20 22:38:14 -08:00
de70c5ba43
[TIPC]: Cleanups
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global functions:
  - name_table.c: tipc_nametbl_print()
  - name_table.c: tipc_nametbl_dump()
  - net.c: tipc_net_next_node()

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Adrian Bunk   authored and   David S. Miller   commited 2006-03-20 22:37:52 -08:00
988f088a8e
[TIPC]: Remove unused functions
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Per Liden   authored and   David S. Miller   commited 2006-03-20 22:37:27 -08:00
7c501a5960
[TIPC]: Remove inlines from *.c
With reference to latest discussions on linux-kernel with respect to
inline here is a patch for tipc to remove all inlines as used in
the .c files. See also chapter 14 in Documentation/CodingStyle.

Before:
   text        data     bss     dec     hex filename
 102990        5292    1752  110034   1add2 tipc.o

Now:
   text        data     bss     dec     hex filename
 101190        5292    1752  108234   1a6ca tipc.o

This is a nice text size reduction which will improve icache usage.
In some cases bigger (> 4 lines) functions where declared inline
and used in many places, they are most probarly no longer inlined by gcc
resulting in the size reduction.
There are several one liners that no longer are declared inline, but gcc
should inline these just fine without the inline hint.

With this patch applied one warning is added about an unused static
function - that was hidded by utilising inline before.
The function in question were kept so this patch is solely a
inline removal patch.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Sam Ravnborg   authored and   David S. Miller   commited 2006-03-20 22:37:04 -08:00
05790c6456
[TIPC]: Fix simple sparse warnings
Tried to run the new tipc stack through sparse.
Following patch fixes all cases where 0 was used
as replacement of NULL.
Use NULL to document this is a pointer and to silence sparse.

This brough sparse warning count down with 127 to 24 warnings.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Sam Ravnborg   authored and   David S. Miller   commited 2006-03-20 22:36:47 -08:00
1fc54d8f49
[TIPC] Avoid polluting the global namespace
This patch adds a tipc_ prefix to all externally visible symbols.

Signed-off-by: Per Liden <per.liden@ericsson.com>

Per Liden   commited 2006-01-18 00:45:16 +01:00
4323add677
[TIPC] Add help text for TIPC configuration option
Signed-off-by: Per Liden <per.liden@ericsson.com>

Per Liden   commited 2006-01-18 00:45:15 +01:00
c11ac3f236
[TIPC] Remove unused #includes
Signed-off-by: Per Liden <per.liden@ericsson.com>

Per Liden   commited 2006-01-18 00:45:15 +01:00
50f9bcddf8
[TIPC] Move ethernet protocol id to linux/if_ether.h
Signed-off-by: Per Liden <per.liden@ericsson.com>

Per Liden   commited 2006-01-18 00:45:15 +01:00
33a9c4da5a
[TIPC] Updated link priority macros
Added macros for min/default/max link priority in tipc_config.h.
Also renamed TIPC_NUM_LINK_PRI to TIPC_MEDIA_LINK_PRI since that
is a more accurate description of what it is used for.

Signed-off-by: Per Liden <per.liden@ericsson.com>

Per Liden   commited 2006-01-18 00:45:15 +01:00
16cb4b333c
[TIPC] Minor changes to #includes
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>

Jon Maloy   authored and   Per Liden   commited 2006-01-18 00:45:14 +01:00
5f7c3ff6a2
[PATCH] genetlink: don't touch module ref count
Increasing the module ref count at registration will block the module from
ever being unloaded. In fact, genetlink should not care about the owner at
all. This patch removes the owner field from the struct registered with
genetlink.

Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>

Per Liden   authored and   David S. Miller   commited 2006-01-13 13:06:40 -08:00
23b0ca5bf5
[TIPC]: Fix 64-bit build warnings.
When storing u32 values in a pointer, need to do
some long casts to keep GCC happy.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2006-01-12 14:06:41 -08:00
880b005f29
[TIPC] More updates of file headers
Updated copyright notice to include the year the file was
actually created. Information about file creation dates
was extracted from the files in the old CVS repository
at tipc.sourceforge.net.

Signed-off-by: Per Liden <per.liden@nospam.ericsson.com>

Per Liden   authored and   David S. Miller   commited 2006-01-12 14:06:39 -08:00
593a5f22d8