summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mISDN: Deletion of unnecessary checks before the function call "vfree"Markus Elfring2014-11-211-4/+2
| | | | | | | | | | The vfree() function performs also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'for-davem' of ↵David S. Miller2014-11-218-211/+114
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
| * bury skb_copy_to_page()Al Viro2014-11-191-23/+0
| | | | | | | | | | | | no callers since 3.0 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fold verify_iovec() into copy_msghdr_from_user()Al Viro2014-11-195-112/+77
| | | | | | | | | | | | ... and do the same on the compat side of things. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * {compat_,}verify_iovec(): switch to generic copying of iovecsAl Viro2014-11-193-89/+37
| | | | | | | | | | | | | | | | use {compat_,}rw_copy_check_uvector(). As the result, we are guaranteed that all iovecs seen in ->msg_iov by ->sendmsg() and ->recvmsg() will pass access_ok(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * separate kernel- and userland-side msghdrAl Viro2014-11-195-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel-side struct msghdr is (currently) using the same layout as userland one, but it's not a one-to-one copy - even without considering 32bit compat issues, we have msg_iov, msg_name and msg_control copied to kernel[1]. It's fairly localized, so we get away with a few functions where that knowledge is needed (and we could shrink that set even more). Pretty much everything deals with the kernel-side variant and the few places that want userland one just use a bunch of force-casts to paper over the differences. The thing is, kernel-side definition of struct msghdr is *not* exposed in include/uapi - libc doesn't see it, etc. So we can add struct user_msghdr, with proper annotations and let the few places that ever deal with those beasts use it for userland pointers. Saner typechecking aside, that will allow to change the layout of kernel-side msghdr - e.g. replace msg_iov/msg_iovlen there with struct iov_iter, getting rid of the need to modify the iovec as we copy data to/from it, etc. We could introduce kernel_msghdr instead, but that would create much more noise - the absolute majority of the instances would need to have the type switched to kernel_msghdr and definition of struct msghdr in include/linux/socket.h is not going to be seen by userland anyway. This commit just introduces user_msghdr and switches the few places that are dealing with userland-side msghdr to it. [1] actually, it's even trickier than that - we copy msg_control for sendmsg, but keep the userland address on recvmsg. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | Merge branch 'bonding_4ad'David S. Miller2014-11-191-32/+70
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xie Jianhua says: ==================== bonding: Introduce 4 AD link speed The speed field of AD Port Key was based on bitmask, it supported 5 kinds of link speed at most, as there were only 5 bits in the speed field of the AD Port Key. This patches series change the speed type (AD_LINK_SPEED_BITMASK) from bitmask to enum type in order to enhance speed type from 5 to 32, and then introduce 4 AD link speed to fix agg_bandwidth. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * bonding: Introduce 4 AD link speed to fix agg_bandwidthJianhua Xie2014-11-191-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds [2.5|20|40|56] Gbps enum definition, and fixes aggregated bandwidth calculation based on above slave links. CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Veaceslav Falico <vfalico@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: David S. Miller <davem@davemloft.net> Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * bonding: change AD_LINK_SPEED_BITMASK to enum to suport more speedJianhua Xie2014-11-191-32/+34
|/ | | | | | | | | | | | | | | | | | | | | | Port Key was determined as 16 bits according to the link speed, duplex and user key (which is yet not supported). In the old speed field, 5 bits are for speed [1|10|100|1000|10000]Mbps as below: -------------------------------------------------------------- Port key :| User key | Speed | Duplex| -------------------------------------------------------------- 16 6 1 0 This patch keeps the old layout, but changes AD_LINK_SPEED_BITMASK from bit type to an enum type. In this way, the speed field can expand speed type from 5 to 32. CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Veaceslav Falico <vfalico@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: David S. Miller <davem@davemloft.net> Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bpf: fix arraymap NULL deref and missing overflow and zero size checksAlexei Starovoitov2014-11-192-6/+16
| | | | | | | | | | | | | | | | | | | | | | - fix NULL pointer dereference: kernel/bpf/arraymap.c:41 array_map_alloc() error: potential null dereference 'array'. (kzalloc returns null) kernel/bpf/arraymap.c:41 array_map_alloc() error: we previously assumed 'array' could be null (see line 40) - integer overflow check was missing in arraymap (hashmap checks for overflow via kmalloc_array()) - arraymap can round_up(value_size, 8) to zero. check was missing. - hashmap was missing zero size check as well, since roundup_pow_of_two() can truncate into zero - found a typo in the arraymap comment and unnecessary empty line Fix all of these issues and make both overflow checks explicit U32 in size. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netlink: Deletion of an unnecessary check before the function call ↵Markus Elfring2014-11-191-2/+1
| | | | | | | | | | | | "__module_get" The __module_get() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: pktgen: Deletion of an unnecessary check before the function call ↵Markus Elfring2014-11-191-2/+1
| | | | | | | | | | | | "proc_remove" The proc_remove() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* usbnet: rtl8150: remove unused variableSudip Mukherjee2014-11-191-2/+1
| | | | | | | remove unused variable Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'stmmac-next'David S. Miller2014-11-196-136/+215
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Giuseppe Cavallaro says: ==================== stmmac: update driver documentation Recently many changes have been done inside the driver so this patch updates the driver's doc for example reviewing information for the rx and tx processes that are managed by napi method, adding new information for missing glue-logic files etc. Also this reviews and fixes what is reported when run kernel-doc script. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * stmmac: review driver when run kernel-docGiuseppe CAVALLARO2014-11-194-69/+142
| | | | | | | | | | | | | | | | | | When run ./scripts/kernel-doc several warnings are reported so this patch fix them. Also it reviews many comments and adds new ones. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * stmmac: document common header fileGiuseppe CAVALLARO2014-11-191-0/+8
| | | | | | | | | | | | | | | | This patch adds some useful comments inside the common header file to provide information about the APIs exposed by the driver. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * stmmac: update driver documentationGiuseppe CAVALLARO2014-11-191-67/+65
|/ | | | | | | | | | | Recently many changes have been done inside the driver so this patch updates the driver's doc for example reviewing information for the rx and tx processes that are managed by napi method, adding new information for missing glue-logic files etc. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: make connect() mem charging friendlyEric Dumazet2014-11-191-40/+28
| | | | | | | | | | | | | | | | | | | | | | | | | While working on sk_forward_alloc problems reported by Denys Fedoryshchenko, we found that tcp connect() (and fastopen) do not call sk_wmem_schedule() for SYN packet (and/or SYN/DATA packet), so sk_forward_alloc is negative while connect is in progress. We can fix this by calling regular sk_stream_alloc_skb() both for the SYN packet (in tcp_connect()) and the syn_data packet in tcp_send_syn_data() Then, tcp_send_syn_data() can avoid copying syn_data as we simply can manipulate syn_data->cb[] to remove SYN flag (and increment seq) Instead of open coding memcpy_fromiovecend(), simply use this helper. This leaves in socket write queue clean fast clone skbs. This was tested against our fastopen packetdrill tests. Reported-by: Denys Fedoryshchenko <nuclearcat@nuclearcat.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tun: return NET_XMIT_DROP for dropped packetsJason Wang2014-11-191-1/+1
| | | | | | | | | | | | | | After commit 5d097109257c03a71845729f8db6b5770c4bbedc ("tun: only queue packets on device"), NETDEV_TX_OK was returned for dropped packets. This will confuse pktgen since dropped packets were counted as sent ones. Fixing this by returning NET_XMIT_DROP to let pktgen count it as error packet. Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* icmp: Remove some spurious dropped packet profile hits from the ICMP pathRick Jones2014-11-184-21/+42
| | | | | | | | | If icmp_rcv() has successfully processed the incoming ICMP datagram, we should use consume_skb() rather than kfree_skb() because a hit on the likes of perf -e skb:kfree_skb is not called-for. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* dev_ioctl: use sizeof(x) instead of sizeof xFabian Frederick2014-11-181-3/+6
| | | | | | | Also remove spaces after cast. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/core: include linux/types.h instead of asm/types.hFabian Frederick2014-11-181-1/+1
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: fix spelling for synchronizedFabian Frederick2014-11-181-2/+2
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* dccp: spelling s/reseting/resettingFabian Frederick2014-11-181-1/+1
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* dccp: replace min/casting by min_tFabian Frederick2014-11-181-1/+1
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* dccp: remove blank lines between function/EXPORT_SYMBOLFabian Frederick2014-11-181-6/+0
| | | | | | | See Documentation/CodingStyle chapter 6. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* dccp: kerneldoc warning fixesFabian Frederick2014-11-181-2/+2
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge tag 'linux-can-next-for-3.19-20141117' of ↵David S. Miller2014-11-184-63/+181
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://gitorious.org/linux-can/linux-can-next Marc Kleine-Budde says: ==================== this is a pull request of 9 patches for net-next/master. All 9 patches are by Roger Quadros and update the c_can platform driver. First by improving the initialization sequence of the message RAM, making use of syscon/regmap. In the later patches support for various TI SoCs is added. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: can: c_can: Add support for TI am4372 DCANRoger Quadros2014-11-172-1/+3
| | | | | | | | | | | | | | | | | | | | AM4372 SoC has 2 DCAN modules. Add compatible id and raminit driver data for it. The driver data is same as AM3352 but this gives us flexibility to add AM4372 specific quirks if required later. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: c_can: Add support for TI am3352 DCANRoger Quadros2014-11-172-1/+13
| | | | | | | | | | | | | | | | | | AM3352 SoC has 2 DCAN modules. Add compatible id and raminit driver data for am3352 DCAN. Signed-off-by: Roger Quadros <rogerq@ti.com> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: c_can: Add support for TI DRA7 DCANRoger Quadros2014-11-172-0/+14
| | | | | | | | | | | | | | | | DRA7 SoC has 2 CAN IPs. Provide compatible IDs and RAMINIT register data for both. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: c_can: Disable pins when CAN interface is downRoger Quadros2014-11-171-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | DRA7 CAN IP suffers from a problem which causes it to be prevented from fully turning OFF (i.e. stuck in transition) if the module was disabled while there was traffic on the CAN_RX line. To work around this issue we select the SLEEP pin state by default on probe and use the DEFAULT pin state on CAN up and back to the SLEEP pin state on CAN down. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: c_can: Add support for START pulse in RAMINIT sequenceRoger Quadros2014-11-172-0/+8
| | | | | | | | | | | | | | | | | | Some SoCs e.g. (TI DRA7xx) need a START pulse to start the RAMINIT sequence i.e. START bit must be set and cleared before checking for the DONE bit status. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: c_can: Add syscon/regmap RAMINIT mechanismRoger Quadros2014-11-173-41/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some TI SoCs like DRA7 have a RAMINIT register specification different from the other AMxx SoCs and as expected by the existing driver. To add more insanity, this register is shared with other IPs like DSS, PCIe and PWM. Provides a more generic mechanism to specify the RAMINIT register location and START/DONE bit position and use the syscon/regmap framework to access the register. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: c_can: Add RAMINIT register information to driver dataRoger Quadros2014-11-171-0/+10
| | | | | | | | | | | | | | | | Some platforms (e.g. TI) need special RAMINIT register handling. Provide a way to store RAMINIT register description in driver data. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: c_can: Introduce c_can_driver_data structureRoger Quadros2014-11-172-23/+33
| | | | | | | | | | | | | | | | | | | | | | | | We want to have more data than just can_dev_id to be present in the driver data e.g. TI platforms need RAMINIT register description. Introduce the c_can_driver_data structure and move the can_dev_id into it. Tidy up the way it is used on probe(). Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: c_can: Add timeout to c_can_hw_raminit_ti()Roger Quadros2014-11-171-1/+10
| | | | | | | | | | | | | | | | | | | | TI's RAMINIT DONE mechanism is buggy on AM43xx SoC and may not always be set after the START bit is set. Although it seems to work fine even in that case. So add a timeout mechanism to c_can_hw_raminit_wait_ti(). Don't bail out in that failure case but just print an error message. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* | Merge branch 'fec-next'David S. Miller2014-11-182-188/+156
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lothar Waßmann says: ==================== net: fec: assorted cleanup patches This patch series is a followup to: <1415350967-2238-1-git-send-email-LW@KARO-electronics.de> [PATCHv4 1/1] net: fec: fix regression on i.MX28 introduced by rx_copybreak support to apply the cleanup patches that were originally sent along with the bugfix patch. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: fec: remove unused return value from swap_buffer()Lothar Waßmann2014-11-181-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | The return value of swap_buffer() is not used by any caller, thus remove it. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: fec: simplify loop counter handling in swap_buffer()Lothar Waßmann2014-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate the DIV_ROUND_UP() and change the loop counter increment to 4 instead. This results in saving 6 instructions in the functions assembly code. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: fec: use swab32s() instead of cpu_to_be32()Lothar Waßmann2014-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when swap_buffer() is being called, we know for sure, that we need to byte swap the data. Furthermore, this function is called for swapping data in both directions. Thus cpu_to_be32() is semantically not correct for all use cases. Use swab32s() to reflect this. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: fec: improve access to quirk flags by copying them into ↵Lothar Waßmann2014-11-182-68/+39
| | | | | | | | | | | | | | | | | | | | | fec_enet_private struct Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: fec: change type of 'bufdesc_ex' to boolLothar Waßmann2014-11-182-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | fep->bufdesc_ex is treated as a boolean value, thus declare it as such. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: fec: properly parenthesize macro argsLothar Waßmann2014-11-181-15/+16
| | | | | | | | | | | | | | | Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: fec: consistently use lower case chars as hex digitsLothar Waßmann2014-11-181-44/+44
| | | | | | | | | | | | | | | Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: fec: indentation cleanupLothar Waßmann2014-11-181-54/+54
|/ / | | | | | | | | | | | | consistently use TABs for indentation Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'ebpf_maps'David S. Miller2014-11-1813-63/+936
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alexei Starovoitov says: ==================== implementation of eBPF maps v1->v2: renamed flags for MAP_UPDATE_ELEM command to be more concise, clarified commit logs and improved comments in patches 1,3,7 per discussions with Daniel Old v1 cover: this set of patches adds implementation of HASH and ARRAY types of eBPF maps which were described in manpage in commit b4fc1a460f30("Merge branch 'bpf-next'") The difference vs previous version of these patches from August: - added 'flags' attribute to BPF_MAP_UPDATE_ELEM - in HASH type implementation removed per-map kmem_cache. I was doing kmem_cache_create() for every map to enable selective slub debugging to check for overflows and leaks. Now it's not needed, so just use normal kmalloc() for map elements. - added ARRAY type which was mentioned in manpage, but wasn't public yet - added map testsuite and removed temporary bits from test_stubs Note, eBPF programs cannot be attached to events yet. It will come in the next set. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bpf: remove test map scaffolding and user proper typesAlexei Starovoitov2014-11-182-54/+16
| | | | | | | | | | | | | | | | | | | | | | | | proper types and function helpers are ready. Use them in verifier testsuite. Remove temporary stubs Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bpf: allow eBPF programs to use mapsAlexei Starovoitov2014-11-184-1/+98
| | | | | | | | | | | | | | | | | | | | | | | | expose bpf_map_lookup_elem(), bpf_map_update_elem(), bpf_map_delete_elem() map accessors to eBPF programs Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bpf: add a testsuite for eBPF mapsAlexei Starovoitov2014-11-184-3/+296
| | | | | | | | | | | | | | | | | | | | | | | | | | | . check error conditions and sanity of hash and array map APIs . check large maps (that kernel gracefully switches to vmalloc from kmalloc) . check multi-process parallel access and stress test Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud