- 23 Apr, 2013 1 commit
-
-
sjur.brandeland@stericsson.com authored
Remove my soon bouncing email address. Also remove the "Contact:" line in file header. The MAINTAINERS file is a better place to find the contact person anyway. Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 07 Apr, 2013 1 commit
-
-
Mathias Krause authored
The current code does not fill the msg_name member in case it is set. It also does not set the msg_namelen member to 0 and therefore makes net/socket.c leak the local, uninitialized sockaddr_storage variable to userland -- 128 bytes of kernel stack memory. Fix that by simply setting msg_namelen to 0 as obviously nobody cared about caif_seqpkt_recvmsg() not filling the msg_name in case it was set. Cc: Sjur Braendeland <sjur.brandeland@stericsson.com> Signed-off-by:
Mathias Krause <minipli@googlemail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 07 Mar, 2013 1 commit
-
-
Silviu-Mihai Popescu authored
This lines up function arguments on second and subsequent lines at the first column after the openning parenthesis of the first line. Signed-off-by:
Silviu-Mihai Popescu <silviupopescu1990@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 04 Mar, 2013 1 commit
-
-
Silviu-Mihai Popescu authored
This fixes the following sparse warning: net/caif/caif_usb.c:84:16: warning: symbol 'cfusbl_create' was not declared. Should it be static? Signed-off-by:
Silviu-Mihai Popescu <silviupopescu1990@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 02 Mar, 2013 1 commit
-
-
Silviu-Mihai Popescu authored
This fixed the following sparse warning: net/caif/caif_dev.c:121:6: warning: symbol 'caif_flow_cb' was not declared. Should it be static? Signed-off-by:
Silviu-Mihai Popescu <silviupopescu1990@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 09 Jan, 2013 1 commit
-
-
Masanari Iida authored
Correct spelling typo in printk within various drivers. Signed-off-by:
Masanari Iida <standby24x7@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- 08 Dec, 2012 2 commits
-
-
Ben Hutchings authored
Use the device model to get just the name, rather than using the ethtool API to get all driver information. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Ben Hutchings authored
In cfusbl_device_notify(), the usbnet and usbdev variables are initialised before the driver name has been checked. In case the device's driver is not cdc_ncm, this may result in reading beyond the end of the netdev private area. Move the initialisation below the driver name check. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 20 Nov, 2012 1 commit
-
-
Sachin Kamat authored
kfree on a null pointer is a no-op. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Acked-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 10 Sep, 2012 1 commit
-
-
Wei Yongjun authored
The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by:
Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 20 Aug, 2012 1 commit
-
-
Jesper Juhl authored
In net/caif/chnl_net.c::chnl_recv_cb() we call skb_header_pointer() which may return NULL, but we do not check for a NULL pointer before dereferencing it. This patch adds such a NULL check and properly free's allocated memory and return an error (-EINVAL) on failure - much better than crashing.. Signed-off-by:
Jesper Juhl <jj@chaosbits.net> Acked-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 31 Jul, 2012 1 commit
-
-
Mel Gorman authored
This patch series is based on top of "Swap-over-NBD without deadlocking v15" as it depends on the same reservation of PF_MEMALLOC reserves logic. When a user or administrator requires swap for their application, they create a swap partition and file, format it with mkswap and activate it with swapon. In diskless systems this is not an option so if swap if required then swapping over the network is considered. The two likely scenarios are when blade servers are used as part of a cluster where the form factor or maintenance costs do not allow the use of disks and thin clients. The Linux Terminal Server Project recommends the use of the Network Block Device (NBD) for swap but this is not always an option. There is no guarantee that the network attached storage (NAS) device is running Linux or supports NBD. However, it is likely that it supports NFS so there are users that want support for swapping over NFS despite any performance concern. Some distributions currently carry patches that support swapping over NFS but it would be preferable to support it in the mainline kernel. Patch 1 avoids a stream-specific deadlock that potentially affects TCP. Patch 2 is a small modification to SELinux to avoid using PFMEMALLOC reserves. Patch 3 adds three helpers for filesystems to handle swap cache pages. For example, page_file_mapping() returns page->mapping for file-backed pages and the address_space of the underlying swap file for swap cache pages. Patch 4 adds two address_space_operations to allow a filesystem to pin all metadata relevant to a swapfile in memory. Upon successful activation, the swapfile is marked SWP_FILE and the address space operation ->direct_IO is used for writing and ->readpage for reading in swap pages. Patch 5 notes that patch 3 is bolting filesystem-specific-swapfile-support onto the side and that the default handlers have different information to what is available to the filesystem. This patch refactors the code so that there are generic handlers for each of the new address_space operations. Patch 6 adds an API to allow a vector of kernel addresses to be translated to struct pages and pinned for IO. Patch 7 adds support for using highmem pages for swap by kmapping the pages before calling the direct_IO handler. Patch 8 updates NFS to use the helpers from patch 3 where necessary. Patch 9 avoids setting PF_private on PG_swapcache pages within NFS. Patch 10 implements the new swapfile-related address_space operations for NFS and teaches the direct IO handler how to manage kernel addresses. Patch 11 prevents page allocator recursions in NFS by using GFP_NOIO where appropriate. Patch 12 fixes a NULL pointer dereference that occurs when using swap-over-NFS. With the patches applied, it is possible to mount a swapfile that is on an NFS filesystem. Swap performance is not great with a swap stress test taking roughly twice as long to complete than if the swap device was backed by NBD. This patch: netvm: prevent a stream-specific deadlock It could happen that all !SOCK_MEMALLOC sockets have buffered so much data that we're over the global rmem limit. This will prevent SOCK_MEMALLOC buffers from receiving data, which will prevent userspace from running, which is needed to reduce the buffered data. Fix this by exempting the SOCK_MEMALLOC sockets from the rmem limit. Once this change it applied, it is important that sockets that set SOCK_MEMALLOC do not clear the flag until the socket is being torn down. If this happens, a warning is generated and the tokens reclaimed to avoid accounting errors until the bug is fixed. [davem@davemloft.net: Warning about clearing SOCK_MEMALLOC] Signed-off-by:
Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by:
Mel Gorman <mgorman@suse.de> Acked-by:
David S. Miller <davem@davemloft.net> Acked-by:
Rik van Riel <riel@redhat.com> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Neil Brown <neilb@suse.de> Cc: Christoph Hellwig <hch@infradead.org> Cc: Mike Christie <michaelc@cs.wisc.edu> Cc: Eric B Munson <emunson@mgebm.net> Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Cc: Mel Gorman <mgorman@suse.de> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 17 Jul, 2012 1 commit
-
-
Sjur Brændeland authored
unregister_netdevice_notifier() must be called before unregister_pernet_subsys() to avoid accessing already freed pernet memory. This fixes the following oops when doing rmmod: Call Trace: [<ffffffffa0f802bd>] caif_device_notify+0x4d/0x5a0 [caif] [<ffffffff81552ba9>] unregister_netdevice_notifier+0xb9/0x100 [<ffffffffa0f86dcc>] caif_device_exit+0x1c/0x250 [caif] [<ffffffff810e7734>] sys_delete_module+0x1a4/0x300 [<ffffffff810da82d>] ? trace_hardirqs_on_caller+0x15d/0x1e0 [<ffffffff813517de>] ? trace_hardirqs_on_thunk+0x3a/0x3 [<ffffffff81696bad>] system_call_fastpath+0x1a/0x1f RIP [<ffffffffa0f7f561>] caif_get+0x51/0xb0 [caif] Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-by:
"Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 25 Jun, 2012 4 commits
-
-
Kim Lilliestierna XX authored
Rearranged the allocation and packet creations to avoid potential leaks in error path. Signed-off-by:
Kim Lilliestierna <kim.xx.lilliestierna@stericsson.com> Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericssion.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Kim Lilliestierna XX authored
Add check on NULL return from caif_get(). Signed-off-by:
Kim Lilliestierna <Kim.xx.Lilliestierna@stericsson.com> Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericssion.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Kim Lilliestierna XX authored
Removed surplus call to caif_device_list() in caif_dev.c Signed-off-by:
Kim Lilliestierna <kim.xx.lilliestierna@stericsson.com> Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sjur Brændeland authored
Clear caif sockets's shutdown mask at (re)connect. Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 17 Jun, 2012 1 commit
-
-
Rémi Denis-Courmont authored
Signed-off-by:
Rémi Denis-Courmont <remi@remlab.net> Cc: Sakari Ailus <sakari.ailus@nokia.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 15 May, 2012 1 commit
-
-
Joe Perches authored
Standardize the net core ratelimited logging functions. Coalesce formats, align arguments. Change a printk then vprintk sequence to use printf extension %pV. Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 07 May, 2012 1 commit
-
-
Paul Bolle authored
There are three Kconfig entries with "--- help ---" attributes, and over 2000 Kconfig entries with "---help---" attributes. Apparently the three attributes with embedded spaces are valid. Still, I see little reason for using this obscure variant. And replacing those three attributes with the common variant makes grepping Kconfig files for help texts a bit easier too. Signed-off-by:
Paul Bolle <pebolle@tiscali.nl> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- 15 Apr, 2012 1 commit
-
-
Eric Dumazet authored
Use of "unsigned int" is preferred to bare "unsigned" in net tree. Signed-off-by:
Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 13 Apr, 2012 2 commits
-
-
Dmitry Tarnyagin authored
Set traffic class for CAIF packets, based on socket priority, CAIF protocol type, or type of message. Traffic class mapping for different packet types: - control: TC_PRIO_CONTROL; - flow control: TC_PRIO_CONTROL; - at: TC_PRIO_CONTROL; - rfm: TC_PRIO_INTERACTIVE_BULK; - other sockets: equals to socket's TC; - network data: no change. Signed-off-by:
Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Tomasz Gregorek authored
Added kfree_skb() calls in the chnk_net.c file on the error paths. Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 02 Apr, 2012 1 commit
-
-
David S. Miller authored
These macros contain a hidden goto, and are thus extremely error prone and make code hard to audit. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 11 Mar, 2012 2 commits
-
-
sjur.brandeland@stericsson.com authored
Connection ID configured through RTNL must allow zero as connection id. If connection-id is not given when creating the interface, configure a loopback interface using ifindex as connection-id. Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Dmitry Tarnyagin authored
Kill faulty checks on flow-off leading to connection drop at race conditions. caif_socket checks for flow-on before transmitting and goes to sleep or return -EAGAIN upon flow stop. Remove faulty subsequent checks on flow-off leading to connection drop. Also fix memory leaks on some of the errors paths. Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 07 Feb, 2012 1 commit
-
-
Dan Carpenter authored
"priv" is initialized twice. I kept the second one, because it is next to the check for NULL. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 05 Feb, 2012 1 commit
-
-
Jesper Juhl authored
Signed-off-by:
Jesper Juhl <jj@chaosbits.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 04 Feb, 2012 2 commits
-
-
sjur.brandeland@stericsson.com authored
Count dropped packets in CAIF Netdevice. Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
sjur.brandeland@stericsson.com authored
Kill off the debug-fs exposed varaibles from caif_socket. Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 02 Feb, 2012 2 commits
-
-
Dmitry Tarnyagin authored
SKB is freed twice upon send error. The Network stack consumes SKB even when it returns error code. Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
sjur.brandeland@stericsson.com authored
Always use cfmuxl_remove_uplayer when removing a up-layer. cfmuxl_ctrlcmd() can be called independently and in parallel with cfmuxl_remove_uplayer(). The race between them could cause list_del_rcu to be called on a node which has been already taken out from the list. That lead to a (rare) crash on accessing poisoned node->prev inside list_del_rcu. This fix ensures that deletion are done holding the same lock. Reported-by:
Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 27 Jan, 2012 1 commit
-
-
Eric W. Biederman authored
caif is a subsystem and as such it needs to register with register_pernet_subsys instead of register_pernet_device. Among other problems using register_pernet_device was resulting in net_generic being called before the caif_net structure was allocated. Which has been causing net_generic to fail with either BUG_ON's or by return NULL pointers. A more ugly problem that could be caused is packets in flight why the subsystem is shutting down. To remove confusion also remove the cruft cause by inappropriately trying to fix this bug. With the aid of the previous patch I have tested this patch and confirmed that using register_pernet_subsys makes the failure go away as it should. Signed-off-by:
Eric W. Biederman <ebiederm@xmission.com> Acked-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Tested-by:
Sasha Levin <levinsasha928@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 17 Jan, 2012 3 commits
-
-
sjur.brandeland@stericsson.com authored
Remove WARN_ON and bad handling of SKB without destructor callback in caif_flow_cb. SKB without destructor cannot be handled as an error case. Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
sjur.brandeland@stericsson.com authored
Fix typo for the Vendor/Product Id for ST-Ericsson CAIF modems. Discovery is based on fixed USB vendor 0x04cc (ST-Ericsson), product-id 0x230f (NCM). Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shan Wei authored
For net part, remove duplicate included header. Signed-off-by:
Shan Wei <davidshan@tencent.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 22 Dec, 2011 1 commit
-
-
Christoph Lameter authored
We simply say that regular this_cpu use must be safe regardless of preemption and interrupt state. That has no material change for x86 and s390 implementations of this_cpu operations. However, arches that do not provide their own implementation for this_cpu operations will now get code generated that disables interrupts instead of preemption. -tj: This is part of on-going percpu API cleanup. For detailed discussion of the subject, please refer to the following thread. http://thread.gmane.org/gmane.linux.kernel/1222078Signed-off-by:
Christoph Lameter <cl@linux.com> Signed-off-by:
Tejun Heo <tj@kernel.org> LKML-Reference: <alpine.DEB.2.00.1112221154380.11787@router.home>
-
- 19 Dec, 2011 1 commit
-
-
Rusty Russell authored
DaveM said: Please, this kind of stuff rots forever and not using bool properly drives me crazy. Joe Perches <joe@perches.com> gave me the spatch script: @@ bool b; @@ -b = 0 +b = false @@ bool b; @@ -b = 1 +b = true I merely installed coccinelle, read the documentation and took credit. Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 06 Dec, 2011 2 commits
-
-
Roar Førde authored
BUG_ON is too strict in a number of circumstances, use WARN_ON instead. Protocol errors should not halt the system. Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
sjur.brandeland@stericsson.com authored
Fix bad assert on fragment size triggering false positive. Signed-off-by:
Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-