<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/net/atm, branch v3.8</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.8</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2012-12-18T04:50:51Z</updated>
<entry>
<title>atm: use scnprintf() instead of sprintf()</title>
<updated>2012-12-18T04:50:51Z</updated>
<author>
<name>chas williams - CONTRACTOR</name>
<email>chas@cmf.nrl.navy.mil</email>
</author>
<published>2012-12-17T06:00:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3c4177716cd2e452229dd0b7c25d192c48c1e7ac'/>
<id>urn:sha1:3c4177716cd2e452229dd0b7c25d192c48c1e7ac</id>
<content type='text'>
As reported by Chen Gang &lt;gang.chen@asianux.com&gt;, we should ensure there
is enough space when formatting the sysfs buffers.

Signed-off-by: Chas Williams &lt;chas@cmf.nrl.navy.mil&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>pppoatm: optimise PPP channel wakeups after sock_owned_by_user()</title>
<updated>2012-12-02T00:05:20Z</updated>
<author>
<name>David Woodhouse</name>
<email>David.Woodhouse@intel.com</email>
</author>
<published>2012-11-28T10:15:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5b4d72080f49498d2390563aa90f5bc31785406c'/>
<id>urn:sha1:5b4d72080f49498d2390563aa90f5bc31785406c</id>
<content type='text'>
We don't need to schedule the wakeup tasklet on *every* unlock; only if we
actually blocked the channel in the first place.

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Acked-by: Krzysztof Mazur &lt;krzysiek@podlesie.net&gt;
</content>
</entry>
<entry>
<title>br2684: allow assign only on a connected socket</title>
<updated>2012-12-02T00:05:19Z</updated>
<author>
<name>Krzysztof Mazur</name>
<email>krzysiek@podlesie.net</email>
</author>
<published>2012-11-28T08:08:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9eba25268e5862571d53122065616c456fe1142a'/>
<id>urn:sha1:9eba25268e5862571d53122065616c456fe1142a</id>
<content type='text'>
The br2684 does not check if used vcc is in connected state,
causing potential Oops in pppoatm_send() when vcc-&gt;send() is called
on not fully connected socket.

Now br2684 can be assigned only on connected sockets; otherwise
-EINVAL error is returned.

Signed-off-by: Krzysztof Mazur &lt;krzysiek@podlesie.net&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>br2684: fix module_put() race</title>
<updated>2012-12-02T00:05:16Z</updated>
<author>
<name>David Woodhouse</name>
<email>David.Woodhouse@intel.com</email>
</author>
<published>2012-11-28T00:46:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d71ffeb12378243babb2227acfed0c8d263e237e'/>
<id>urn:sha1:d71ffeb12378243babb2227acfed0c8d263e237e</id>
<content type='text'>
The br2684 code used module_put() during unassignment from vcc with
hope that we have BKL. This assumption is no longer true.

Now owner field in atmvcc is used to move this module_put()
to vcc_destroy_socket().

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Acked-by: Krzysztof Mazur &lt;krzysiek@podlesie.net&gt;
</content>
</entry>
<entry>
<title>pppoatm: fix missing wakeup in pppoatm_send()</title>
<updated>2012-12-02T00:05:15Z</updated>
<author>
<name>David Woodhouse</name>
<email>David.Woodhouse@intel.com</email>
</author>
<published>2012-11-28T00:05:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0e56d99a5b557c760394d6941d7d1fc8d279eff3'/>
<id>urn:sha1:0e56d99a5b557c760394d6941d7d1fc8d279eff3</id>
<content type='text'>
Now that we can return zero from pppoatm_send() for reasons *other* than
the queue being full, that means we can't depend on a subsequent call to
pppoatm_pop() waking the queue, and we might leave it stalled
indefinitely.

Use the -&gt;release_cb() callback to wake the queue after the sock is
unlocked.

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Acked-by: Krzysztof Mazur &lt;krzysiek@podlesie.net&gt;
</content>
</entry>
<entry>
<title>br2684: don't send frames on not-ready vcc</title>
<updated>2012-12-02T00:05:14Z</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw2@infradead.org</email>
</author>
<published>2012-11-27T23:28:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b89588531f1db93a218c108eee713ff6002a67bf'/>
<id>urn:sha1:b89588531f1db93a218c108eee713ff6002a67bf</id>
<content type='text'>
Avoid submitting packets to a vcc which is being closed. Things go badly
wrong when the -&gt;pop method gets later called after everything's been
torn down.

