<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net, branch v3.12.16</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net?h=v3.12.16</id>
<link rel='self' href='https://git.amat.us/linux/atom/net?h=v3.12.16'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-03-31T12:22:36Z</updated>
<entry>
<title>libceph: fix preallocation check in get_reply()</title>
<updated>2014-03-31T12:22:36Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>ilya.dryomov@inktank.com</email>
</author>
<published>2014-01-09T18:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4c3280ca0ee91125e8f086d33d879065222d6daa'/>
<id>urn:sha1:4c3280ca0ee91125e8f086d33d879065222d6daa</id>
<content type='text'>
commit f2be82b0058e90b5d9ac2cb896b4914276fb50ef upstream.

The check that makes sure that we have enough memory allocated to read
in the entire header of the message in question is currently busted.
It compares front_len of the incoming message with iov_len field of
ceph_msg::front structure, which is used primarily to indicate the
amount of data already read in, and not the size of the allocated
buffer.  Under certain conditions (e.g. a short read from a socket
followed by that socket's shutdown and owning ceph_connection reset)
this results in a warning similar to

[85688.975866] libceph: get_reply front 198 &gt; preallocated 122 (4#0)

and, through another bug, leads to forever hung tasks and forced
reboots.  Fix this by comparing front_len with front_alloc_len field of
struct ceph_msg, which stores the actual size of the buffer.

Fixes: http://tracker.ceph.com/issues/5425

Signed-off-by: Ilya Dryomov &lt;ilya.dryomov@inktank.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>libceph: rename front to front_len in get_reply()</title>
<updated>2014-03-31T12:22:35Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>ilya.dryomov@inktank.com</email>
</author>
<published>2014-01-09T18:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ed0d7f08ff8b76555525a9ee61d8eed2796594c2'/>
<id>urn:sha1:ed0d7f08ff8b76555525a9ee61d8eed2796594c2</id>
<content type='text'>
commit 3f0a4ac55fe036902e3666be740da63528ad8639 upstream.

Rename front local variable to front_len in get_reply() to make its
purpose more clear.

Signed-off-by: Ilya Dryomov &lt;ilya.dryomov@inktank.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>libceph: rename ceph_msg::front_max to front_alloc_len</title>
<updated>2014-03-31T12:22:35Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>ilya.dryomov@inktank.com</email>
</author>
<published>2014-01-09T18:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7335817378e3e4c3325c65b0e15b2918cc04f5c1'/>
<id>urn:sha1:7335817378e3e4c3325c65b0e15b2918cc04f5c1</id>
<content type='text'>
commit 3cea4c3071d4e55e9d7356efe9d0ebf92f0c2204 upstream.

Rename front_max field of struct ceph_msg to front_alloc_len to make
its purpose more clear.

Signed-off-by: Ilya Dryomov &lt;ilya.dryomov@inktank.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>libceph: resend all writes after the osdmap loses the full flag</title>
<updated>2014-03-31T12:22:27Z</updated>
<author>
<name>Josh Durgin</name>
<email>josh.durgin@inktank.com</email>
</author>
<published>2013-12-10T17:35:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fcd6ba0f80c3b3fcad379e622a97477ae7065a71'/>
<id>urn:sha1:fcd6ba0f80c3b3fcad379e622a97477ae7065a71</id>
<content type='text'>
commit 9a1ea2dbff11547a8e664f143c1ffefc586a577a upstream.

With the current full handling, there is a race between osds and
clients getting the first map marked full. If the osd wins, it will
return -ENOSPC to any writes, but the client may already have writes
in flight. This results in the client getting the error and
propagating it up the stack. For rbd, the block layer turns this into
EIO, which can cause corruption in filesystems above it.

To avoid this race, osds are being changed to drop writes that came
from clients with an osdmap older than the last osdmap marked full.
In order for this to work, clients must resend all writes after they
encounter a full -&gt; not full transition in the osdmap. osds will wait
for an updated map instead of processing a request from a client with
a newer map, so resent writes will not be dropped by the osd unless
there is another not full -&gt; full transition.

This approach requires both osds and clients to be fixed to avoid the
race. Old clients talking to osds with this fix may hang instead of
returning EIO and potentially corrupting an fs. New clients talking to
old osds have the same behavior as before if they encounter this race.

Fixes: http://tracker.ceph.com/issues/6938

Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Josh Durgin &lt;josh.durgin@inktank.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>libceph: block I/O when PAUSE or FULL osd map flags are set</title>
<updated>2014-03-31T12:22:27Z</updated>
<author>
<name>Josh Durgin</name>
<email>josh.durgin@inktank.com</email>
</author>
<published>2013-12-03T03:11:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7388cfc1876b7caf0747d6864b74e7bef59a4ad2'/>
<id>urn:sha1:7388cfc1876b7caf0747d6864b74e7bef59a4ad2</id>
<content type='text'>
commit d29adb34a94715174c88ca93e8aba955850c9bde upstream.

The PAUSEWR and PAUSERD flags are meant to stop the cluster from
processing writes and reads, respectively. The FULL flag is set when
the cluster determines that it is out of space, and will no longer
process writes.  PAUSEWR and PAUSERD are purely client-side settings
already implemented in userspace clients. The osd does nothing special
with these flags.

When the FULL flag is set, however, the osd responds to all writes
with -ENOSPC. For cephfs, this makes sense, but for rbd the block
layer translates this into EIO.  If a cluster goes from full to
non-full quickly, a filesystem on top of rbd will not behave well,
since some writes succeed while others get EIO.

Fix this by blocking any writes when the FULL flag is set in the osd
client. This is the same strategy used by userspace, so apply it by
default.  A follow-on patch makes this configurable.

__map_request() is called to re-target osd requests in case the
available osds changed.  Add a paused field to a ceph_osd_request, and
set it whenever an appropriate osd map flag is set.  Avoid queueing
paused requests in __map_request(), but force them to be resent if
they become unpaused.

Also subscribe to the next osd map from the monitor if any of these
flags are set, so paused requests can be unblocked as soon as
possible.

Fixes: http://tracker.ceph.com/issues/6079

Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Josh Durgin &lt;josh.durgin@inktank.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>net: unix socket code abuses csum_partial</title>
<updated>2014-03-24T08:45:00Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2014-03-05T03:29:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fec89336c8ee13b65d2c982b81a8b6df48656497'/>
<id>urn:sha1:fec89336c8ee13b65d2c982b81a8b6df48656497</id>
<content type='text'>
commit 0a13404dd3bf4ea870e3d96270b5a382edca85c0 upstream.

The unix socket code is using the result of csum_partial to
hash into a lookup table:

	unix_hash_fold(csum_partial(sunaddr, len, 0));

csum_partial is only guaranteed to produce something that can be
folded into a checksum, as its prototype explains:

 * returns a 32-bit number suitable for feeding into itself
 * or csum_tcpudp_magic

The 32bit value should not be used directly.

Depending on the alignment, the ppc64 csum_partial will return
different 32bit partial checksums that will fold into the same
16bit checksum.

This difference causes the following testcase (courtesy of
Gustavo) to sometimes fail:

#include &lt;sys/socket.h&gt;
#include &lt;stdio.h&gt;

int main()
{
	int fd = socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0);

	int i = 1;
	setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &amp;i, 4);

	struct sockaddr addr;
	addr.sa_family = AF_LOCAL;
	bind(fd, &amp;addr, 2);

	listen(fd, 128);

	struct sockaddr_storage ss;
	socklen_t sslen = (socklen_t)sizeof(ss);
	getsockname(fd, (struct sockaddr*)&amp;ss, &amp;sslen);

	fd = socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0);

	if (connect(fd, (struct sockaddr*)&amp;ss, sslen) == -1){
		perror(NULL);
		return 1;
	}
	printf("OK\n");
	return 0;
}

