The following patch (based on a patch from Stephen Hemminger
<shemminger@linux-foundation.org>) removes use after free conditions in
the unregister path for the bonding master. Without this patch, an
operation of the form "echo -bond0 > /sys/class/net/bonding_masters"
would trigger a NULL pointer dereference in sysfs. I was not able to
induce the failure with the non-sysfs code path, but for consistency I
updated that code as well.
I also did some testing of the bonding /proc file being open
while the bond is being deleted, and didn't see any problems there.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
t_jeang [Tue, 6 Jan 2009 12:06:04 +0000 (12:06 +0000)]
Add a new ioctl to /proc/xen/privcmd which allows domctls to be performed
without using the generic hypercall interface, so that they are available
on restricted fds.
This requires an unfortunate amount of fiddling with headers so that
XEN_GUEST_HANDLE_64 and uint64_aligned_t are available in kernel
space.
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
Watch the online node in the backend area, as well as the state node
in the frontend area, and fire the frontend state changed watch
whenever it changes. This allows us to catch the case where a device
shuts down in a domU and then gets xm detach'd from in dom0.
Otherwise, the backend doesn't shut down correctly, since online was
set when the frontend shut down and we don't get another kick when it
becomes unset.
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
There's no point in sending lots of little packets to a copying
receiver if we can instead arrange to copy them all into a single RX
buffer. We need to copy anyway, so there's no overhead here, and this
is a little bit easier on the receiving domain's network stack.
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
Ensure that packet csums are computed correctly when sending a GSO
packet to an interface which supports scatter-gather but not transmit
checksum offloads.
Signed-off-by: Steven Smith <ssmith@xensource.com>
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
[NETBACK] Try to pull a minimum of 72 bytes into the skb data area
when receiving a packet into netback. The previous number, 64, tended
to place a fragment boundary in the middle of the TCP header options
and led to unnecessary fragmentation in Windows <-> Windows
networking.
Signed-off-by: Steven Smith <ssmith@xensource.com>
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
It is possible for a frontend to generate a TSO request which doesn't
actually need segmentation (i.e. with size < MTU). Make sure this
doesn't crash the backend.
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
The Windows drivers push the network frontend to state Closed, then
Initialised, then Closed again as part of device disable. Make sure
the backend doesn't get stuck at closed.
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
Arrange that netback waits for the hotplug scripts to complete before
going to state Connected. WHQL gets quite upset if it sends packets
which don't arrive, and that can happen if our hotplug scripts are
slow and don't hook the network interface up to the bridge in time.
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
It turns out that Windows occasionally generates packets in which the
IP and TCP headers are in different fragments. Make sure that the
backends can handle this.
t_jeang [Tue, 6 Jan 2009 12:06:01 +0000 (12:06 +0000)]
Close block devices when the pv drivers take over and flush the buffer cache.
- close and free the block devices in qemu when we switch to pv drivers in
the guest
- use BLKFLSBUF to flush the buffer cache, both in qemu and in blkback
t_jeang [Tue, 6 Jan 2009 12:06:00 +0000 (12:06 +0000)]
Improve 3ware controller performance on certain motherboards.
https://bugzilla.redhat.com/show_bug.cgi?id=444759
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1e6c38cec08f88b0df88a34e80f15492cace74e9
NFS: Fix for bug in handling of errors for O_DIRECT writes
Commit eda3cef8dd2b83875affe82595db9d0c278879b2 ("NFS: Fix error
handling in nfs_direct_write_result()") ensured that if a WRITE returns
an error, then data->res.verf->committed is not tested (as it is not
initialised).
So move the test so that we never examine ->committed in an error case,
and fix a speeling error while we are there.
Cc: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de> Acked-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>