]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
10 years agobnx2x: Don't show port statistics for VFs
Yuval Mintz [Sun, 23 Mar 2014 16:12:26 +0000 (18:12 +0200)]
bnx2x: Don't show port statistics for VFs

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>
10 years agobnx2x: Remove the sriov VFOP mechanism
Yuval Mintz [Sun, 23 Mar 2014 16:12:25 +0000 (18:12 +0200)]
bnx2x: Remove the sriov VFOP mechanism

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>
10 years agobnx2x: Create workqueue for IOV related tasks
Yuval Mintz [Sun, 23 Mar 2014 16:12:24 +0000 (18:12 +0200)]
bnx2x: Create workqueue for IOV related tasks

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>
10 years agobnx2x: Support mng. request for driver version
Yuval Mintz [Sun, 23 Mar 2014 16:12:23 +0000 (18:12 +0200)]
bnx2x: Support mng. request for driver version

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>
10 years agoatm: idt77105: Use del_timer_sync() in exit path
Thomas Gleixner [Sun, 23 Mar 2014 15:09:28 +0000 (15:09 +0000)]
atm: idt77105: Use del_timer_sync() in exit path

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>
10 years agoatm: firestream: Use del_timer_sync() in teardown path
Thomas Gleixner [Sun, 23 Mar 2014 15:09:28 +0000 (15:09 +0000)]
atm: firestream: Use del_timer_sync() in teardown path

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>
10 years agomlx4: Use actual number of PCI functions (PF + VFs) for alias GUID logic
Matan Barak [Sun, 23 Mar 2014 07:50:43 +0000 (09:50 +0200)]
mlx4: Use actual number of PCI functions (PF + VFs) for alias GUID logic

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>
10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Wed, 26 Mar 2014 00:29:20 +0000 (20:29 -0400)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

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>
10 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Tue, 25 Mar 2014 23:25:39 +0000 (19:25 -0400)]
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next

John W. Linville says:

====================
Please pull this batch of wireless updates intended for 3.15!

For the mac80211 bits, Johannes says:

"This has a whole bunch of bugfixes for things that went into -next
previously as well as some other bugfixes I didn't want to rush into
3.14 at this point. The rest of it is some cleanups and a few small
features, the biggest of which is probably Janusz's regulatory DFS CAC
time code."

For the Bluetooth bits, Gustavo says:

"One more pull request to 3.15. This is mostly and bug fix pull request, it
contains several fixes and clean up all over the tree, plus some small new
features."

For the NFC bits, Samuel says:

"This is the NFC pull request for 3.15. With this one we have:

- Support for ISO 15693 a.k.a. NFC vicinity a.k.a. Type 5 tags. ISO
  15693 are long range (1 - 2 meters) vicinity tags/cards. The kernel
  now supports those through the NFC netlink and digital APIs.

- Support for TI's trf7970a chipset. This chipset relies on the NFC
  digital layer and the driver currently supports type 2, 4A and 5 tags.

- Support for NXP's pn544 secure firmare download. The pn544 C3 chipsets
  relies on a different firmware download protocal than the C2 one. We
  now support both and use the right one depending on the version we
  detect at runtime.

- Support for 4A tags from the NFC digital layer.

- A bunch of cleanups and minor fixes from Axel Lin and Thierry Escande."

For the iwlwifi bits, Emmanuel says:

"We were sending a host command while the mutex wasn't held. This
led to hard-to-catch races."

And...

"I have a fix for a "merge damage" which is not really a merge
damage: it enables scheduled scan which has been disabled in
wireless.git. Since you merged wireless.git into wireless-next.git,
this can now be fixed in wireless-next.git.

Besides this, Alex made a workaround for a hardware bug. This fix
allows us to consume less power in S3. Arik and Eliad continue to
work on D0i3 which is a run-time power saving feature. Eliad also
contributes a few bits to the rate scaling logic to which Eyal adds his
own contribution. Avri dives deep in the power code - newer firmware
will allow to enable power save in newer scenarios. Johannes made a few
clean-ups. I have the regular amount of BT Coex boring stuff. I disable
uAPSD since we identified firmware bugs that cause packet loss. One
thing that do stand out is the udev event that we now send when the
FW asserts. I hope it will allow us to debug the FW more easily."

Also included is one last iwlwifi pull for a build breakage fix...

For the Atheros bits, Kalle says:

"Michal now did some optimisations and was able to improve throughput by
100 Mbps on our MIPS based AP135 platform. Chun-Yeow added some
workarounds to be able to better use ad-hoc mode. Ben improved log
messages and added support for MSDU chaining. And, as usual, also some
smaller fixes."

Beyond that...

Andrea Merello continues his rtl8180 refactoring, in preparation for
a long-awaited rtl8187 driver.  We get a new driver (rsi) for the
RS9113 chip, from Fariya Fatima.  And, of course, we get the usual
round of updates for ath9k, brcmfmac, mwifiex, wil6210, etc. as well.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoxen-netback: Proper printf format for ptrdiff_t is 't'.
David S. Miller [Tue, 25 Mar 2014 23:02:16 +0000 (19:02 -0400)]
xen-netback: Proper printf format for ptrdiff_t is 't'.

This fixes:

drivers/net/xen-netback/netback.c: In function ‘xenvif_tx_dealloc_action’:
drivers/net/xen-netback/netback.c:1573:8: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long int’ [-Wformat=]

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoRevert "xen-netback: Aggregate TX unmap operations"
Zoltan Kiss [Fri, 21 Mar 2014 17:23:04 +0000 (17:23 +0000)]
Revert "xen-netback: Aggregate TX unmap operations"

This reverts commit e9275f5e2df1b2098a8cc405d87b88b9affd73e6. This commit is the
last in the netback grant mapping series, and it tries to do more aggressive
aggreagtion of unmap operations. However practical use showed almost no
positive effect, whilst with certain frontends it causes significant performance
regression.

Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/net...
David S. Miller [Tue, 25 Mar 2014 22:54:36 +0000 (18:54 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/net-next

Eric W. Biederman says:

====================
Using dev_kfree/consume_skb_any for functions called in multiple contexts

These changes are a result of walking through the network drivers
supporting netpoll and verifying the code paths that netpoll can cause
to be called in hard irq context use an appropriate flavor of
kfree_skb.  Either dev_kfree_skb_any or dev_consume_skb_any.

Since my last pass at this I have become aware of the small differences
between dev_kfree_skb_any and dev_consume_skb_any.
net/core/drop_monitor.c reports the dev_kfree_skb_any as a drop and
while being quite about the second.  With the weird twist that
dev_kfree_skb is unintuitively consume_skb.

As netpoll now calls the napi poll function with budget == 0, pieces of
a drivers the napi poll function that don't run when budget == 0 have
been ignored.

The most interesting change is to the atl1c which tried unsuccesfully to
tell one of it's functions which context it is called in so that it
could call dev_kfree_skb_irq or dev_kfree_skb as appropriate.  I have
just removed the extra parameter and called dev_consume_skb_any.

At 54 separate changes I will post each change as a separate patch (so
they can be reviewed) but for general sanity sake I have gathered them
all into a git branch for easy acces.
====================

Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'nfsd-next' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Tue, 25 Mar 2014 22:24:11 +0000 (15:24 -0700)]
Merge branch 'nfsd-next' of git://linux-nfs.org/~bfields/linux

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()

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Tue, 25 Mar 2014 22:05:57 +0000 (15:05 -0700)]
Merge branch 'for-linus' of 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()

10 years agoif_vlan: Call dev_kfree_skb_any instead of kfree_skb.
Eric W. Biederman [Fri, 21 Mar 2014 02:50:33 +0000 (19:50 -0700)]
if_vlan: Call dev_kfree_skb_any instead of kfree_skb.

Replace kfree_skb with dev_kfree_skb_any in vlan_insert_tag as
vlan_insert_tag can be called from hard irq context (netpoll)
and from other contexts.

dev_kfree_skb_any is used as vlan_insert_tag only frees the skb if the
skb can not be modified to insert a tag, in which case vlan_insert_tag
drops the skb.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agovirtio_net: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:43:33 +0000 (18:43 -0700)]
virtio_net: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in start_xmit which can
be called in hard irq and other contexts.

start_xmit only frees skbs that it is dropping.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agostaging/octeon-ethernet: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:39:19 +0000 (18:39 -0700)]
staging/octeon-ethernet: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in cvm_oct_xmit_pow which
can be called in hard irq and other contexts, on the code paths that
drop packets.

Replace dev_kfree_skb with dev_consume_skb_any in cvm_oct_xmit_pow which
can be called in hard irq and other contexts, on the code path where
the packet is transmitted successfully.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agowlags49_h2: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:35:40 +0000 (18:35 -0700)]
wlags49_h2: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in wl_send and
wl_send_dma which can be called in hard irq and other contexts,
on the code paths where the skb was transmitted successfully.

Replace dev_kfree_skb with dev_kfree_skb_any in wl_send_dmay which can
be called in hard irq and other contexts, on the code path where a
skb is dropped.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoxen-netfront: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:33:04 +0000 (18:33 -0700)]
xen-netfront: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in xennet_start_xmit
which can be called in hard irq and other contexts.  xennet_start_xmit
only fress skbs which it drops.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agovmxnet3: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:31:16 +0000 (18:31 -0700)]
vmxnet3: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in vmnet3_tx_xmit which
can be called in hard irq and other contexts.  vmnet3_tx_xmit only
frees skbs that it has dropped.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoxilinx_emaclite: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:27:33 +0000 (18:27 -0700)]
xilinx_emaclite: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in xemaclite_send which
can be called in hard irq and other contexts.  xemacelite_send only
frees skbs that it has successfully transmitted.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agovia-velocity: Call dev_kfree_skb_any instead of kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:25:05 +0000 (18:25 -0700)]
via-velocity: Call dev_kfree_skb_any instead of kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in velocity_xmit that can
be called in hard irq and other contexts.  Packets are freed and
dropped in velocity_xmit when they are too fragmented and can
not be linearized.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agovia-rhine: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:22:47 +0000 (18:22 -0700)]
via-rhine: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in rhine_start_tx which
can be called in hard irq and other contexts.  Packets are only freed
in rhine_start_tx if they are dropped.

Replace dev_kfree_skb with dev_consume_skb_any in rhine_tx that can be
called in hard irq and other contexts.  rhine_tx handles successfully
transmitted packets.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agospider_net: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:20:12 +0000 (18:20 -0700)]
spider_net: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in
spider_net_release_tx_chain which can be called in hard irq and other
contexts.

dev_consume_skb_any was choosen as it preserves the current
dev_kfree_skb semantics (dev_kfree_skb is consume_skb) and
is because it is correct most of the time as most packets
will have been successfully transmitted not dropeed.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agotilepro: Call dev_consume_skb_any instead of kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:18:02 +0000 (18:18 -0700)]
tilepro: Call dev_consume_skb_any instead of kfree_skb.

Replace kfree_skb with dev_consume_skb_any in tile_net_tx and
tile_net_tx_tso which can be called in hard irq and other contexts.

At the point where the skbs are freed a packet has been successfully
transmitted so dev_consume_skb_any is the appropriate variant to use.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agosungem: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:13:13 +0000 (18:13 -0700)]
sungem: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in gem_tx which can be
called in hard irq and other contexts.  gem_tx handles successfully
transmitted packets.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agostmmac: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:11:09 +0000 (18:11 -0700)]
stmmac: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in stmmac_tx_clean that can
be called in hard irq and other contexts.  stmmac_tx_clean handles
freeing successfully transmitted packets.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agosmsc911x: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:08:52 +0000 (18:08 -0700)]
smsc911x: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in smsc911x_hard_xmit
which can be called in hard irq and other contexts. smsc911x_hard_xmit
always transmits and consumes the specified skb.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agosmc91x: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:08:04 +0000 (18:08 -0700)]
smc91x: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in
smc_hardware_send_pkt that can be called in hard irq and other
contexts, and handles successfully transmitted packets.