Use the ATM socket lock for synchronisation with vcc_destroy_socket(),
which clears the ATM_VF_READY bit under the same lock. Otherwise, we
could end up submitting a packet to the device driver even after its
-&gt;ops-&gt;close method has been called. And it could call the vcc's -&gt;pop
method after the protocol has been shut down. Which leads to a panic.

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Acked-by: Krzysztof Mazur &lt;krzysiek@podlesie.net&gt;
</content>
</entry>
<entry>
<title>atm: add release_cb() callback to vcc</title>
<updated>2012-12-02T00:05:12Z</updated>
<author>
<name>David Woodhouse</name>
<email>David.Woodhouse@intel.com</email>
</author>
<published>2012-11-28T00:03:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c971f08cba56ed17fe22040ca5ff97fe5c3f0bd7'/>
<id>urn:sha1:c971f08cba56ed17fe22040ca5ff97fe5c3f0bd7</id>
<content type='text'>
The immediate use case for this is that it will allow us to ensure that a
pppoatm queue is woken after it has to drop a packet due to the sock being
locked.

Note that 'release_cb' is called when the socket is *unlocked*. This is
not to be confused with vcc_release() — which probably ought to be called
vcc_close().

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Acked-by: Krzysztof Mazur &lt;krzysiek@podlesie.net&gt;
</content>
</entry>
<entry>
<title>pppoatm: do not inline pppoatm_may_send()</title>
<updated>2012-11-30T12:23:19Z</updated>
<author>
<name>Krzysztof Mazur</name>
<email>krzysiek@podlesie.net</email>
</author>
<published>2012-11-06T22:17:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=397ff16dce53888ec693b3718640be2560204751'/>
<id>urn:sha1:397ff16dce53888ec693b3718640be2560204751</id>
<content type='text'>
The pppoatm_may_send() is quite heavy and it's called three times
in pppoatm_send() and inlining costs more than 200 bytes of code
(more than 10% of total pppoatm driver code size).

add/remove: 1/0 grow/shrink: 0/1 up/down: 132/-367 (-235)
function                                     old     new   delta
pppoatm_may_send                               -     132    +132
pppoatm_send                                 900     533    -367

Signed-off-by: Krzysztof Mazur &lt;krzysiek@podlesie.net&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>pppoatm: drop frames to not-ready vcc</title>
<updated>2012-11-30T12:21:42Z</updated>
<author>
<name>Krzysztof Mazur</name>
<email>krzysiek@podlesie.net</email>
</author>
<published>2012-11-10T22:33:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=071d93931a75dc1f82f0baa9959613af81c5a032'/>
<id>urn:sha1:071d93931a75dc1f82f0baa9959613af81c5a032</id>
<content type='text'>
The vcc_destroy_socket() closes vcc before the protocol is detached
from vcc by calling vcc-&gt;push() with NULL skb. This leaves some time
window, where the protocol may call vcc-&gt;send() on closed vcc
and crash.

Now pppoatm_send(), like vcc_sendmsg(), checks for vcc flags that
indicate that vcc is not ready. If the vcc is not ready we just
drop frame. Queueing frames is much more complicated because we
don't have callbacks that inform us about vcc flags changes.

Signed-off-by: Krzysztof Mazur &lt;krzysiek@podlesie.net&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>pppoatm: take ATM socket lock in pppoatm_send()</title>
<updated>2012-11-28T00:37:05Z</updated>
<author>
<name>Krzysztof Mazur</name>
<email>krzysiek@podlesie.net</email>
</author>
<published>2012-11-06T22:17:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3ac108006fd7f20cb8fc8ea2287f1497bcda00a1'/>
<id>urn:sha1:3ac108006fd7f20cb8fc8ea2287f1497bcda00a1</id>
<content type='text'>
The pppoatm_send() does not take any lock that will prevent concurrent
vcc_sendmsg(). This causes two problems:

	- there is no locking between checking the send queue size
	  with atm_may_send() and incrementing sk_wmem_alloc,
	  and the real queue size can be a little higher than sk_sndbuf

	- the vcc-&gt;sendmsg() can be called concurrently. I'm not sure
	  if it's allowed. Some drivers (eni, nicstar, ...) seem
	  to assume it will never happen.

Now pppoatm_send() takes ATM socket lock, the same that is used
in vcc_sendmsg() and other ATM socket functions. The pppoatm_send()
is called with BH disabled, so bh_lock_sock() is used instead
of lock_sock().

Signed-off-by: Krzysztof Mazur &lt;krzysiek@podlesie.net&gt;
Cc: Chas Williams - CONTRACTOR &lt;chas@cmf.nrl.navy.mil&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
</feed>
