24 Jul, 2009
1 commit
-
Conflicts:
drivers/net/wireless/iwmc3200wifi/netdev.c
net/wireless/scan.c
22 Jul, 2009
1 commit
-
Signed-off-by: Evgeniy Polyakov
Signed-off-by: David S. Miller
18 Jul, 2009
1 commit
-
The connector documentation states that the argument to the callback
function is always a pointer to a struct cn_msg, but rather than encode it
in the API itself, it uses a void pointer everywhere. This doesn't make
much sense to encode the pointer in documentation as it prevents proper C
type checking from occurring and can easily allow people to use the wrong
pointer type. So convert the argument type to an explicit struct cn_msg
pointer.Signed-off-by: Mike Frysinger
Signed-off-by: David S. Miller
13 Jun, 2009
1 commit
-
.ko is normally not included in Kconfig help, make it consistent.
Signed-off-by: Pavel Machek
Signed-off-by: Jiri Kosina
03 Feb, 2009
1 commit
-
The netlink connector uses its own workqueue to relay the datas sent
from userspace to the appropriate callback. If you launch the test
from Documentation/connector and change it a bit to send a high flow
of data, you will see thousands of events coming to the "cqueue"
workqueue by looking at the workqueue tracer.This flow of events can be sent very quickly. So, to not encumber the
kevent workqueue and delay other jobs, the "cqueue" workqueue should
remain.But this workqueue is pointless most of the time, it will always be
created (assuming you have built it of course) although only
developpers with specific needs will use it.So avoid this "most of the time useless task", this patch proposes to
create this workqueue only when needed once. The first jobs to be
sent to connector callbacks will be sent to kevent while the "cqueue"
thread creation will be scheduled to kevent too.The following jobs will continue to be scheduled to keventd until the
cqueue workqueue is created, and then the rest of the jobs will
continue to perform as usual, through this dedicated workqueue.Each time I tested this patch, only the first event was sent to
keventd, the rest has been sent to cqueue which have been created
quickly.Also, this patch fixes some trailing whitespaces on the connector files.
Signed-off-by: Frederic Weisbecker
Acked-by: Evgeniy Polyakov
Signed-off-by: David S. Miller
14 Nov, 2008
2 commits
-
Use RCU to access another task's creds and to release a task's own creds.
This means that it will be possible for the credentials of a task to be
replaced without another task (a) requiring a full lock to read them, and (b)
seeing deallocated memory.Signed-off-by: David Howells
Acked-by: James Morris
Acked-by: Serge Hallyn
Signed-off-by: James Morris -
Separate the task security context from task_struct. At this point, the
security data is temporarily embedded in the task_struct with two pointers
pointing to it.Note that the Alpha arch is altered as it refers to (E)UID and (E)GID in
entry.S via asm-offsets.With comment fixes Signed-off-by: Marc Dionne
Signed-off-by: David Howells
Acked-by: James Morris
Acked-by: Serge Hallyn
Signed-off-by: James Morris
28 Jun, 2008
1 commit
-
I got a problem when I wanted to check if the kernel supports process
event connector, and It seems there's no way to do this check.At best I can check if the kernel supports connector or not, by looking
into /proc/net/netlink, or maybe checking the return value of bind() to
see if it's ENOENT.So it would be useful to add /proc/net/connector to list all supported
connectors:
# cat /proc/net/connector
Name ID
connector 4294967295:4294967295
cn_proc 1:1
w1 3:1Changelog:
- fix memory leak: s/seq_release/single_release
- use spin_lock_bh instead of spin_lock_irqsaveSigned-off-by: Li Zefan
Acked-by: Evgeniy Polyakov
Signed-off-by: David S. Miller
24 Mar, 2008
1 commit
-
From: Evgeniy Polyakov
We don't need one cqueue thread for each CPU. cqueue is used for
receiving userspace datagrams, which are very rare and thus will
happily live with a single queue.Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller
27 Feb, 2008
1 commit
-
It is used in connector.c only, so make it static.
Signed-off-by: Li Zefan
Signed-off-by: David S. Miller
29 Jan, 2008
5 commits
-
Create a specific helper for netlink kernel socket disposal. This just
let the code look better and provides a ground for proper disposal
inside a namespace.Signed-off-by: Denis V. Lunev
Tested-by: Alexey Dobriyan
Signed-off-by: David S. Miller -
- 'cb' is a fake struct member. In a previous patch struct cn_callback
was renamed to cn_callback_id, so 'cb' should have been deleted at that
time.- 'nls' isn't used and is redundant, we can retrieve this data through
cn_callback_entry.pdev->nls.- 'seq' and 'group' should be u32, as they are declared to be u32 in
other places.Signed-off-by: Li Zefan
Signed-off-by: David S. Miller -
Struct member netlink_groups is never used, and I don't see how it can
be useful.Signed-off-by: Li Zefan
Signed-off-by: David S. Miller -
- __cn_rx_skb() does nothing but calls cn_call_callback(), it doesn't
check skb and msg sizes as the comment suggests, but cn_rx_skb() checks
those sizes.- In cn_rx_skb() Local variable 'len' is not used. 'len' is probably
intended to be passed to skb_pull(), but here skb_pull() is not needed,
instead skb_free() is called.Signed-off-by: Li Zefan
Signed-off-by: David S. Miller -
Each entry in the list has a unique id, so just break out of the
loop if the matched id is found.Signed-off-by: Li Zefan
Signed-off-by: David S. Miller
09 Jan, 2008
1 commit
-
cn_queue_free_callback() will touch 'dev'(i.e. cbq->pdev), so it
should be called before atomic_dec(&dev->refcnt).Signed-off-by: Li Zefan
Signed-off-by: David S. Miller
04 Jan, 2008
1 commit
-
Error code should be set to EINVAL instead of ENODEV if !queue_work().
There's another call of queue_work() which may set err to EINVAL.Signed-off-by: Li Zefan
Signed-off-by: David S. Miller
31 Oct, 2007
1 commit
-
Remove a spurious call to kfree_skb() in the connector rx_skb handler.
This fixes a regression introduced by the '[NET]: make netlink user ->
kernel interface synchronious' patch (cd40b7d3983c708aabe3d3008ec64ffce56d33b0)Signed-off-by: Michal Januszewski
Signed-off-by: David S. Miller
11 Oct, 2007
2 commits
-
This patch make processing netlink user -> kernel messages synchronious.
This change was inspired by the talk with Alexey Kuznetsov about current
netlink messages processing. He says that he was badly wrong when introduced
asynchronious user -> kernel communication.The call netlink_unicast is the only path to send message to the kernel
netlink socket. But, unfortunately, it is also used to send data to the
user.Before this change the user message has been attached to the socket queue
and sk->sk_data_ready was called. The process has been blocked until all
pending messages were processed. The bad thing is that this processing
may occur in the arbitrary process context.This patch changes nlk->data_ready callback to get 1 skb and force packet
processing right in the netlink_unicast.Kernel -> user path in netlink_unicast remains untouched.
EINTR processing for in netlink_run_queue was changed. It forces rtnl_lock
drop, but the process remains in the cycle until the message will be fully
processed. So, there is no need to use this kludges now.Signed-off-by: Denis V. Lunev
Acked-by: Alexey Kuznetsov
Signed-off-by: David S. Miller -
Each netlink socket will live in exactly one network namespace,
this includes the controlling kernel sockets.This patch updates all of the existing netlink protocols
to only support the initial network namespace. Request
by clients in other namespaces will get -ECONREFUSED.
As they would if the kernel did not have the support for
that netlink protocol compiled in.As each netlink protocol is updated to be multiple network
namespace safe it can register multiple kernel sockets
to acquire a presence in the rest of the network namespaces.The implementation in af_netlink is a simple filter implementation
at hash table insertion and hash table look up time.Signed-off-by: Eric W. Biederman
Signed-off-by: David S. Miller
17 Jul, 2007
1 commit
-
Use menuconfigs instead of menus, so the whole menu can be disabled at once
instead of going through all options.Signed-off-by: Jan Engelhardt
Acked-by: Evgeniy Polyakov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Apr, 2007
2 commits
-
Switch cb_lock to mutex and allow netlink kernel users to override it
with a subsystem specific mutex for consistent locking in dump callbacks.
All netlink_dump_start users have been audited not to rely on any
side-effects of the previously used spinlock.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
For the common "(struct nlmsghdr *)skb->data" sequence, so that we reduce the
number of direct accesses to skb->data and for consistency with all the other
cast skb member helpers.Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller
08 Mar, 2007
1 commit
-
When system under heavy stress and must allocate new work
instead of reusing old one, new work must use correct
completion callback.Patch is based on Philipp's and Lars' work.
I only cleaned small stuff (and removed spaces instead of tabs).Signed-off-by: Philipp Reisner
Signed-off-by: Lars Ellenberg
Signed-off-by: Evgeniy Polyakov
Signed-off-by: David S. Miller
06 Jan, 2007
1 commit
-
On ia64, the various functions that make up cn_proc.c cause kernel
unaligned access errors.If you are using these, for example, to get notification about all tasks
forking and exiting, you get multiple unaligned access errors per process.Use put_unaligned() in the appropriate palces to fix this.
Signed-off-by: Erik Jacobson
Cc: Evgeniy Polyakov
Cc: "Luck, Tony"
Cc:
Cc: "David S. Miller"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Dec, 2006
2 commits
-
Signed-off-by: Evgeniy Polyakov
Signed-off-by: David S. Miller -
Linus has changed work queue structure and has not tested it with
connector compiled in, his changes break the build.Attached patch fixes compilation error.
Patch is against commit 99f5e9718185f07458ae70c2282c2153a2256c91.
Thanks to Toralf Förster for pointing this out.
Signed-off-by: Evgeniy Polyakov
Signed-off-by: David S. Miller
22 Nov, 2006
1 commit
-
Fix up for make allyesconfig.
Signed-Off-By: David Howells
01 Aug, 2006
1 commit
-
Events sent by Process Events Connector from a 64-bit kernel are not binary
compatible with a 32-bit userspace program because the "timestamp" field
(struct timespec) is not arch independent. This affects the fields that
follow "timestamp" as they will be be off by 8 bytes.This is a problem for 32-bit userspace programs running with 64-bit kernels
on ppc64, s390, x86-64.. any "biarch" system.Matt had submitted a different solution to lkml as an RFC earlier. We have
since switched to a solution recommended by Evgeniy Polyakov.This patch fixes the problem by changing the timestamp to be a __u64, which
stores the number of nanoseconds.Tested on a x86_64 system with both 32 bit application and 64 bit
application and on a i386 system.Signed-off-by: Chandra Seetharaman
Signed-off-by: Matt Helsley
Cc: Evgeniy Polyakov
Cc: Guillaume Thouvenin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Jun, 2006
2 commits
-
Put the connector exports at the functions so people can see them in context.
Cc: Evgeniy Polyakov
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Move connector header include to precisely where it's needed.
Remove unused time.h header file as well. This was leftover from previous
iterations of the process events patches.Signed-off-by: Matt Helsley
Cc: Guillaume Thouvenin
Cc: Nguyen Anh Quynh
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Jun, 2006
1 commit
-
Attached patch declares connector init function as subsys_init()
and returns -EAGAIN in case connector is not initialized yet.Signed-off-by: Evgeniy Polyakov
Signed-off-by: David S. Miller
18 Jun, 2006
1 commit
-
cn_queue.c:130: warning: value computed is not used
There is no point in testing the atomic value if the result is thrown
away.From Evgeniy:
It was created to put implicit smp barrier, but it is not needed there.
Signed-off-by: Andreas Schwab
Signed-off-by: Evgeniy Polyakov
Signed-off-by: David S. Miller
23 Mar, 2006
1 commit
-
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.Signed-off-by: Arjan van de Ven
Signed-off-by: Ingo Molnar
Cc: Stephen Rothwell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
21 Mar, 2006
1 commit
-
Return -ESRCH from cn_netlink_send() when there are not listeners,
just as it could be done by netlink_broadcast(). Propagate
netlink_broadcast() error back to the caller.Signed-off-by: Evgeniy Polyakov
Signed-off-by: David S. Miller
11 Jan, 2006
1 commit
-
Use ktime_get_ts() to take the timestamp instead of getnstimestamp(). This
patch prepares to remove getnstimestamp() by switching its only user to a
different function with almost exactly the same code.Signed-off-by: Matt Helsley
Cc: john stultz
Cc: Thomas Gleixner
Cc: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Jan, 2006
1 commit
-
The parameter to put_cpu_var() is unreferenced by the implementation, and
the compiler doesn't try to comprehend comments, so this wouldn't cause any
problem, but if bugged me enough to post a fix :-)Signed-off-by: David S. Miller
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Dec, 2005
1 commit
-
This adds a timestamp field to the events sent via the process event
connector. The timestamp allows listeners to accurately account the
duration(s) between a process' events and offers strong means with which
to determine the order of events with respect to a given task while also
avoiding the addition of per-task data.This alters the size and layout of the event structure and hence would
break compatibility if process events connector as it stands in 2.6.15-rc2
were released as a mainline kernel.Signed-off-by: Matt Helsley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Nov, 2005
1 commit
-
This patch adds a connector that reports fork, exec, id change, and exit
events for all processes to userspace. It replaces the fork_advisor patch
that ELSA is currently using. Applications that may find these events
useful include accounting/auditing (e.g. ELSA), system activity monitoring
(e.g. top), security, and resource management (e.g. CKRM).Signed-off-by: Matt Helsley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Oct, 2005
1 commit
-
- added typedef unsigned int __nocast gfp_t;
- replaced __nocast uses for gfp flags with gfp_t - it gives exactly
the same warnings as far as sparse is concerned, doesn't change
generated code (from gcc point of view we replaced unsigned int with
typedef) and documents what's going on far better.Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds