aboutsummaryrefslogtreecommitdiffstats
path: root/lib (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2012-07-30tun: Fix formatting.David S. Miller1-2/+2
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29net/tun: fix ioctl() based info leaksMathias Krause1-1/+3
The tun module leaks up to 36 bytes of memory by not fully initializing a structure located on the stack that gets copied to user memory by the TUNGETIFF and SIOCGIFHWADDR ioctl()s. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29tg3: Update version to 3.124Michael Chan1-1/+1
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29tg3: Fix race condition in tg3_get_stats64()Michael Chan1-2/+4
Spinlock should be taken before checking for tp->hw_stats. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29tg3: Add New 5719 Read DMA workaroundMichael Chan2-1/+29
After Power-on-reset, the 5719's TX DMA length registers may contain uninitialized values and cause TX DMA to stall. Check for invalid values and set a register bit to flush the TX channels. The bit needs to be turned off after the DMA channels have been flushed. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29tg3: Fix Read DMA workaround for 5719 A0.Michael Chan1-2/+1
The workaround was mis-applied to all 5719 and 5720 chips. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29tg3: Request APE_LOCK_PHY before PHY accessMichael Chan2-0/+38
to prevent PHY access conflict with APE firmware. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29ipv6: fix incorrect route 'expires' value passed to userspaceLi Wei2-8/+8
When userspace use RTM_GETROUTE to dump route table, with an already expired route entry, we always got an 'expires' value(2147157) calculated base on INT_MAX. The reason of this problem is in the following satement: rt->dst.expires - jiffies < INT_MAX gcc promoted the type of both sides of '<' to unsigned long, thus a small negative value would be considered greater than INT_MAX. With the help of Eric Dumazet, do the out of bound checks in rtnl_put_cacheinfo(), _after_ conversion to clock_t. Signed-off-by: Li Wei <lw@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29mISDN: Bugfix only few bytes are transfered on a connectionKarsten Keil1-3/+4
The test for the fillempty condition was wrong in one place. Changed the variable to the right boolean type. Signed-off-by: Karsten Keil <keil@b1-systems.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29seeq: use PTR_RET at init_module of driverDevendra Naga1-3/+1
the driver sees wether the dev_seeq pointer is having a error that can be read by using the PTR_ERR, and returns it at error case, other wise 0 at success case. the PTR_RET does the same thing, and use PTR_RET instead of redoing the code of PTR_RET Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Acked-by: David Howells <dhowells@redhat.com> Reviewed-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29bnx2x: remove cast around the kmalloc in bnx2x_prev_mark_pathDevendra Naga1-2/+1
casting the void pointer is redundant (Documentation/CodingStyle) Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29ipv4: clean up put_childLin Ming1-26/+25
The first parameter struct trie *t is not used anymore. Remove it. Signed-off-by: Lin Ming <mlin@ss.pku.edu.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29ipv4: fix debug info in tnode_newLin Ming1-1/+1
It should print size of struct rt_trie_node * allocated instead of size of struct rt_trie_node. Signed-off-by: Lin Ming <mlin@ss.pku.edu.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-29qlge: Add offload features to vlan interfacesbrenohl@br.ibm.com1-0/+1
This patch fills the net_device vlan_features with the proper hardware features, thus, improving the vlan interface performance. With the patch applied, I can see around 148% improvement on a TCP_STREAM test, from 3.5 Gb/s to 8.7 Gb/s. On TCP_RR, I see a 11% improvement, from 18k to 20. The CPU utilization is almost the same on both cases, from the comparison above. Signed-off-by: Breno Leitao <brenohl@br.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-27tcp: perform DMA to userspace only if there is a task waiting for itJiri Kosina1-1/+3
Back in 2006, commit 1a2449a87b ("[I/OAT]: TCP recv offload to I/OAT") added support for receive offloading to IOAT dma engine if available. The code in tcp_rcv_established() tries to perform early DMA copy if applicable. It however does so without checking whether the userspace task is actually expecting the data in the buffer. This is not a problem under normal circumstances, but there is a corner case where this doesn't work -- and that's when MSG_TRUNC flag to recvmsg() is used. If the IOAT dma engine is not used, the code properly checks whether there is a valid ucopy.task and the socket is owned by userspace, but misses the check in the dmaengine case. This problem can be observed in real trivially -- for example 'tbench' is a good reproducer, as it makes a heavy use of MSG_TRUNC. On systems utilizing IOAT, you will soon find tbench waiting indefinitely in sk_wait_data(), as they have been already early-copied in tcp_rcv_established() using dma engine. This patch introduces the same check we are performing in the simple iovec copy case to the IOAT case as well. It fixes the indefinite recvmsg(MSG_TRUNC) hangs. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-27Revert "openvswitch: potential NULL deref in sample()"Jesse Gross1-3/+0
This reverts commit 5b3e7e6cb5771bedda51cdb6f715d1da8cd9e644. The problem that the original commit was attempting to fix can never happen in practice because validation is done one a per-flow basis rather than a per-packet basis. Adding additional checks at runtime is unnecessary and inconsistent with the rest of the code. CC: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-27ipv4: fix TCP early demuxEric Dumazet3-8/+8
commit 92101b3b2e317 (ipv4: Prepare for change of rt->rt_iif encoding.) invalidated TCP early demux, because rx_dst_ifindex is not properly initialized and checked. Also remove the use of inet_iif(skb) in favor or skb->skb_iif Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-27net: fix rtnetlink IFF_PROMISC and IFF_ALLMULTI handlingJiri Benc1-1/+7
When device flags are set using rtnetlink, IFF_PROMISC and IFF_ALLMULTI flags are handled specially. Function dev_change_flags sets IFF_PROMISC and IFF_ALLMULTI bits in dev->gflags according to the passed value but do_setlink passes a result of rtnl_dev_combine_flags which takes those bits from dev->flags. This can be easily trigerred by doing: tcpdump -i eth0 & ip l s up eth0 ip sets IFF_UP flag in ifi_flags and ifi_change, which is combined with IFF_PROMISC by rtnl_dev_combine_flags, causing __dev_change_flags to set IFF_PROMISC in gflags. Reported-by: Max Matveev <makc@redhat.com> Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-27USB: kaweth.c: use GFP_ATOMIC under spin_lockDan Carpenter1-1/+1
The problem is that we call this with a spin lock held. The call tree is: kaweth_start_xmit() holds kaweth->device_lock. -> kaweth_async_set_rx_mode() -> kaweth_control() -> kaweth_internal_control_msg() The kaweth_internal_control_msg() function is only called from kaweth_control() which used GFP_ATOMIC for its allocations. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-27tcp: Add TCP_USER_TIMEOUT negative value checkHangbin Liu1-1/+4
TCP_USER_TIMEOUT is a TCP level socket option that takes an unsigned int. But patch "tcp: Add TCP_USER_TIMEOUT socket option"(dca43c75) didn't check the negative values. If a user assign -1 to it, the socket will set successfully and wait for 4294967295 miliseconds. This patch add a negative value check to avoid this issue. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-27powerpc/ftrace: Trace function graph entry before updating indexSteven Rostedt1-6/+5
As Colin Cross ported my x86 change to ARM, he also pointed out that powerpc is also behind in this fix. The commit 722b3c746953 "ftrace/graph: Trace function entry before updating index" fixes an issue with function graph tracing for x86, where if the called entry function decides not to trace interrupts, it can fail the check if an interrupt comes in just after the curr_ret_stack is updated. The solution is to call the entry function first, then update the curr_ret_stack if the entry function wants to be traced. Cc: Colin Cross <ccross@android.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-27radeonfb: Add quirk for the graphics adapter in some JSxxTony Breeds1-0/+35
These devices are set to 640x480 by firmware, switch them to 800x600@60 so that the graphical installer can run on remote console. Reported by IBM during SLES10 SP2 beta testing: https://bugzilla.novell.com/show_bug.cgi?id=461002 LTC50817 Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-27powerpc: Lack of firmware flash support is not an errorAnton Blanchard1-1/+1
Reduce the severity of the warning given when firmware flash is not supported. Not all platforms have it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-27powerpc: Enable pseries hardware RNG and crypto modulesAnton Blanchard2-4/+8
Enable the hardware RNG and crypto modules. I verified they both autoload via the VIO subsystem, so there is no need to build them in. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-27powerpc: Update g5_defconfigBenjamin Herrenschmidt1-73/+30
This updates the g5 defconfig to include nouveau instead of nvidiafb (which works much better nowadays, in fact the latter crashes on modern distros), and to set CONFIG_VT_HW_CONSOLE_BINDING without which takeover from the firmware offb by nouveau doesn't work properly (and leads to unexplained black screens for some users). The rest is churn of going through defconfig / savedefconfig Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-27powerpc/kvm/bookehv: Fix build regressionAlexander Graf1-38/+39
After merging the register type check patches from Ben's tree, the hv enabled booke implementation ceased to compile. This patch fixes things up so everyone's happy again. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-27powerpc: Set stack limit properly in crit_transfer_to_handlerStuart Yoder1-2/+10
Commit 9778b696a0188ad3b3524b383953ee73b31b7b68 incorrectly changes the code setting the stack limit on entry to the kernel to mark the thread_info at the bottom of the stack out of bounds anymore. This fixes it. Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-26Btrfs: using vmalloc and friends needs vmalloc.hStephen Rothwell1-0/+1
On powerpc, we don't get the implicit vmalloc.h include, and as a result the build fails noisily: fs/btrfs/send.c: In function 'fs_path_free': fs/btrfs/send.c:185:4: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration] fs/btrfs/send.c: In function 'fs_path_ensure_buf': fs/btrfs/send.c:215:4: error: implicit declaration of function 'vmalloc' [-Werror=implicit-function-declaration] fs/btrfs/send.c:215:12: warning: assignment makes pointer from integer without a cast [enabled by default] fs/btrfs/send.c:225:12: warning: assignment makes pointer from integer without a cast [enabled by default] fs/btrfs/send.c:233:13: warning: assignment makes pointer from integer without a cast [enabled by default] fs/btrfs/send.c: In function 'iterate_dir_item': fs/btrfs/send.c:900:10: warning: assignment makes pointer from integer without a cast [enabled by default] fs/btrfs/send.c:909:11: warning: assignment makes pointer from integer without a cast [enabled by default] fs/btrfs/send.c: In function 'btrfs_ioctl_send': fs/btrfs/send.c:4463:17: warning: assignment makes pointer from integer without a cast [enabled by default] fs/btrfs/send.c:4469:17: warning: assignment makes pointer from integer without a cast [enabled by default] fs/btrfs/send.c:4475:2: error: implicit declaration of function 'vzalloc' [-Werror=implicit-function-declaration] fs/btrfs/send.c:4475:20: warning: assignment makes pointer from integer without a cast [enabled by default] fs/btrfs/send.c:4483:21: warning: assignment makes pointer from integer without a cast [enabled by default] Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-27leds-lp8788: forgotten unlock at lp8788_led_workDevendra Naga1-0/+1
at default case of switch we return with out unlocking the mutex. Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
2012-07-27LEDS: propagate error codes in blinkm_detect()Dan Carpenter1-2/+2
Use the error codes from the lower levels instead of -ENODEV. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jan-Simon Möller <jansimon.moeller@gmx.de> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
2012-07-27LEDS: memory leak in blinkm_led_common_set()Dan Carpenter1-2/+5
This can return without freeing the bl_work struct. Also there was no check for allocation failure. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jan-Simon Möller <jansimon.moeller@gmx.de> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
2012-07-27cpumask: cpulist_parse() comments correctionAlex Shi1-2/+1
As introduced in Rusty's commit 29c0177e6a4, the function has no parameter @len, so need to remove it from comments to avoid kernel-doc warning: alexs@debian:~/linux-next$ scripts/kernel-doc -man include/linux/cpumask.h | split-man.pl /tmp/man .... Warning(include/linux/cpumask.h:602): Excess function parameter 'len' description in 'cpulist_parse' and correct the function name in comments to cpulist_parse. Signed-off-by: Alex Shi <alex.shi@intel.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-27init: add comments to keep initcall-names in sync with initcall levelsJim Cromie2-1/+3
main.c has initcall_level_names[] for parse_args to print in debug messages, add comments to keep them in sync with initcalls defined in init.h. Also add "loadable" into comment re not using *_initcall macros in modules, to disambiguate from kernel/params.c and other builtins. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Acked-by: Borislav Petkov <borislav.petkov@amd.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-27cpumask: add a few comments of cpumask functionsAlex Shi1-0/+12
Current few cpumask functions' purposes are not quite clear. Stupid user like myself needs to dig into details for clear function purpose and return value. Add few explanation for them is helpful. Thanks for Srivatsa's comments and correction! Signed-off-by: Alex Shi <alex.shi@intel.com> Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-26sparc32, copy_thread: Clear TIF_USEDFPU flag of created task instead of currentTkhai Kirill1-3/+1
FPU state is saved into task_struct of created task. Current task continues use of the state, so it needs TIF_USEDFPU flag is not cleared. Created task receives fresh FPU and cleared TIF_USEFPU flag is required for it. Signed-off-by: Kirill Tkhai <tkhai@yandex.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: delete dead code in show_mem()Sam Ravnborg1-7/+0
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: move kmap_init() to highmem.cSam Ravnborg3-14/+17
Try to keep highmem support in a more central place. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: move probe_memory() to srmmu.cSam Ravnborg2-13/+11
Only one user so move it to the file using it. It had nothing to do in fault_32. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: drop unused BAD_PAGE stuffSam Ravnborg1-7/+0
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: centralize all mmu context handling in srmmu.cSam Ravnborg6-71/+63
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: drop quicklistSam Ravnborg2-15/+0
The quicklist stuff is not used anymore - drop it. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: drop sparc model check in paging_initSam Ravnborg1-13/+1
We already check the model in head_32.S so no need to repeat the check here Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: drop sparc_unmapped_baseSam Ravnborg2-4/+1
The base is always the same so no need to use a variable for this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32,leon: drop leon_init()Sam Ravnborg3-19/+0
This function was only used to set of_pdt_build_more to leon_node_init(). But the leon_node_init() was a nop as prom_amba_init was never assigned. Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Konrad Eisele <konrad@gaisler.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: drop fixmap.hSam Ravnborg4-30/+26
sparc32 does not support fixmaps - so do not pretend so by having the fixmap.h file. Move relevant parts to vaddrs.h. I looked at simplifying this even more but failed to understand the reasoning behind the extra guard page involved and due to missing testing possibilities only the trivial conversion was done. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: fixmap.h cleanupSam Ravnborg1-89/+5
Remove all unused stuff from fixmap.h It is only used for highmem - sparc32 has no fixmap support. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: drop unused kmap_atomic_to_pageSam Ravnborg2-19/+0
No users left of this function - drop it. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: drop swapper_pg_dirSam Ravnborg2-4/+3
We save one page of RAM dropping swapper_pg_dir. It was only used for an assignment in init-mm.c and we redid this later in srmmu.c anyway. This is likely a left-over from the sun4c removal. To avoid a dummy variable we use a simple #define swapper_pg_dir NULL Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: beautify srmmu_inherit_prom_mappings()Sam Ravnborg1-10/+16
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26sparc32: use void * in nocache get/freeSam Ravnborg2-35/+42
This allowed to us to kill a lot of casts, with no loss of readability in any places Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>