Replace dev_kfree_skb with dev_kfree_skb_any in smc_hard_start_xmit which
can be called in hard irq and other contexts, and only frees skbs
when dropping them.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agosmc911x: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:06:09 +0000 (18:06 -0700)]
smc911x: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in functions that can
be called in hard irq and other contexts.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agosis900: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:03:36 +0000 (18:03 -0700)]
sis900: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in functions that can
be called in hard irq and other contexts.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agosc92031: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 01:01:13 +0000 (18:01 -0700)]
sc92031: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in sc92031_start_xmit
that can be called in hard irq and other contexts.

Using dev_consume_skb_any preserves the current semantics (as
dev_kfree_skb is just consume_skb) and since packet drops
are rare is usually accurate.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoforcedeth: Call dev_kfree_skb_any instead of kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:54:27 +0000 (17:54 -0700)]
forcedeth: Call dev_kfree_skb_any instead of kfree_skb.

Replace kfree_skb with dev_kfree_skb_any in functions that can
be called in hard irq and other contexts.

Every location changes is a drop making dev_kfree_skby_any appropriate.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agovxge: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:51:57 +0000 (17:51 -0700)]
vxge: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in vxge_xmit that can
be called in hard irq and other contexts.

vxge_xmit only calls dev_kfree_skb_any when errors result in dropping
skbs.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agos2io: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:47:58 +0000 (17:47 -0700)]
s2io: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in s2io_xmit that can
be called in hard irq and other contexts.

All instances that are changed are packet drops.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoksz884x: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Tue, 25 Mar 2014 00:41:43 +0000 (17:41 -0700)]
ksz884x: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in copy_old_skb that can
be called in hard irq and other contexts.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agosky2: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:40:17 +0000 (17:40 -0700)]
sky2: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in sky2_xmit_frame that
can be called in hard irq and other contexts.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoskge: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:38:42 +0000 (17:38 -0700)]
skge: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any skge_xmit_free that can
be called in hard irq and other contexts, on the path that
handles dropped packets.

Replace dev_kfree_skb with dev_consume_skb_any in skge_tx_done that can
be called in hard irq and other contexts, on the path that handles
successfully transmitted skbs.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agomv643xx_eth: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:36:05 +0000 (17:36 -0700)]
mv643xx_eth: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in mv643xx_eth_xmit and
txq_submit_skb that can be called in hard irq and other contexts,
on paths where the skbs are dropped.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agojme: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:32:41 +0000 (17:32 -0700)]
jme: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in jme_expand_header that
can be called in hard irq and other contexts, on the failure
path where the skb is dropped.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoibmveth: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:29:34 +0000 (17:29 -0700)]
ibmveth: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in ibmveth_start_xmit
that can be called in hard irq and other contexts.

In this code path the packet can have either been transmitted
or dropped, dev_consume_skb_any was choosen because that preserves
the existing semantics of the code, and a transmitted packet is
more likely.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoehea: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:25:48 +0000 (17:25 -0700)]
ehea: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in functions that can
be called in hard irq and other contexts.

None of the locations was a packet drop so dev_kfree_skb_any is
inappropriate.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoi825xx: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:20:57 +0000 (17:20 -0700)]
i825xx: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in i596_start_xmit that
can be called in hard irq and other contexts, when the skb is dropped.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoucc_geth: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:16:22 +0000 (17:16 -0700)]
ucc_geth: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in ucc_geth_tx that can
be called in hard irq and other contexts, when processing the
tx completion event.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agofec: Call dev_kfree_skb_any instead of kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:12:53 +0000 (17:12 -0700)]
fec: Call dev_kfree_skb_any instead of kfree_skb.

Replace kfree_skb with dev_kfree_skb_any in fec_enet_start_xmit that
can be called in hard irq and other contexts, when the packet is
dropped.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agosundance: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:10:50 +0000 (17:10 -0700)]
sundance: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in start_tx that can
be called in hard irq and other contexts, when the skb is dropped.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agouli526x: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sun, 16 Mar 2014 00:05:27 +0000 (17:05 -0700)]
uli526x: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in uli562x_start_xmit
that can be called in hard irq and other contexts, when the packet is
dropped.

Replace dev_kfree_skb with dev_consume_skb_any in uli562x_start_xmit
that can be called in hard irq and other contexts, when the packet is
transmitted.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agodmfe: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 23:59:27 +0000 (16:59 -0700)]
dmfe: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in dmfe_start_xmit that
can be called in hard irq and other contexts, when the packet is
dropped.

Replace dev_kfree_skb with dev_consume_skb_any in dmfe_start_xmit that
can be called in hard irq and other contexts, when the packet is
transmitted.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agodm9000: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 23:53:09 +0000 (16:53 -0700)]
dm9000: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in dm9000_start_xmit
that can be called in hard irq and other contexts, on the path
that successfully transmits the packet.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoenic: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 23:49:05 +0000 (16:49 -0700)]
enic: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in enic_hard_start_xmit
that can be called in hard irq and other contexts.

enic_hard_start_xmit only frees the skb when dropping it.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agocs89x0: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 23:45:46 +0000 (16:45 -0700)]
cs89x0: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in net_send_packet that
can be called in hard irq and other contexts.

net_send_packet consumes (not drops) the skb of interest.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agocxfb4vf: Call dev_kfree/consume_skb_any instead of [dev_]kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 23:31:32 +0000 (16:31 -0700)]
cxfb4vf: Call dev_kfree/consume_skb_any instead of [dev_]kfree_skb.

Replace kfree_skb with dev_consume_skb_any in free_tx_desc that can be
called in hard irq and other contexts. dev_consume_skb_any is used
as this function consumes successfully transmitted skbs.

Replace dev_kfree_skb with dev_kfree_skb_any in t4vf_eth_xmit that can
be called in hard irq and other contexts, on paths that drop the skb.

Replace dev_kfree_skb with dev_consume_skb_any in t4vf_eth_xmit that can
be called in hard irq and other contexts, on paths that successfully
transmit the skb.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agocxgb4: Call dev_kfree/consume_skb_any instead of [dev_]kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 23:29:49 +0000 (16:29 -0700)]
cxgb4: Call dev_kfree/consume_skb_any instead of [dev_]kfree_skb.

Replace kfree_skb with dev_consume_skb_any in free_tx_desc that can be
called in hard irq and other contexts. dev_consume_skb_any is used
as this function consumes successfully transmitted skbs.

Replace dev_kfree_skb with dev_kfree_skb_any in t4_eth_xmit that can
be called in hard irq and other contexts, on paths that drop the skb.

Replace dev_kfree_skb with dev_consume_skb_any in t4_eth_xmit that can
be called in hard irq and other contexts, on paths that successfully
transmit the skb.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agocxgb3: Call dev_kfree/consume_skb_any instead of [dev_]kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 23:23:31 +0000 (16:23 -0700)]
cxgb3: Call dev_kfree/consume_skb_any instead of [dev_]kfree_skb.

Replace kfree_skb with dev_consume_skb_any in free_tx_desc, and
write_tx_pkt_wr that can be called in hard irq and other contexts.

Replace dev_kfree_skb with dev_kfree_skb_any in t3_eth_xmit that can
be called in hard irq and other contexts.

dev_kfree_skb is replaced with dev_kfree_skb_any in t3_eth_xmit as
that location is a packet drop, while kfree_skb in free_tx_desc,
and in write_tx_pkt_wr are places where packets are consumed
in a healthy manner.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoxgmac: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 23:10:54 +0000 (16:10 -0700)]
xgmac: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in xgmac_tx_complete
that can be called in hard irq and other contexts.

Replace dev_kfree_skb with dev_kfree_skb_any in xgmac_xmit that can
be called in hard irq and other contexts.

dev_consume_skb_any is used in xgamc_tx_complete as skbs that reach
there have been successfully transmitted, dev_kfree_skby_any is used
in xgmac_xmit as skbs that are freed there are being dropped.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agomacb: Call dev_kfree_skb_any instead of kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 23:08:27 +0000 (16:08 -0700)]
macb: Call dev_kfree_skb_any instead of kfree_skb.

Replace kfree_skb with dev_kfree_skb_any in macb_start_xmit that can
be called in hard irq and other contexts.

macb_start_xmit only frees skbs when dropping them so
dev_kfree_skb_any is used.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agobnad: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 23:06:40 +0000 (16:06 -0700)]
bnad: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in bnad_start_xmit that
can be called in hard irq and other contexts.

dev_kfree_skb_any is used as bnad_start_xmit only frees skbs when to
drop them, normally transmitted packets are handled elsewhere.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoatl1c: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 22:58:10 +0000 (15:58 -0700)]
atl1c: Call dev_kfree/consume_skb_any instead of dev_kfree_skb.

The call path: atl1c_xmit_frame, atlc_tx_rollback, atl1c_clean_buffer
can not be tell at compile time if it will be invoked from hard irq
or other context, as atl1c_xmit_frame does not know.  So remove
the logic that  passes the compile time knowledge into al1c_clean_buffer
and figure out it out at runtime with dev_consume_skb_any.

Replace dev_kfree_skb with dev_kfree_skb_any in atl1c_xmit_frame that
can be called in hard irq and other contexts.

Replace dev_kfree_skb and dev_kfree_skb_irq with dev_consume_skb_any
in atl1c_clean_buffer that can be called in hard irq and other
contexts.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoalx: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 22:53:09 +0000 (15:53 -0700)]
alx: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in alx_start_xmit that
can be called in hard irq and other contexts.

dev_kfree_skb_any is used as alx_start_xmit only frees skbs
when dropping them.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agopcnet32: Call dev_kfree_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 22:49:08 +0000 (15:49 -0700)]
pcnet32: Call dev_kfree_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_kfree_skb_any in pcnet32_start_xmit
that can be called in hard irq and other contexts.

dev_kfree_skb_any is used as pcnet32_start_xmit only frees an
skb when it drops a packet during transmit.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agolance: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 22:48:50 +0000 (15:48 -0700)]
lance: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in lance_start_xmit
that can be called in hard irq and other contexts.

dev_consume_skb_any is used as lance_start_xmit always immediately
consumes the skb.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoam79c961a: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Tue, 25 Mar 2014 04:18:40 +0000 (21:18 -0700)]
am79c961a: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in am79c961 that can
be called in hard irq and other contexts.

dev_consume_skb_any is used as am79c961_sendpacket always
immediately consumes the skb.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agosun4i-emac: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Tue, 25 Mar 2014 04:13:02 +0000 (21:13 -0700)]
sun4i-emac: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in emacs_start_xmit
which can be called in hard irq and other contexts.

emac_start_xmit always transmits the packet making dev_consume_skb
the appropriate function to call.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agoLinux 3.14-rc8
Linus Torvalds [Tue, 25 Mar 2014 02:31:17 +0000 (19:31 -0700)]
Linux 3.14-rc8

10 years agoMerge branch 'parisc-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Tue, 25 Mar 2014 00:36:58 +0000 (17:36 -0700)]
Merge branch 'parisc-3.14' of 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

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Tue, 25 Mar 2014 00:30:44 +0000 (17:30 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc fixes from David Miller:

 1) Do serial locking in a way that makes things clear that these are
    IRQ spinlocks.

 2) Conversion to generic idle loop broke first generation Niagara
    machines, need to have %pil interrupts enabled during cpu yield
    hypervisor call.

 3) Do not use magic constants for iterations over tsb tables, from Doug
    Wilson.

 4) Fix erroneous truncation of 64-bit system call return values to
    32-bit.  From Dave Kleikamp.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Make sure %pil interrupts are enabled during hypervisor yield.
  sparc64:tsb.c:use array size macro rather than number
  sparc64: don't treat 64-bit syscall return codes as 32-bit
  sparc: serial: Clean up the locking for -rt

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Tue, 25 Mar 2014 00:07:24 +0000 (17:07 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) OpenVswitch's lookup_datapath() returns error pointers, so don't
    check against NULL.  From Jiri Pirko.

 2) pfkey_compile_policy() code path tries to do a GFP_KERNEL allocation
    under RCU locks, fix by using GFP_ATOMIC when necessary.  From
    Nikolay Aleksandrov.

 3) phy_suspend() indirectly passes uninitialized data into the ethtool
    get wake-on-land implementations.  Fix from Sebastian Hesselbarth.

 4) CPSW driver unregisters CPTS twice, fix from Benedikt Spranger.

 5) If SKB allocation of reply packet fails, vxlan's arp_reduce() defers
    a NULL pointer.  Fix from David Stevens.

 6) IPV6 neigh handling in vxlan doesn't validate the destination
    address properly, and it builds a packet with the src and dst
    reversed.  Fix also from David Stevens.

 7) Fix spinlock recursion during subscription failures in TIPC stack,
    from Erik Hugne.

 8) Revert buggy conversion of davinci_emac to devm_request_irq, from
    Chrstian Riesch.

 9) Wrong flags passed into forwarding database netlink notifications,
    from Nicolas Dichtel.

