<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/ethernet/moxa, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-07-28T07:12:34Z</updated>
<entry>
<title>net: moxa: fix UAF in moxart_mac_probe</title>
<updated>2021-07-28T07:12:34Z</updated>
<author>
<name>Pavel Skripkin</name>
</author>
<published>2021-07-09T14:09:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=001e04bd5d48444917e7c3261d01e391803fcb55'/>
<id>urn:sha1:001e04bd5d48444917e7c3261d01e391803fcb55</id>
<content type='text'>
commit c78eaeebe855fd93f2e77142ffd0404a54070d84 upstream.

In case of netdev registration failure the code path will
jump to init_fail label:

init_fail:
	netdev_err(ndev, "init failed\n");
	moxart_mac_free_memory(ndev);
irq_map_fail:
	free_netdev(ndev);
	return ret;

So, there is no need to call free_netdev() before jumping
to error handling path, since it can cause UAF or double-free
bug.

Fixes: 6c821bd9edc9 ("net: Add MOXA ART SoCs ethernet driver")
Signed-off-by: Pavel Skripkin &lt;paskripkin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: moxa: Fix a potential double 'free_irq()'</title>
<updated>2020-05-20T06:11:42Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2020-04-26T20:59:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ad07995cd9bb354d4d6d3c9964519c67c3edbbf'/>
<id>urn:sha1:1ad07995cd9bb354d4d6d3c9964519c67c3edbbf</id>
<content type='text'>
[ Upstream commit ee8d2267f0e39a1bfd95532da3a6405004114b27 ]

Should an irq requested with 'devm_request_irq' be released explicitly,
it should be done by 'devm_free_irq()', not 'free_irq()'.

Fixes: 6c821bd9edc9 ("net: Add MOXA ART SoCs ethernet driver")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: moxa: fix an error code</title>
<updated>2020-05-10T08:26:13Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2016-03-02T10:11:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82272e6a256715474b081ac4cae80f8aa9eb2e02'/>
<id>urn:sha1:82272e6a256715474b081ac4cae80f8aa9eb2e02</id>
<content type='text'>
commit 1d3cd1773fddfdc9ffb0c2dec9a954c7a54bc207 upstream.

We accidentally return IS_ERR(priv-&gt;base) which is 1 instead of
PTR_ERR(priv-&gt;base) which is the error code.

Fixes: 6c821bd9edc9 ('net: Add MOXA ART SoCs ethernet driver')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>net: moxa: Fix module autoload for OF platform driver</title>
<updated>2015-09-21T23:09:02Z</updated>
<author>
<name>Luis de Bethencourt</name>
</author>
<published>2015-09-18T15:56:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ebd8ebf078879973d0e8d2642253c091c23bd7d2'/>
<id>urn:sha1:ebd8ebf078879973d0e8d2642253c091c23bd7d2</id>
<content type='text'>
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt &lt;luisbg@osg.samsung.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>drivers/net: remove all references to obsolete Ethernet-HOWTO</title>
<updated>2015-06-23T13:50:35Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2015-06-21T20:28:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=138b15ed877eff8149ae32c12fa1f4795c9cb4cf'/>
<id>urn:sha1:138b15ed877eff8149ae32c12fa1f4795c9cb4cf</id>
<content type='text'>
This howto made sense in the 1990s when users had to manually configure
ISA cards with jumpers or vendor utilities, but with the implementation
of PCI it became increasingly less and less relevant, to the point where
it has been well over a decade since I last updated it.  And there is
no value in anyone else taking over updating it either.

However the references to it continue to spread as boiler plate text
from one Kconfig file into the next.  We are not doing end users any
favours by pointing them at this old document, so lets kill it with
fire, once and for all, to hopefully stop any further spread.

No code is changed in this commit, just Kconfig help text.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: batch of last_rx update avoidance in ethernet drivers.</title>
<updated>2015-05-14T21:38:17Z</updated>
<author>
<name>françois romieu</name>
</author>
<published>2015-05-14T18:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4ffd3c730e7ba2eb53a427f1a2bba2eec5f2d97b'/>
<id>urn:sha1:4ffd3c730e7ba2eb53a427f1a2bba2eec5f2d97b</id>
<content type='text'>
None of those drivers uses last_rx for its own needs.

See 4dc89133f49b8cfd77ba7e83f5960aed63aaa99e ("net: add a comment on
netdev-&gt;last_rx") for reference.

Signed-off-by: Francois Romieu &lt;romieu@fr.zoreil.com&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: Zhangfei Gao &lt;zhangfei.gao@linaro.org&gt;
Cc: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Cc: Wingman Kwok &lt;w-kwok2@ti.com&gt;
Cc: Murali Karicheri &lt;m-karicheri2@ti.com&gt;
Cc: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethernet: codespell comment spelling fixes</title>
<updated>2015-03-09T02:54:22Z</updated>
<author>
<name>Joe Perches</name>
</author>
<published>2015-03-07T04:49:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dbedd44e982d61c156337b1a3fb252b24085f8e3'/>
<id>urn:sha1:dbedd44e982d61c156337b1a3fb252b24085f8e3</id>
<content type='text'>
To test a checkpatch spelling patch, I ran codespell against
drivers/net/ethernet/.

$ git ls-files drivers/net/ethernet/ | \
  while read file ; do \
    codespell -w $file; \
  done

I removed a false positive in e1000_hw.h

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ethernet: moxa: drop owner assignment from platform_drivers</title>
<updated>2014-10-20T14:21:10Z</updated>
<author>
<name>Wolfram Sang</name>
</author>
<published>2014-10-20T14:21:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8fc5fb43efb051297e579083c2f331e3e4a75f86'/>
<id>urn:sha1:8fc5fb43efb051297e579083c2f331e3e4a75f86</id>
<content type='text'>
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>net: ethernet: Remove superfluous ether_setup after alloc_etherdev</title>
<updated>2014-10-03T22:31:40Z</updated>
<author>
<name>Tobias Klauser</name>
</author>
<published>2014-10-02T08:15:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6a05880a8b22c6ba2ffdabbceb4635d28abe9072'/>
<id>urn:sha1:6a05880a8b22c6ba2ffdabbceb4635d28abe9072</id>
<content type='text'>
There is no need to call ether_setup after alloc_ethdev since it was
already called there.

Follow commits c706471b2601 ("net: axienet: remove unnecessary
ether_setup after alloc_etherdev") and 3c87dcbfb36c ("net: ll_temac:
Remove unnecessary ether_setup after alloc_etherdev") and fix the
pattern in all remaining ethernet drivers.

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: moxa: continue loop on skb allocation failure</title>
<updated>2014-08-26T00:25:39Z</updated>
<author>
<name>Jonas Jensen</name>
</author>
<published>2014-08-25T14:22:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b7890e757bc42f963c835521c2657bd16d7b7d6'/>
<id>urn:sha1:2b7890e757bc42f963c835521c2657bd16d7b7d6</id>
<content type='text'>
If netdev_alloc_skb_ip_align() fails, subsequent code will
try to dereference an invalid pointer.

Continue to next descriptor on error.

While we're at it,

1. eliminate the chance of an endless loop, replace the main
   loop with while(rx &lt; budget)

2. use napi_complete() and remove the explicit napi_gro_flush()

Signed-off-by: Jonas Jensen &lt;jonas.jensen@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