As suggested by davem, fix this by using csum_fold to fold the
partial 32bit checksum into a 16bit checksum before using it.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>mac80211: clear sequence/fragment number in QoS-null frames</title>
<updated>2014-03-22T21:01:49Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2014-03-04T12:46:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7ab2a354488958130248f17231c57cdd41d45ce8'/>
<id>urn:sha1:7ab2a354488958130248f17231c57cdd41d45ce8</id>
<content type='text'>
commit 864a6040f395464003af8dd0d8ca86fed19866d4 upstream.

Avoid leaking data by sending uninitialized memory and setting an
invalid (non-zero) fragment number (the sequence number is ignored
anyway) by setting the seq_ctrl field to zero.

Fixes: 3f52b7e328c5 ("mac80211: mesh power save basics")
Fixes: ce662b44ce22 ("mac80211: send (QoS) Null if no buffered frames")
Reviewed-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>mac80211: fix association to 20/40 MHz VHT networks</title>
<updated>2014-03-22T21:01:49Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2014-02-27T19:47:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=11be9f31e94a196fefb37be1bd00baeaefbe7274'/>
<id>urn:sha1:11be9f31e94a196fefb37be1bd00baeaefbe7274</id>
<content type='text'>
commit cb664981607a6b5b3d670ad57bbda893b2528d96 upstream.

When a VHT network uses 20 or 40 MHz as per the HT operation
information, the channel center frequency segment 0 field in
the VHT operation information is reserved, so ignore it.

This fixes association with such networks when the AP puts 0
into the field, previously we'd disconnect due to an invalid
channel with the message
wlan0: AP VHT information is invalid, disable VHT