10) The netpoll neighbour soliciation handler checks wrong ethertype,
    needs to be ETH_P_IPV6 rather than ETH_P_ARP.  Fix from Li RongQing.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits)
  tipc: fix spinlock recursion bug for failed subscriptions
  vxlan: fix nonfunctional neigh_reduce()
  net: davinci_emac: Fix rollback of emac_dev_open()
  net: davinci_emac: Replace devm_request_irq with request_irq
  netpoll: fix the skb check in pkt_is_ns
  net: micrel : ks8851-ml: add vdd-supply support
  ip6mr: fix mfc notification flags
  ipmr: fix mfc notification flags
  rtnetlink: fix fdb notification flags
  tcp: syncookies: do not use getnstimeofday()
  netlink: fix setsockopt in mmap examples in documentation
  openvswitch: Correctly report flow used times for first 5 minutes after boot.
  via-rhine: Disable device in error path
  ATHEROS-ATL1E: Convert iounmap to pci_iounmap
  vxlan: fix potential NULL dereference in arp_reduce()
  cnic: Update version to 2.5.20 and copyright year.
  cnic,bnx2i,bnx2fc: Fix inconsistent use of page size
  cnic: Use proper ulp_ops for per device operations.
  net: cdc_ncm: fix control message ordering
  ipv6: ip6_append_data_mtu do not handle the mtu of the second fragment properly
  ...

10 years agobfin_mac: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 22:37:24 +0000 (15:37 -0700)]
bfin_mac: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in _tx_reclaim_skb that
can be called in hard irq and other contexts.

dev_consume_skb is used as _tx_reclaim_skb is called after a packet
has been successfully transmitted.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years ago8390: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 22:34:00 +0000 (15:34 -0700)]
8390: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in __ei_start_xmit that
can be called in hard irq and other contexts.

dev_consume_skb is used as in this simple driver the skb is always
immediately consumed, there are no drops.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years ago3c59x: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 22:31:09 +0000 (15:31 -0700)]
3c59x: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in vortex_start_xmit
as it can be called in hard irq and other contexts.

dev_consume_skb_any is used when vortext_start_xmit directly consumes
the packet instead of dmaing it to the device.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years ago3c509: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 22:29:06 +0000 (15:29 -0700)]
3c509: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in el3_start_xmit
as it can be called in hard irq and other contexts.

dev_consume_skb_any is used as on this simple hardware the
skb is consumed directly by the start_xmit function.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agouml/net_kern: Call dev_consume_skb_any instead of dev_kfree_skb.
Eric W. Biederman [Sat, 15 Mar 2014 22:27:14 +0000 (15:27 -0700)]
uml/net_kern: Call dev_consume_skb_any instead of dev_kfree_skb.

Replace dev_kfree_skb with dev_consume_skb_any in uml_net_start_xmit
as it can be called in hard irq and other contexts.

dev_consume_skb_any is used as uml_net_start_xmit typically
consumes (not drops) packets.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
10 years agotipc: fix spinlock recursion bug for failed subscriptions
Erik Hugne [Mon, 24 Mar 2014 15:56:38 +0000 (16:56 +0100)]
tipc: fix spinlock recursion bug for failed subscriptions

If a topology event subscription fails for any reason, such as out
of memory, max number reached or because we received an invalid
request the correct behavior is to terminate the subscribers
connection to the topology server. This is currently broken and
produces the following oops:

[27.953662] tipc: Subscription rejected, illegal request
[27.955329] BUG: spinlock recursion on CPU#1, kworker/u4:0/6
[27.957066]  lock: 0xffff88003c67f408, .magic: dead4ead, .owner: kworker/u4:0/6, .owner_cpu: 1
[27.958054] CPU: 1 PID: 6 Comm: kworker/u4:0 Not tainted 3.14.0-rc6+ #5
[27.960230] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[27.960874] Workqueue: tipc_rcv tipc_recv_work [tipc]
[27.961430]  ffff88003c67f408 ffff88003de27c18 ffffffff815c0207 ffff88003de1c050
[27.962292]  ffff88003de27c38 ffffffff815beec5 ffff88003c67f408 ffffffff817f0a8a
[27.963152]  ffff88003de27c58 ffffffff815beeeb ffff88003c67f408 ffffffffa0013520
[27.964023] Call Trace:
[27.964292]  [<ffffffff815c0207>] dump_stack+0x45/0x56
[27.964874]  [<ffffffff815beec5>] spin_dump+0x8c/0x91
[27.965420]  [<ffffffff815beeeb>] spin_bug+0x21/0x26
[27.965995]  [<ffffffff81083df6>] do_raw_spin_lock+0x116/0x140
[27.966631]  [<ffffffff815c6215>] _raw_spin_lock_bh+0x15/0x20
[27.967256]  [<ffffffffa0008540>] subscr_conn_shutdown_event+0x20/0xa0 [tipc]
[27.968051]  [<ffffffffa000fde4>] tipc_close_conn+0xa4/0xb0 [tipc]
[27.968722]  [<ffffffffa00101ba>] tipc_conn_terminate+0x1a/0x30 [tipc]
[27.969436]  [<ffffffffa00089a2>] subscr_conn_msg_event+0x1f2/0x2f0 [tipc]
[27.970209]  [<ffffffffa0010000>] tipc_receive_from_sock+0x90/0xf0 [tipc]
[27.970972]  [<ffffffffa000fa79>] tipc_recv_work+0x29/0x50 [tipc]
[27.971633]  [<ffffffff8105dbf5>] process_one_work+0x165/0x3e0
[27.972267]  [<ffffffff8105e869>] worker_thread+0x119/0x3a0
[27.972896]  [<ffffffff8105e750>] ? manage_workers.isra.25+0x2a0/0x2a0
[27.973622]  [<ffffffff810648af>] kthread+0xdf/0x100
[27.974168]  [<ffffffff810647d0>] ? kthread_create_on_node+0x1a0/0x1a0
[27.974893]  [<ffffffff815ce13c>] ret_from_fork+0x7c/0xb0
[27.975466]  [<ffffffff810647d0>] ? kthread_create_on_node+0x1a0/0x1a0

