28 Dec, 2011
1 commit
-
Permits a Linux container to use TIPC sockets even when it has its own
network namespace defined by removing the check that prohibits such use.
This makes it possible for users who wish to isolate their container
network traffic from normal network traffic to utilize TIPC.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
01 Nov, 2011
1 commit
-
These files are non modular, but need to export symbols using
the macros now living in export.h -- call out the include so
that things won't break when we remove the implicit presence
of module.h from everywhere.Signed-off-by: Paul Gortmaker
18 Sep, 2011
2 commits
-
Modifies the proto_ops structure used by TIPC DGRAM and RDM sockets
so that calls to listen() and accept() are handled by existing kernel
"unsupported operation" routines, and eliminates the related checks
in the listen and accept routines used by SEQPACKET and STREAM sockets
that are no longer needed.Signed-off-by: Ying Xue
Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Adds support for the SO_SNDTIMEO socket option. (This complements the
existing support for SO_RCVTIMEO that is already present.)Signed-off-by: Ying Xue
Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
01 Sep, 2011
1 commit
-
Saves a socket's TIPC_CONN_TIMEOUT socket option value in its original
form (milliseconds), rather than jiffies. This ensures that the exact
value set using setsockopt() is always returned by getsockopt(), without
being subject to rounding issues introduced by a ms->jiffies->ms
conversion sequence.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
25 Jun, 2011
1 commit
-
Eliminates a pair of #include statements for files that are brought in
automatically by including core.h.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
11 May, 2011
2 commits
-
Rework TIPC's message sending routines to take advantage of the total
amount of data value passed to it by the kernel socket infrastructure.
This change eliminates the need for TIPC to compute the size of outgoing
messages itself, as well as the check for an oversize message in
tipc_msg_build(). In addition, this change warrants an explanation:- res = send_packet(NULL, sock, &my_msg, 0);
+ res = send_packet(NULL, sock, &my_msg, bytes_to_send);Previously, the final argument to send_packet() was ignored (since the
amount of data being sent was recalculated by a lower-level routine)
and we could just pass in a dummy value (0). Now that the
recalculation is being eliminated, the argument value being passed to
send_packet() is significant and we have to supply the actual amount
of data we want to send.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Adds checks to TIPC's socket send routines to promptly detect and
abort attempts to send more than 66,000 bytes in a single TIPC
message or more than 2**31-1 bytes in a single TIPC byte stream request.
In addition, this ensures that the number of iovecs in a send request
does not exceed the limits of a standard integer variable.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
14 Mar, 2011
2 commits
-
Adds support for the SO_RCVTIMEO socket option to TIPC's socket
receive routines.Thanks go out to Raj Hegde for his contribution
to the development and testing this enhancement.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Enhances TIPC's socket receive routines to support iovec structures
containing more than a single entry. This change leverages existing
sk_buff routines to do most of the work; the only significant change
to TIPC itself is that an sk_buff now records how much data has been
already consumed as an numeric offset, rather than as a pointer to
the first unread data byte.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
24 Feb, 2011
2 commits
-
Reject TIPC configuration service messages without a full message
header. Previously, an application that sent a message to the
configuration service that was too short could cause the validation
code to access an uninitialized field in the msghdr structure,
resulting in a memory access exception.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Eliminates a global variable that was previously used by TIPC's user
registry to track the number of distinct applications using TIPC. Due to
the recent elimination of the user registry this variable no longer serves
any purpose and can be removed.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
02 Jan, 2011
7 commits
-
Cleans up TIPC's source code to eliminate the presence of unnecessary
use of {} around single statements.These changes are purely cosmetic and do not alter the operation of TIPC
in any way.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller -
Cleans up TIPC's source code to eliminate the needless initialization
of static variables to zero.These changes are purely cosmetic and do not alter the operation of TIPC
in any way.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller -
Cleans up TIPC's source code to eliminate assigning values to variables
within conditional expressions, improving code readability and reducing
warnings from various code checker tools.These changes are purely cosmetic and do not alter the operation of TIPC
in any way.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller -
Cleans up TIPC's source code to eliminate deviations from generally
accepted coding conventions relating to leading/trailing white space
and white space around commas, braces, cases, and sizeof.These changes are purely cosmetic and do not alter the operation of TIPC
in any way.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller -
The existing code for the copy to user and error handling at the
end of getsockopt isn't easy to follow, due to the excessive use
of if/else. By simply using return where appropriate, it can be
made smaller and easier to follow at the same time.Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller -
Eliminates a number of #include statements that no longer serve any
useful purpose.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller -
Eliminates obsolete calls to two of TIPC's main debugging macros, as well
as a pair of associated debugging routines that are no longer required.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller
03 Dec, 2010
3 commits
-
Moves the content of the native API routine tipc_ownidentity() into the
sole routine that calls it, since it can no longer be called in isolation.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller -
Eliminates an unused argument from tipc_multicast(), now that this
routine can no longer be called by kernel-based applications.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller -
As part of the removal of TIPC's native API support it is no longer
necessary for TIPC to export symbols for routines that can be called
by kernel-based applications, nor for it to have header files that
kernel-based applications can include to access the declarations for
those routines. This commit eliminates the exporting of symbols by
TIPC and migrates the contents of each obsolete native API include
file into its corresponding non-native API equivalent.The code which was migrated in this commit was migrated intact, in
that there are no technical changes combined with the relocation.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller
10 Nov, 2010
1 commit
-
Structure sockaddr_tipc is copied to userland with padding bytes after
"id" field in union field "name" unitialized. It leads to leaking of
contents of kernel stack memory. We have to initialize them to zero.Signed-off-by: Vasiliy Kulikov
Signed-off-by: David S. Miller
24 Sep, 2010
1 commit
-
Change "return (EXPR);" to "return EXPR;"
return is not a function, parentheses are not required.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
18 Aug, 2010
4 commits
-
Cause a socket whose TIPC_CONN_TIMEOUT option is zero to wait
indefinitely for a response to a connection request using connect().
Previously, specifying a timeout of 0 ms resulted in an immediate
timeout, which was inconsistent with the behavior specified by Posix
for a socket's receive and send timeout.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller -
Prevent TIPC from incorrectly setting returned flags to poll()
in the following cases:- an unconnected socket no longer indicates that it is always readable
- an unconnected, connecting, or listening socket no longer indicates
that it is always writableSigned-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller -
Modify TIPC to return EOPNOTSUPP if an application attempts to perform
a non-blocking connect() operation, which is not supported by TIPC.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller -
Add support for the SO_RCVLOWAT socket option to TIPC's stream socket
type.Signed-off-by: Florian Westphal
Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller
21 Apr, 2010
1 commit
-
Define a new function to return the waitqueue of a "struct sock".
static inline wait_queue_head_t *sk_sleep(struct sock *sk)
{
return sk->sk_sleep;
}Change all read occurrences of sk_sleep by a call to this function.
Needed for a future RCU conversion. sk_sleep wont be a field directly
available.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
30 Mar, 2010
1 commit
-
…it slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
06 Mar, 2010
2 commits
-
sk_add_backlog -> __sk_add_backlog
sk_add_backlog_limited -> sk_add_backlogSigned-off-by: Zhu Yi
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller -
Make tipc adapt to the limited socket backlog change.
Cc: Jon Maloy
Cc: Allan Stephens
Signed-off-by: Zhu Yi
Acked-by: Eric Dumazet
Acked-by: Allan Stephens
Signed-off-by: David S. Miller
30 Nov, 2009
1 commit
-
Not including net/atm/
Compiled tested x86 allyesconfig only
Added a > 80 column line or two, which I ignored.
Existing checkpatch plaints willfully, cheerfully ignored.Signed-off-by: Joe Perches
Signed-off-by: David S. Miller
26 Nov, 2009
1 commit
-
Generated with the following semantic patch
@@
struct net *n1;
struct net *n2;
@@
- n1 == n2
+ net_eq(n1, n2)@@
struct net *n1;
struct net *n2;
@@
- n1 != n2
+ !net_eq(n1, n2)applied over {include,net,drivers/net}.
Signed-off-by: Octavian Purdila
Signed-off-by: David S. Miller
06 Nov, 2009
1 commit
-
The generic __sock_create function has a kern argument which allows the
security system to make decisions based on if a socket is being created by
the kernel or by userspace. This patch passes that flag to the
net_proto_family specific create function, so it can do the same thing.Signed-off-by: Eric Paris
Acked-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller
01 Oct, 2009
1 commit
-
This provides safety against negative optlen at the type
level instead of depending upon (sometimes non-trivial)
checks against this sprinkled all over the the place, in
each and every implementation.Based upon work done by Arjan van de Ven and feedback
from Linus Torvalds.Signed-off-by: David S. Miller
06 Jul, 2009
1 commit
-
This patch allows a TIPC application to determine the number of messages
currently waiting in a socket's receive queue (TIPC_SOCK_RECVQ_DEPTH) or
in all TIPC socket receive queues (TIPC_NODE_RECVQ_DEPTH).Signed-off-by: Oscar Medina
Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller
15 Jul, 2008
3 commits
-
This patch ensurs that accept() returns successfully even when
the newly created socket is immediately disconnected by its peer.
Previously, accept() would fail if it was unable to pass back
the optional address info for the socket's peer before the
socket became disconnected; TIPC now allows accept() to gather
peer address information after disconnection. As a bonus, the
revised code accesses the socket's port more efficiently, without
the overhead incurred by a reference table lookup.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch eliminates an unnecessary pointer dereference when
accessing a stream-based socket's receive queue.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch eliminates an unneeded parameter when creating a low-level
TIPC port object. Instead of returning both the pointer to the port
structure and the port's reference ID, it now returns only the pointer
since the port structure contains the reference ID as one of its fields.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller