summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* net: sxgbe: add Checksum offload support for Samsung sxgbeVipul Pandya2014-03-264-12/+61
| | | | | | | | | This patch adds TX and RX checksum offload support. Signed-off-by: Vipul Pandya <vipul.pandya@samsung.com> Neatening-by: Joe Perches <joe@perches.com> Signed-off-by: Byungho An <bh74.an@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: sxgbe: add TSO support for Samsung sxgbeVipul Pandya2014-03-266-11/+92
| | | | | | | | | Enable TSO during initialization for each DMA channels Signed-off-by: Vipul Pandya <vipul.pandya@samsung.com> Neatening-by: Joe Perches <joe@perches.com> Signed-off-by: Byungho An <bh74.an@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: sxgbe: add EEE(Energy Efficient Ethernet) for Samsung sxgbeGirish K S2014-03-266-2/+360
| | | | | | | | | Added support for the EEE(Energy Efficient Ethernet) in 10G ethernet driver. Signed-off-by: Girish K S <ks.giri@samsung.com> Neatening-by: Joe Perches <joe@perches.com> Signed-off-by: Byungho An <bh74.an@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: sxgbe: add basic framework for Samsung 10Gb ethernet driverSiva Reddy2014-03-2622-0/+5507
| | | | | | | | | | | | | | | | | This patch adds support for Samsung 10Gb ethernet driver(sxgbe). - sxgbe core initialization - Tx and Rx support - MDIO support - ISRs for Tx and Rx - ifconfig support to driver Signed-off-by: Siva Reddy Kallam <siva.kallam@samsung.com> Signed-off-by: Vipul Pandya <vipul.pandya@samsung.com> Signed-off-by: Girish K S <ks.giri@samsung.com> Neatening-by: Joe Perches <joe@perches.com> Signed-off-by: Byungho An <bh74.an@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sxgbe: Add device-tree binding support documentSiva Reddy2014-03-261-0/+52
| | | | | | | | This patch adds binding document for SXGBE ethernet driver via device-tree. Signed-off-by: Siva Reddy Kallam <siva.kallam@samsung.com> Signed-off-by: Byungho An <bh74.an@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ptp: Fix compiler warnings in the testptp utilityChristian Riesch2014-03-261-5/+5
| | | | | | Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Cc: Dong Zhu <bluezhudong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ptp: Add a command line option in testptp to set a specific PTP timeManfred Rudigier2014-03-261-2/+18
| | | | | | | Signed-off-by: Manfred Rudigier <manfred.rudigier@omicron.at> Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'bonding-next'David S. Miller2014-03-264-22/+69
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ding Tianhong says: ==================== bonding: support QinQ for bond arp interval v1->v2: remvoe the comment "TODO: QinQ?". convert pr_xxx() to pr_xxx_ratelimited() for arp interval. v2->v3: remove the unnecessary log for arp interval and add net ratelimit to avoid spam log. v3->v4: Add ratelimit for debugging is not a good idea, it will miss some message if the user turns the debugging on, so don't add ratelimited on debugging. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * bonding: add net_ratelimt to avoid spam in arp intervaldingtianhong2014-03-261-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | Remove the unnecessary log and add net_ratelimit to the others, in order to avoid spam the log. Cc: Joe Perches <joe@perches.com> Cc: Jay Vosburgh <fubar@us.ibm.com> Cc: Veaceslav Falico <vfalico@redhat.com> Cc: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * bonding: support QinQ for bond arp intervaldingtianhong2014-03-262-18/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bond send arp request to indicate that the slave is active, and if the bond dev is a vlan dev, it will set the vlan tag in skb to notice the vlan group, but the bond could only send a skb with 802.1q proto, not support for QinQ. So add outer tag for lower vlan tag and inner tag for upper vlan tag to support QinQ, The new skb will be consist of two vlan tag just like this: dst mac | src mac | outer vlan tag | inner vlan tag | data | ..... If We don't need QinQ, the inner vlan tag could be set to 0 and use outer vlan tag as a normal vlan group. Using "ip link" to configure the bond for QinQ and add test log: ip link add link bond0 bond0.20 type vlan proto 802.1ad id 20 ip link add link bond0.20 bond0.20.200 type vlan proto 802.1q id 200 ifconfig bond0.20 11.11.20.36/24 ifconfig bond0.20.200 11.11.200.36/24 echo +11.11.200.37 > /sys/class/net/bond0/bonding/arp_ip_target 90:e2:ba:07:4a:5c (oui Unknown) > Broadcast, ethertype 802.1Q-QinQ (0x88a8),length 50: vlan 20, p 0,ethertype 802.1Q, vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 11.11.200.37 tell 11.11.200.36, length 28 90:e2:ba:06:f9:86 (oui Unknown) > 90:e2:ba:07:4a:5c (oui Unknown), ethertype 802.1Q-QinQ (0x88a8), length 50: vlan 20, p 0, ethertype 802.1Q, vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Reply 11.11.200.37 is-at 90:e2:ba:06:f9:86 (oui Unknown), length 28 v1->v2: remove the comment "TODO: QinQ?". Cc: Jay Vosburgh <fubar@us.ibm.com> Cc: Veaceslav Falico <vfalico@redhat.com> Cc: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * vlan: make a new function vlan_dev_vlan_proto() and exportdingtianhong2014-03-262-0/+13
|/ | | | | | | | | The vlan support 2 proto: 802.1q and 802.1ad, so make a new function called vlan_dev_vlan_proto() which could return the vlan proto for input dev. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'bonding-next'David S. Miller2014-03-261-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ding Tianhong says: ==================== bonding: slight optimization and avoid spam for bond xmit path v1->v2: Add ratelimit for debugging is not a good idea, it will miss some message if the user turns the debugging on, so remove the patch 3. use net_err_ratelimited instead of pr_err_ratelimited and use __func__ instead of bond_xmit_broadcast(). ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * bonding: ratelimit pr_err() for bond xmit broadcastdingtianhong2014-03-261-2/+2
| | | | | | | | | | | | | | It may spam if the system is out of the memory, add ratelimit for it. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * bonding: slight optimization for bond xmit pathdingtianhong2014-03-261-3/+3
|/ | | | | | | | Add unlikely() micro to the unlikely conditions in the bond xmit path for slight optimization. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* xen-netback: Functional follow-up patch for grant mapping seriesZoltan Kiss2014-03-261-7/+19
| | | | | | | | | | | | Ian made some late comments about the grant mapping series, I incorporated the functional outcomes into this patch: - use callback_param macro to shorten access to pending_tx_info in xenvif_fill_frags() and xenvif_tx_submit() - print an error message in xenvif_idx_unmap() before panic Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* xen-netback: Non-functional follow-up patch for grant mapping seriesZoltan Kiss2014-03-262-6/+11
| | | | | | | | | | | | Ian made some late comments about the grant mapping series, I incorporated the non-functional outcomes into this patch: - typo fixes in a comment of xenvif_free(), and add another one there as well - typo fix for comment of rx_drain_timeout_msecs - remove stale comment before calling xenvif_grant_handle_reset() Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* xen-netback: Stop using xenvif_tx_pending_slots_availableZoltan Kiss2014-03-263-20/+4Star
| | | | | | | | | | | | | | | | | Since the early days TX stops if there isn't enough free pending slots to consume a maximum sized (slot-wise) packet. Probably the reason for that is to avoid the case when we don't have enough free pending slot in the ring to finish the packet. But if we make sure that the pending ring has the same size as the shared ring, that shouldn't really happen. The frontend can only post packets which fit the to the free space of the shared ring. If it doesn't, the frontend has to stop, as it can only increase the req_prod when the whole packet fits onto the ring. This patch avoid using this checking, makes sure the 2 ring has the same size, and remove a checking from the callback. As now we don't stop the NAPI instance on this condition, we don't have to wake it up if we free pending slots up. Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'bcm7xxx-next'David S. Miller2014-03-261-21/+37
|\ | | | | | | | | | | | | | | | | | | | | | | | | Florian Fainelli says: ==================== net: phy: bcm7xxx: workaround updates This patch updates the BCM7xxx internal PHY workaround, this time with defines for the registers we are touching. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: bcm7xxx: properly clear AFE_RX_LP_COUNTERFlorian Fainelli2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | The AFE_RX_LP_COUNTER kept the last 3 bits set, which would not properly clear the EEE LPI mode errors bits. Make sure that those bits are set to 0 to ensure the PHY timing is always good even during EEE wake-up. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: bcm7xxx: fix spurious MDIO failures during workaroundFlorian Fainelli2014-03-261-15/+15
| | | | | | | | | | | | | | | | | | | | | | Writing first to the AFE registers, and then the VCO, RCAL, RC_CAL registers turned out to unveil some spurious MDIO read/write failures which would make the workaround partially applied. The fix is to write first to the VCO, RCAL, RC_CAL registers, and then write to the AFE registers. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: bcm7xxx: define constants for our registersFlorian Fainelli2014-03-261-11/+27
|/ | | | | | | | | Define constants for the various registers used in bcm7xxx_28nm_afe_config_init() to help clarify what this workaround is about. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Rename skb->rxhash to skb->hashTom Herbert2014-03-2612-49/+49
| | | | | | | | | | | | | | The packet hash can be considered a property of the packet, not just on RX path. This patch changes name of rxhash and l4_rxhash skbuff fields to be hash and l4_hash respectively. This includes changing uses of the field in the code which don't call the access functions. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Remove casts of pointer to same typeJoe Perches2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | Casting a pointer to a pointer of the same type is pointless, so remove these unnecessary casts. Done via coccinelle script: $ cat typecast_2.cocci @@ type T; T *foo; @@ - (T *)foo + foo Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* alx: Remove casts of pointer to same typeJoe Perches2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | | Casting a pointer to a pointer of the same type is pointless, so remove these unnecessary casts. Done via coccinelle script: $ cat typecast_2.cocci @@ type T; T *foo; @@ - (T *)foo + foo Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* altera: Remove casts of pointer to same typeJoe Perches2014-03-261-2/+2
| | | | | | | | | | | | | | | | | | | | Casting a pointer to a pointer of the same type is pointless, so remove these unnecessary casts. Done via coccinelle script: $ cat typecast_2.cocci @@ type T; T *foo; @@ - (T *)foo + foo Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Vince Bridgers <vbridgers2013@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* chelsio: Remove addressof casts to same typeJoe Perches2014-03-261-4/+4
| | | | | | | | | | | | | | | | | | | Using addressof then casting to the original type is pointless, so remove these unnecessary casts. Done via coccinelle script: $ cat typecast.cocci @@ type T; T foo; @@ - (T *)&foo + &foo Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* smsc911x: No need to print driver versionFabio Estevam2014-03-261-2/+0Star
| | | | | | | | | | Having the kernel to print: "smsc911x: Driver version 2008-10-21" on every boot is not very useful, so remove the print of the driver version. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* smsc911x: Do not use netdev_dbg() when device is not registeredFabio Estevam2014-03-261-1/+2
| | | | | | | | | | | | | | | With debug enabled we get the following message: smsc911x smsc911x (unregistered net_device): couldn't get clock -2 As the device has not been registered at this point, it is better to use dev_dbg() instead of netdev_dbg(). CC: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Suggested-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: delete unused parameter in tcp_nagle_check()Peter Pan(潘卫平)2014-03-261-3/+3
| | | | | | | | After commit d4589926d7a9 (tcp: refine TSO splits), tcp_nagle_check() does not use parameter mss_now anymore. Signed-off-by: Weiping Pan <panweiping3@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'bnx2x-next'David S. Miller2014-03-268-2047/+925Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yuval Mintz says: ==================== bnx2x: SR-IOV patch series (With the exception of the first patch) This series contains IOV-related patches, where the main changes are related to the driver's IOV-support backbone - it adds a new workqueue for IOV related tasks and removes the vfop mechanism from the driver. Please consider applying this series to `net-next'. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * bnx2x: Don't allow VFs to become promiscuousYuval Mintz2014-03-261-32/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if a VF's Rx Mode will be configured to support promiscuous mode the PF will comply, causing the VF to actually become promiscuous. This will enable the VF to see all unicast traffic which might be intended for other VMs, which we believe should not be possible. This patch will cause the hypervisor to ignore the VF's request for changes in its Rx mode (other than disabling it), preventing it from becoming promiscuous. Reported-by: Yoann Juet <yoann.juet@univ-nantes.fr> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * bnx2x: Don't show port statistics for VFsYuval Mintz2014-03-261-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | VFs are currently showing port statistics, although they can't really access those - thus all such statistics will always show a value of 0. This patch removes said statistics from the VF's view as to not confuse the user. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * bnx2x: Remove the sriov VFOP mechanismYuval Mintz2014-03-265-1954/+622Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we now posses a workqueue dedicated for sriov, the paradigm that sriov- related tasks cannot sleep is no longer correct. The VFOP mechanism was the one previously supporting said paradigm - the sriov related tasks were broken into segments which did not require sleep, and the mechanism re-scheduled the next segment whenever possible. This patch remvoes the VFOP mechanism altogether - the resulting code is a much easier to follow code; The segments are gathered into straight-forward functions which sleep whenever neccessary. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * bnx2x: Create workqueue for IOV related tasksYuval Mintz2014-03-265-78/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bnx2x sriov mechanisms were done in the bnx2x slowpath workitem which runs on the bnx2x's workqueue; This workitem is also responsible for the bottom half of interrupt handling in the driver, and specifically it also receives FW notifications of ramrod completions, allowing other flows to progress. The original design of the sriov reltaed-flows was based on the notion such flows must not sleep, since their context is the slowpath workitem. Otherwise, we might reach timeouts - those flows may wait for ramrod completion that will never arrive as the workitem wlll not be re-scheduled until that same flow will be over. In more recent time bnx2x started supporting features in which the VF interface can be configured by the tools accessing the PF on the hypervisor. This support created possible races on the VF-PF lock (which is taken either when the PF is handling a VF message or when the PF is doing some slowpath work on behalf of the VF) which may cause timeouts on the VF side and lags on the PF side. This patch changes the scheme - it creates a new workqueue for sriov related tasks and moves all handling currently done in the slowpath task into the the new workqueue. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * bnx2x: Support mng. request for driver versionYuval Mintz2014-03-264-1/+163
|/ | | | | | | | | This adds support in a new management feature which needs the driver versions (bnx2x, bnx2fc and bnx2i) loaded for each interface. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* atm: idt77105: Use del_timer_sync() in exit pathThomas Gleixner2014-03-261-3/+3
| | | | | | | | | | | The module is about to go away. Make sure everything is stopped safely before we pull the plug. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Chas Williams <chas@cmf.nrl.navy.mil> Cc: atm <linux-atm-general@lists.sourceforge.net> Cc: netdev <netdev@vger.kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* atm: firestream: Use del_timer_sync() in teardown pathThomas Gleixner2014-03-261-1/+1
| | | | | | | | | | | The device is about to vanish. So we need to make sure that the timer is completely stopped and the callback is not running on another CPU. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Chas Williams <chas@cmf.nrl.navy.mil> Cc: atm <linux-atm-general@lists.sourceforge.net> Cc: netdev <netdev@vger.kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlx4: Use actual number of PCI functions (PF + VFs) for alias GUID logicMatan Barak2014-03-261-1/+1
| | | | | | | | | | | | | | The code which is dealing with SRIOV alias GUIDs in the mlx4 IB driver has some logic which operated according to the maximal possible active functions (PF + VFs). After the single port VFs code integration this resulted in a flow of false-positive warnings going to the kernel log after the PF driver started the alias GUID work. Fix it by referring to the actual number of functions. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2014-03-26129-784/+971
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Documentation/devicetree/bindings/net/micrel-ks8851.txt net/core/netpoll.c The net/core/netpoll.c conflict is a bug fix in 'net' happening to code which is completely removed in 'net-next'. In micrel-ks8851.txt we simply have overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
| * Merge branch 'nfsd-next' of git://linux-nfs.org/~bfields/linuxLinus Torvalds2014-03-251-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Pull nfsd fix frm Bruce Fields: "J R Okajima sent this early and I was just slow to pass it along, apologies. Fortunately it's a simple fix" * 'nfsd-next' of git://linux-nfs.org/~bfields/linux: nfsd: fix lost nfserrno() call in nfsd_setattr()
| | * nfsd: fix lost nfserrno() call in nfsd_setattr()J. R. Okajima2014-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is a regression in 208d0ac 2014-01-07 nfsd4: break only delegations when appropriate which deletes an nfserrno() call in nfsd_setattr() (by accident, probably), and NFSD becomes ignoring an error from VFS. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * | Merge branch 'for-linus' of ↵Linus Torvalds2014-03-254-35/+21Star
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "These four commits are obvious fixes (a couple of fdget_pos()-related ones from Eric Biggers, prepend_name() fix, missing checks for false negatives from __lookup_mnt() in fs/namei.c)" For now I'm pulling just the four obvious fixes, there's another four pending in Al's 'for-linus' branch wrt the mnt_hash list that were more involved. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: rcuwalk: recheck mount_lock after mountpoint crossing attempts make prepend_name() work correctly when called with negative *buflen vfs: Don't let __fdget_pos() get FMODE_PATH files vfs: atomic f_pos access in llseek()
| | * | rcuwalk: recheck mount_lock after mountpoint crossing attemptsAl Viro2014-03-231-16/+13Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can get false negative from __lookup_mnt() if an unrelated vfsmount gets moved. In that case legitimize_mnt() is guaranteed to fail, and we will fall back to non-RCU walk... unless we end up running into a hard error on a filesystem object we wouldn't have reached if not for that false negative. IOW, delaying that check until the end of pathname resolution is wrong - we should recheck right after we attempt to cross the mountpoint. We don't need to recheck unless we see d_mountpoint() being true - in that case even if we have just raced with mount/umount, we can simply go on as if we'd come at the moment when the sucker wasn't a mountpoint; if we run into a hard error as the result, it was a legitimate outcome. __lookup_mnt() returning NULL is different in that respect, since it might've happened due to operation on completely unrelated mountpoint. Cc: stable@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | make prepend_name() work correctly when called with negative *buflenAl Viro2014-03-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In all callchains leading to prepend_name(), the value left in *buflen is eventually discarded unused if prepend_name() has returned a negative. So we are free to do what prepend() does, and subtract from *buflen *before* checking for underflow (which turns into checking the sign of subtraction result, of course). Cc: stable@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | vfs: Don't let __fdget_pos() get FMODE_PATH filesEric Biggers2014-03-231-15/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit bd2a31d522344 ("get rid of fget_light()") introduced the __fdget_pos() function, which returns the resulting file pointer and fdput flags combined in an 'unsigned long'. However, it also changed the behavior to return files with FMODE_PATH set, which shouldn't happen because read(), write(), lseek(), etc. aren't allowed on such files. This commit restores the old behavior. This regression actually had no effect on read() and write() since FMODE_READ and FMODE_WRITE are not set on file descriptors opened with O_PATH, but it did cause lseek() on a file descriptor opened with O_PATH to fail with ESPIPE rather than EBADF. Signed-off-by: Eric Biggers <ebiggers3@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | vfs: atomic f_pos access in llseek()Eric Biggers2014-03-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 9c225f2655e36a4 ("vfs: atomic f_pos accesses as per POSIX") changed several system calls to use fdget_pos() instead of fdget(), but missed sys_llseek(). Fix it. Signed-off-by: Eric Biggers <ebiggers3@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | | Linux 3.14-rc8Linus Torvalds2014-03-251-1/+1
| | | |
| * | | Merge branch 'parisc-3.14' of ↵Linus Torvalds2014-03-256-84/+6Star
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: - revert parts of the latest patch regarding font selection with STICON console - wire up the utimes() syscall for parisc - remove the unused parisc tmpalias code and unnecessary arch*relax defines * 'parisc-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: locks: remove redundant arch_*_relax operations parisc: wire up sys_utimes parisc: Remove unused CONFIG_PARISC_TMPALIAS code partly revert commit 8a10bc9: parisc/sti_console: prefer Linux fonts over built-in ROM fonts
| | * | | parisc: locks: remove redundant arch_*_relax operationsWill Deacon2014-03-231-4/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for parisc. Cc: Helge Deller <deller@gmx.de> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Helge Deller <deller@gmx.de>
| | * | | parisc: wire up sys_utimesHelge Deller2014-03-232-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We seem to be nearly the only platform which does not provide the sys_utimes syscall. Adding it now makes our life much easier with userspace applications (like dietlibc and e2fsprogs) since we then behave like all other platforms too and don't need extra patches which are hard to get upstream anyway because we are not a mainstream architecture. Signed-off-by: Helge Deller <deller@gmx.de> Cc: stable@vger.kernel.org # v3.13