The recursion occurs when subscr_terminate tries to grab the
subscriber lock, which is already taken by subscr_conn_msg_event.
We fix this by checking if the request to establish a new
subscription was successful, and if not we initiate termination of
the subscriber after we have released the subscriber lock.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovxlan: fix nonfunctional neigh_reduce()
David Stevens [Mon, 24 Mar 2014 14:39:58 +0000 (10:39 -0400)]
vxlan: fix nonfunctional neigh_reduce()

The VXLAN neigh_reduce() code is completely non-functional since
check-in. Specific errors:

1) The original code drops all packets with a multicast destination address,
even though neighbor solicitations are sent to the solicited-node
address, a multicast address. The code after this check was never run.
2) The neighbor table lookup used the IPv6 header destination, which is the
solicited node address, rather than the target address from the
neighbor solicitation. So neighbor lookups would always fail if it
got this far. Also for L3MISSes.
3) The code calls ndisc_send_na(), which does a send on the tunnel device.
The context for neigh_reduce() is the transmit path, vxlan_xmit(),
where the host or a bridge-attached neighbor is trying to transmit
a neighbor solicitation. To respond to it, the tunnel endpoint needs
to do a *receive* of the appropriate neighbor advertisement. Doing a
send, would only try to send the advertisement, encapsulated, to the
remote destinations in the fdb -- hosts that definitely did not do the
corresponding solicitation.
4) The code uses the tunnel endpoint IPv6 forwarding flag to determine the
isrouter flag in the advertisement. This has nothing to do with whether
or not the target is a router, and generally won't be set since the
tunnel endpoint is bridging, not routing, traffic.

The patch below creates a proxy neighbor advertisement to respond to
neighbor solicitions as intended, providing proper IPv6 support for neighbor
reduction.

Signed-off-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'davinci_emac'
David S. Miller [Mon, 24 Mar 2014 19:32:34 +0000 (15:32 -0400)]
Merge branch 'davinci_emac'

Christian Riesch says:

====================
net: davinci_emac: Fix interrupt requests and error handling

since commit 6892b41d9701283085b655c6086fb57a5d63fa47 (Linux 3.11) the
davinci_emac driver is broken. After doing ifconfig down, ifconfig up,
requesting the interrupts for the driver fails. The interface remains dead
until the board is rebooted.

The first patch in this patchset reverts commit
6892b41d9701283085b655c6086fb57a5d63fa47 partially and makes the driver
useable again.

During the work on the first patch, a number of bugs in the error handling
of the driver's ndo_open code were found. The second patch fixes these bugs.

I believe the first patch meets the rules for stable kernels, I therefore added
the stable tag to this patch. The second patch is just cleanup, the code
that is fixed by this patch is only executed in case of an error.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: davinci_emac: Fix rollback of emac_dev_open()
Christian Riesch [Mon, 24 Mar 2014 12:46:27 +0000 (13:46 +0100)]
net: davinci_emac: Fix rollback of emac_dev_open()

If an error occurs during the initialization in emac_dev_open() (the
driver's ndo_open function), interrupts, DMA descriptors etc. must be freed.
The current rollback code is buggy in several ways.

  1) Freeing the interrupts. The current code will not free all interrupts
     that were requested by the driver. Furthermore,  the code tries to do a
     platform_get_resource(priv->pdev, IORESOURCE_IRQ, -1) in its last
     iteration.

     This patch fixes these bugs.

  2) Wrong order of err: and rollback: labels. If the setup of the PHY in
     the code fails, the interrupts that have been requested before are
     not freed:

        request irq
                if requesting irqs fails, goto rollback
        setup phy
                if phy setup fails, goto err
        return 0

     rollback:
        free irqs
     err:

     This patch brings the code into the correct order.

  3) The code calls napi_enable() and emac_int_enable(), but does not
     undo both in case of an error.

     This patch adds calls of emac_int_disable() and napi_disable() to the
     rollback code.

  4) RX DMA descriptors are not freed in case of an error: Right before
     requesting the irqs, the function creates DMA descriptors for the
     RX channel. These RX descriptors are never freed when we jump to either
     rollback or err.

     This patch adds code for freeing the DMA descriptors in the case of
     an initialization error. This required a modification of
     cpdma_ctrl_stop() in davinci_cpdma.c: We must be able to call this
     function to free the DMA descriptors while the DMA channels are
     in IDLE state (before cpdma_ctlr_start() was called).

Tested on a custom board with the Texas Instruments AM1808.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: davinci_emac: Replace devm_request_irq with request_irq
Christian Riesch [Mon, 24 Mar 2014 12:46:26 +0000 (13:46 +0100)]
net: davinci_emac: Replace devm_request_irq with request_irq

In commit 6892b41d9701283085b655c6086fb57a5d63fa47

Author: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Date:   Tue Jun 25 21:24:51 2013 +0530
net: davinci: emac: Convert to devm_* api

the call of request_irq is replaced by devm_request_irq and the call
of free_irq is removed. But since interrupts are requested in
emac_dev_open, doing ifconfig up/down on the board requests the
interrupts again each time, causing devm_request_irq to fail. The
interface is dead until the device is rebooted.

