02 May, 2013
1 commit
-
Pull VFS updates from Al Viro,
Misc cleanups all over the place, mainly wrt /proc interfaces (switch
create_proc_entry to proc_create(), get rid of the deprecated
create_proc_read_entry() in favor of using proc_create_data() and
seq_file etc).7kloc removed.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
don't bother with deferred freeing of fdtables
proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
proc: Make the PROC_I() and PDE() macros internal to procfs
proc: Supply a function to remove a proc entry by PDE
take cgroup_open() and cpuset_open() to fs/proc/base.c
ppc: Clean up scanlog
ppc: Clean up rtas_flash driver somewhat
hostap: proc: Use remove_proc_subtree()
drm: proc: Use remove_proc_subtree()
drm: proc: Use minor->index to label things, not PDE->name
drm: Constify drm_proc_list[]
zoran: Don't print proc_dir_entry data in debug
reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
proc: Supply an accessor for getting the data from a PDE's parent
airo: Use remove_proc_subtree()
rtl8192u: Don't need to save device proc dir PDE
rtl8187se: Use a dir under /proc/net/r8180/
proc: Add proc_mkdir_data()
proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
proc: Move PDE_NET() to fs/proc/proc_net.c
...
10 Apr, 2013
2 commits
-
Signed-off-by: Al Viro
-
The only part of proc_dir_entry the code outside of fs/proc
really cares about is PDE(inode)->data. Provide a helper
for that; static inline for now, eventually will be moved
to fs/proc, along with the knowledge of struct proc_dir_entry
layout.Signed-off-by: Al Viro
08 Mar, 2013
1 commit
-
After we successfully registered a socket via bt_sock_register() there is
no reason to ever check the return code of bt_sock_unregister(). If
bt_sock_unregister() fails, it means the socket _is_ already unregistered
so we have what we want, don't we?Also, to get bt_sock_unregister() to fail, another part of the kernel has
to unregister _our_ socket. This is sooo _wrong_ that it will break way
earlier than when we unregister our socket.Signed-off-by: David Herrmann
Signed-off-by: Gustavo Padovan
24 Oct, 2012
1 commit
-
include is the right to go here.
Signed-off-by: Syam Sidhardhan
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo Padovan
20 Oct, 2012
1 commit
29 Sep, 2012
1 commit
-
Conflicts:
drivers/net/team/team.c
drivers/net/usb/qmi_wwan.c
net/batman-adv/bat_iv_ogm.c
net/ipv4/fib_frontend.c
net/ipv4/route.c
net/l2tp/l2tp_netlink.cThe team, fib_frontend, route, and l2tp_netlink conflicts were simply
overlapping changes.qmi_wwan and bat_iv_ogm were of the "use HEAD" variety.
With help from Antonio Quartulli.
Signed-off-by: David S. Miller
28 Sep, 2012
1 commit
-
Instead of old unsafe batostr function use %pMR print specifier
for printing Bluetooth addresses in sprintf and seq_printf
statements.Signed-off-by: Andrei Emeltchenko
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo Padovan
22 Sep, 2012
1 commit
-
Change return value from -EACCES to -EPERM when the permission check fails.
Signed-off-by: Zhao Hongjiang
Signed-off-by: David S. Miller
07 Aug, 2012
1 commit
-
Added /proc/net/cmtp via bt_procfs_init().
Signed-off-by: Masatake YAMATO
Signed-off-by: Gustavo Padovan
29 Mar, 2012
1 commit
-
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it. Performed with the following command:perl -p -i -e 's!^#\s*include\s*.*\n!!' `grep -Irl '^#\s*include\s*' *`
Signed-off-by: David Howells
27 Feb, 2012
1 commit
-
u8/__u8/u32/etc should be used in the kernel instead of stdint.h types.
Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
21 Dec, 2011
1 commit
-
The handling of SCO audio links and the L2CAP protocol are essential to
any system with Bluetooth thus are always compiled in from now on.Signed-off-by: Ulisses Furquim
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
03 Dec, 2011
1 commit
22 Nov, 2011
1 commit
-
We cannot call module_put(THIS_MODULE) if this is our last reference. Otherwise,
this call may cleanup our module before it returns.Gladly, the kthread API provides a simple wrapper for us. So lets use
module_put_and_exit() to avoid a race condition with the module cleanup code.Signed-off-by: David Herrmann
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
08 Nov, 2011
1 commit
-
When all items in the list have the same type there is no much of a point
to use list_for_each except if you want to use the list pointer itself.Signed-off-by: Luiz Augusto von Dentz
Signed-off-by: Gustavo F. Padovan
28 Sep, 2011
1 commit
-
Fragmented skbs are only encountered when receiving ERTM or streaming
mode L2CAP data. BNEP, CMTP, HIDP, and RFCOMM generally use basic
mode, but they need to handle fragments without crashing.Signed-off-by: Mat Martineau
Signed-off-by: Gustavo F. Padovan
12 Aug, 2011
3 commits
-
Once the session thread is running, cleanup must be handled
by the session thread only.Signed-off-by: Peter Hurley
Signed-off-by: Gustavo F. Padovan -
Commit fada4ac339 introduced the usage of kthread API.
kthread_stop is a blocking function which returns only when
the thread exits. In this case, the thread can't exit because it's
waiting for the write lock, which is being held by cmtp_del_connection()
which is waiting for the thread to exit -- deadlock.Revert cmtp_reset_ctr to its original behavior: non-blocking signalling
for the session to terminate.Signed-off-by: Peter Hurley
Signed-off-by: Gustavo F. Padovan -
Fix race condition which can result in missing the wakeup intended
to stop the session thread.Signed-off-by: Peter Hurley
Signed-off-by: Gustavo F. Padovan
10 Jun, 2011
1 commit
-
Signed-off-by: David S. Miller
Signed-off-by: Gustavo F. Padovan
28 Apr, 2011
1 commit
-
In this commit, omtu, imtu, flush_to, mode and sport. It also remove the
pi var from l2cap_sock_sendmsg().Signed-off-by: Gustavo F. Padovan
05 Apr, 2011
1 commit
-
kernel_thread() is a low-level implementation detail and
EXPORT_SYMBOL(kernel_thread) is scheduled for removal.
Use the API instead.Signed-off-by: Szymon Janc
Signed-off-by: Gustavo F. Padovan
01 Apr, 2011
3 commits
-
Do not use C99 // comments.
Signed-off-by: Szymon Janc
Signed-off-by: Gustavo F. Padovan -
As warned by checkpatch.pl, use #include instead of
Signed-off-by: Szymon Janc
Signed-off-by: Gustavo F. Padovan -
Fix checkpatch warnings concerning assignments in if conditions.
Signed-off-by: Szymon Janc
Signed-off-by: Gustavo F. Padovan
15 Feb, 2011
1 commit
-
l2cap_load() was added to trigger l2cap.ko module loading from the RFCOMM
and BNEP modules. Now that L2CAP module is gone, we don't need it anymore.Signed-off-by: Gustavo F. Padovan
08 Feb, 2011
1 commit
-
Fix checkpatch warnings concerning assignments in if conditions.
Signed-off-by: Andrei Emeltchenko
Signed-off-by: Gustavo F. Padovan
02 Dec, 2010
1 commit
-
Structure cmtp_conninfo is copied to userland with some padding fields
unitialized. It leads to leaking of contents of kernel stack memory.Signed-off-by: Vasiliy Kulikov
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
12 Oct, 2010
2 commits
-
The Bluetooth core uses the the BD_ADDR in the opposite order from the
human readable order. So we are changing batostr() to print in the
correct order and then removing some baswap(), as they are not needed
anymore.Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
A value was attributed to 'src', but no one was using.
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
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>
14 Jan, 2010
1 commit
-
Convert code away from ->read_proc/->write_proc interfaces. Switch to
proc_create()/proc_create_data() which make addition of proc entries
reliable wrt NULL ->proc_fops, NULL ->data and so on.Problem with ->read_proc et al is described here commit
786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in
/proc entries"[akpm@linux-foundation.org: CONFIG_PROC_FS=n build fix]
Signed-off-by: Alexey Dobriyan
Signed-off-by: Tilman Schmidt
Signed-off-by: Karsten Keil
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
07 Oct, 2009
1 commit
-
All usages of structure net_proto_ops should be declared const.
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
08 Jun, 2009
1 commit
-
Change the name of the Kernel CAPI exported function capi_ctr_reseted()
to something representing its purpose better.Impact: renaming, no functional change
Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller
27 Feb, 2009
1 commit
-
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun
Signed-off-by: Marcel Holtmann
30 Nov, 2008
1 commit
-
With the introduction of CONFIG_DYNAMIC_PRINTK_DEBUG it is possible to
allow debugging without having to recompile the kernel. This patch turns
all BT_DBG() calls into pr_debug() to support dynamic debug messages.As a side effect all CONFIG_BT_*_DEBUG statements are now removed and
some broken debug entries have been fixed.Signed-off-by: Marcel Holtmann
29 Jan, 2008
1 commit
-
The function sockfd_lookup uses fget on the value that is stored in
the file field of the returned structure, so fput should ultimately be
applied to this value. This can be done directly, but it seems better
to use the specific macro sockfd_put, which does the same thing.The problem was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)//
@@
expression s;
@@s = sockfd_lookup(...)
...
+ sockfd_put(s);
?- fput(s->file);
//Signed-off-by: Julia Lawall
Signed-off-by: David S. Miller