Fixes: f2d9d270c15ae ("mac80211: support VHT association")
Reported-by: Tim Nelson &lt;tim.l.nelson@gmail.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>mac80211: don't validate unchanged AP bandwidth while tracking</title>
<updated>2014-03-22T21:01:49Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2014-02-21T19:34:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4032900fb38c1c7436f0b216a6687fc96c989f5d'/>
<id>urn:sha1:4032900fb38c1c7436f0b216a6687fc96c989f5d</id>
<content type='text'>
commit 963a1852fbac4f75a2d938fa2e734ef1e6d4c044 upstream.

The MLME code in mac80211 must track whether or not the AP changed
bandwidth, but if there's no change while tracking it shouldn't do
anything, otherwise regulatory updates can make it impossible to
connect to certain APs if the regulatory database doesn't match the
information from the AP. See the precise scenario described in the
code.

This still leaves some possible problems with CSA or if the AP
actually changed bandwidth, but those cases are less common and
won't completely prevent using it.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=70881

Reported-and-tested-by: Nate Carlson &lt;kernel@natecarlson.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>mac80211: fix AP powersave TX vs. wakeup race</title>
<updated>2014-03-22T21:01:49Z</updated>
<author>
<name>Emmanuel Grumbach</name>
<email>emmanuel.grumbach@intel.com</email>
</author>
<published>2014-02-20T07:22:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=58d4310586466840dab77e56e53f4508853a5268'/>
<id>urn:sha1:58d4310586466840dab77e56e53f4508853a5268</id>
<content type='text'>
commit 1d147bfa64293b2723c4fec50922168658e613ba upstream.

There is a race between the TX path and the STA wakeup: while
a station is sleeping, mac80211 buffers frames until it wakes
up, then the frames are transmitted. However, the RX and TX
path are concurrent, so the packet indicating wakeup can be
processed while a packet is being transmitted.

This can lead to a situation where the buffered frames list
is emptied on the one side, while a frame is being added on
the other side, as the station is still seen as sleeping in
the TX path.

As a result, the newly added frame will not be send anytime
soon. It might be sent much later (and out of order) when the
station goes to sleep and wakes up the next time.

Additionally, it can lead to the crash below.

Fix all this by synchronising both paths with a new lock.
Both path are not fastpath since they handle PS situations.

In a later patch we'll remove the extra skb queue locks to
reduce locking overhead.

BUG: unable to handle kernel
NULL pointer dereference at 000000b0
IP: [&lt;ff6f1791&gt;] ieee80211_report_used_skb+0x11/0x3e0 [mac80211]
*pde = 00000000
Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
EIP: 0060:[&lt;ff6f1791&gt;] EFLAGS: 00210282 CPU: 1
EIP is at ieee80211_report_used_skb+0x11/0x3e0 [mac80211]
EAX: e5900da0 EBX: 00000000 ECX: 00000001 EDX: 00000000
ESI: e41d00c0 EDI: e5900da0 EBP: ebe458e4 ESP: ebe458b0
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
CR0: 8005003b CR2: 000000b0 CR3: 25a78000 CR4: 000407d0
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400
Process iperf (pid: 3934, ti=ebe44000 task=e757c0b0 task.ti=ebe44000)
iwlwifi 0000:02:00.0: I iwl_pcie_enqueue_hcmd Sending command LQ_CMD (#4e), seq: 0x0903, 92 bytes at 3[3]:9
Stack:
 e403b32c ebe458c4 00200002 00200286 e403b338 ebe458cc c10960bb e5900da0
 ff76a6ec ebe458d8 00000000 e41d00c0 e5900da0 ebe458f0 ff6f1b75 e403b210
 ebe4598c ff723dc1 00000000 ff76a6ec e597c978 e403b758 00000002 00000002
Call Trace:
 [&lt;ff6f1b75&gt;] ieee80211_free_txskb+0x15/0x20 [mac80211]
 [&lt;ff723dc1&gt;] invoke_tx_handlers+0x1661/0x1780 [mac80211]
 [&lt;ff7248a5&gt;] ieee80211_tx+0x75/0x100 [mac80211]
 [&lt;ff7249bf&gt;] ieee80211_xmit+0x8f/0xc0 [mac80211]
 [&lt;ff72550e&gt;] ieee80211_subif_start_xmit+0x4fe/0xe20 [mac80211]
 [&lt;c149ef70&gt;] dev_hard_start_xmit+0x450/0x950
 [&lt;c14b9aa9&gt;] sch_direct_xmit+0xa9/0x250
 [&lt;c14b9c9b&gt;] __qdisc_run+0x4b/0x150
 [&lt;c149f732&gt;] dev_queue_xmit+0x2c2/0xca0

Reported-by: Yaara Rozenblum &lt;yaara.rozenblum@intel.com&gt;
Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
Reviewed-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
[reword commit log, use a separate lock]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
</feed>