This patch reverts said commit partially: It changes the driver back
to use request_irq instead of devm_request_irq, puts free_irq back in
place, but keeps the remaining changes of the original patch.

Reported-by: Jon Ringle <jon@ringle.org>
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonetpoll: fix the skb check in pkt_is_ns
Li RongQing [Fri, 21 Mar 2014 12:53:57 +0000 (20:53 +0800)]
netpoll: fix the skb check in pkt_is_ns

Neighbor Solicitation is ipv6 protocol, so we should check
skb->protocol with ETH_P_IPV6

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Cc: WANG Cong <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agosparc64: Make sure %pil interrupts are enabled during hypervisor yield.
David S. Miller [Mon, 24 Mar 2014 18:45:12 +0000 (14:45 -0400)]
sparc64: Make sure %pil interrupts are enabled during hypervisor yield.

In arch_cpu_idle() we must enable %pil based interrupts before
potentially invoking the hypervisor cpu yield call.

As per the Hypervisor API documentation for cpu_yield:

Interrupts which are blocked by some mechanism other that
pstate.ie (for example %pil) are not guaranteed to cause
a return from this service.

It seems that only first generation Niagara chips are hit by this
bug.  My best guess is that later chips implement this in hardware
and wake up anyways from %pil events, whereas in first generation
chips the yield is implemented completely in hypervisor code and
requires %pil to be enabled in order to wake properly from this
call.

Fixes: 87fa05aeb3a5 ("sparc: Use generic idle loop")
Reported-by: Fabio M. Di Nitto <fabbione@fabbione.net>
Reported-by: Jan Engelhardt <jengelh@inai.de>
Tested-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
David S. Miller [Mon, 24 Mar 2014 16:45:16 +0000 (12:45 -0400)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates

This series contains updates to igb, ixgbe, ixgbevf, i40e and i40evf.

Anjali provides a i40e/i40evf patch to add Energy Efficient Ethernet
Low Power Idle stats and a fix for i40e to change the string
"Side Band" to "Sideband" for consistency.

Mitch provides 2 patches for i40evf to fix if the driver encounters
an error while communicating with the PF driver, do not shut down the
admin queue unconditionally.  Add an error message when the admin
queue message never completes and fix formatting on another message
that was unnecessarily wrapped.

Mark provides a ixgbe patch and five ixgbevf patches.  Fix a possible
infinite recursion when an adapter is removed and registers all read
as all one's in ixgbe_clear_vmdq_generic() and ixgbe_clear_rar_generic().
Converts macros to static inline functions to align kernel coding standard
and prepare for adding Live Error Recovery (LER) to ixgbevf.  Change the
ethtool register test to use the normal register accessor functions and
eliminate macors used for calling register test functions to make error
exits more clear.  Checks all register reads for adapter removal by checking
the status register after any register read that returns all F's since the
status register will never return 0xFFFFFFFF unless the adapter is removed.

Jacob implements SIOCGHWTSTAMP ioctl for igb which enables user processes
to read the current hardware stamp config settings non-destructively.

Todd adds the initial register read and write for surprise removal (LER)
for igb.

Christian Engelmayer fixes an igb memory leak in the igb_get_module_eeprom()
error handling path.

Ken Ichikawa provides a fix for igb, specifically for 82575 hardware to
specify -1 to the phc_index for ethtool's get_ts_info, otherwise a wrong
value will be set to the phc_index.

Christopher Paasch fixes a null pointer dereference in igb and makes sure
to unset the HAS_MSIX flag when the driver falls back to MSI only.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipv4: remove ip_rt_dump from route.c
Li RongQing [Fri, 21 Mar 2014 03:33:10 +0000 (11:33 +0800)]
ipv4: remove ip_rt_dump from route.c

ip_rt_dump do nothing after IPv4 route caches removal, so we can remove it.

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoatheros/atlx: use SET_ETHTOOL_OPS directly
wangweidong [Fri, 21 Mar 2014 01:50:43 +0000 (09:50 +0800)]
atheros/atlx: use SET_ETHTOOL_OPS directly

As commit a6e28b34205b("staging/et131x: use SET_ETHTOOL_OPS
directly"), using a wrapper around SET_ETHTOOL_OPS macro is
not actually required, remove and use SET_ETHTOOL_OPS directly.

Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoAltera TSE: Correct two typos in original submission
Vince Bridgers [Fri, 21 Mar 2014 01:43:17 +0000 (20:43 -0500)]
Altera TSE: Correct two typos in original submission

This patch addresses two typos in the original driver submission. One derived
from a cut & paste error, and another is a misspelling.

Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoAltera TSE: Correct typecast issue detected by kbuild test robot
Vince Bridgers [Fri, 21 Mar 2014 01:43:16 +0000 (20:43 -0500)]
Altera TSE: Correct typecast issue detected by kbuild test robot

This patch addresses a portable pointer arithmetic issue in the
original submission found by the kbuild test robot.

config: make ARCH=i386 allyesconfig

   altera_sgdma.c: In function 'sgdma_txphysaddr':
>> altera_sgdma.c:393:33: warning: cast from
>> pointer to integer of different size [-Wpointer-to-int-cast]
     dma_addr_t offs = (dma_addr_t)((dma_addr_t)desc -
                                    ^
>> altera_sgdma.c:394:5: warning: cast from
>> pointer to integer of different size [-Wpointer-to-int-cast]
        (dma_addr_t)priv->tx_dma_desc);
        ^
   altera_sgdma.c: In function 'sgdma_rxphysaddr':
>> altera_sgdma.c:403:33: warning: cast from
>> pointer to integer of different size [-Wpointer-to-int-cast]
     dma_addr_t offs = (dma_addr_t)((dma_addr_t)desc -
                                    ^
>> altera_sgdma.c:404:5: warning: cast from
>> pointer to integer of different size [-Wpointer-to-int-cast]
        (dma_addr_t)priv->rx_dma_desc);
        ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoAltera TSE: Set version number by driver's get regs
Vince Bridgers [Fri, 21 Mar 2014 01:43:15 +0000 (20:43 -0500)]
Altera TSE: Set version number by driver's get regs

Set the version number returned by the driver's get regs routine
invoked by ethtool so formatting can be dependent on the version
number returned, and any interesting formatted output can check
the version number for specific types of register data returned.

Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'qlcnic-next'
David S. Miller [Mon, 24 Mar 2014 04:44:34 +0000 (00:44 -0400)]
Merge branch 'qlcnic-next'

Shahed Shaikh says:

====================
This patch series containes following changes -

* TSO over IPv4 and IPv6, Tx checksum offload for VXLAN
* Rx checksum offload for VXLAN and support for .ndo_{add|del}_vxlan_port
  netdev ops.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoqlcnic: Update version to 5.3.57
Shahed Shaikh [Fri, 21 Mar 2014 08:41:18 +0000 (04:41 -0400)]
qlcnic: Update version to 5.3.57

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoqlcnic: Add VXLAN Rx offload support
Shahed Shaikh [Fri, 21 Mar 2014 08:41:17 +0000 (04:41 -0400)]
qlcnic: Add VXLAN Rx offload support

This patch adds Rx checksum offload support for VXLAN.
Implements .ndo_{add|del}_vxlan_port netdev ops.
Adapter supports only one VXLAN port, so program adapter with
very first UDP port which VXLAN driver is listening to.

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoqlcnic: Add VXLAN Tx offload support
Shahed Shaikh [Fri, 21 Mar 2014 08:41:16 +0000 (04:41 -0400)]
qlcnic: Add VXLAN Tx offload support

This patch adds LSO, LSO6 and Tx checksum offload support for VXLAN
encapsulated packets on 83xx/84xx series adapters.

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agogianfar: Fix P1010 config regression (SQ polling)
Claudiu Manoil [Fri, 21 Mar 2014 07:33:17 +0000 (09:33 +0200)]
gianfar: Fix P1010 config regression (SQ polling)

The P1010 device tree restricts the number of
supported interrupt groups to 1, although the eth
controller can support 2 interrupt groups and the
driver assumes the Multi-Group mode ("fsl,etsec2" model).

So, in this case the assumption that the Multi-Group
mode (MQ_MG_MODE) devices always support 2 interrupt
groups is false.  To fix this, a check for the actual
number of interrupt groups enabled in the board's
device tree has been added in gfar_probe for the
"fsl,etsec2" devices.

Without this fix, P1010 based boards claim support for
2 Tx queues to the net stack but only one is actually
allocated, leading to NULL access in xmit.  This issue
was introduced by enabling Single-Queue polling for
the P1010 devices.
(71ff9e3 gianfar: Use Single-Queue polling for
"fsl,etsec2")

Fixes: 71ff9e3df7e1c5d3293af6b595309124e8c97412
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: micrel : ks8851-ml: add vdd-supply support
Nishanth Menon [Fri, 21 Mar 2014 06:52:48 +0000 (01:52 -0500)]
net: micrel : ks8851-ml: add vdd-supply support

Few platforms use external regulator to keep the ethernet MAC supplied.
So, request and enable the regulator for driver functionality.

Fixes: 66fda75f47dc (regulator: core: Replace direct ops->disable usage)
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Suggested-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipv4: remove ipv4_ifdown_dst from route.c
Li RongQing [Mon, 24 Mar 2014 03:03:10 +0000 (11:03 +0800)]
ipv4: remove ipv4_ifdown_dst from route.c

ipv4_ifdown_dst does nothing after IPv4 route caches removal,
so we can remove it.

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: optimize csum_replace2()
Eric Dumazet [Mon, 24 Mar 2014 02:51:36 +0000 (19:51 -0700)]
net: optimize csum_replace2()

When changing one 16bit value by another in IP header, we can adjust
the IP checksum by doing a simple operation described in RFC 1624, as
reminded by David.

csum_partial() is a complex function on x86_64, not really suited for
small number of checksummed bytes.

I spotted csum_partial() being in the top 20 most consuming functions
(more than 1 %) in a GRO workload, which was rather unexpected.

The caller was inet_gro_complete() doing a csum_replace2() when
building the new IP header for the GRO packet.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoparisc: locks: remove redundant arch_*_relax operations
Will Deacon [Fri, 21 Feb 2014 17:34:57 +0000 (17:34 +0000)]
parisc: locks: remove redundant arch_*_relax operations

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>
10 years agoparisc: wire up sys_utimes
Helge Deller [Sun, 23 Mar 2014 14:24:40 +0000 (15:24 +0100)]
parisc: wire up sys_utimes

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
10 years agoparisc: Remove unused CONFIG_PARISC_TMPALIAS code
John David Anglin [Sat, 1 Mar 2014 22:41:22 +0000 (17:41 -0500)]
parisc: Remove unused CONFIG_PARISC_TMPALIAS code

The attached change removes the unused and experimental
CONFIG_PARISC_TMPALIAS code. It doesn't work and I don't believe it will
ever be used.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
10 years agopartly revert commit 8a10bc9: parisc/sti_console: prefer Linux fonts over built-in...
Helge Deller [Sun, 23 Mar 2014 15:39:52 +0000 (16:39 +0100)]
partly revert commit 8a10bc9: parisc/sti_console: prefer Linux fonts over built-in ROM fonts

STI console is used on parisc and m68k HP machines. This patch partly reverts
my previous commit and as such restores the fonts for the m68k machines.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v3.13
10 years agorcuwalk: recheck mount_lock after mountpoint crossing attempts
Al Viro [Thu, 20 Mar 2014 19:18:22 +0000 (15:18 -0400)]
rcuwalk: recheck mount_lock after mountpoint crossing attempts

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>
10 years agomake prepend_name() work correctly when called with negative *buflen
Al Viro [Sun, 23 Mar 2014 04:28:40 +0000 (00:28 -0400)]
make prepend_name() work correctly when called with negative *buflen

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>
10 years agovfs: Don't let __fdget_pos() get FMODE_PATH files
Eric Biggers [Sun, 16 Mar 2014 20:47:48 +0000 (15:47 -0500)]
vfs: Don't let __fdget_pos() get FMODE_PATH files

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>