aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-10-19tproxy: copy transparent flag when creating a time waitKOVACS Krisztian1-0/+1
The transparent socket option setting was not copied to the time wait socket when an inet socket was being replaced by a time wait socket. This broke the --transparent option of the socket match and may have caused that FIN packets belonging to sockets in FIN_WAIT2 or TIME_WAIT state were being dropped by the packet filter. Signed-off-by: KOVACS Krisztian <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-19pptp: fix skb leak in pptp_xmit()Eric Dumazet1-0/+2
In case we cant transmit skb, we must free it Signed-off-by: Eric Dumazet <[email protected]> CC: Dmitry Kozlov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-19bonding: use local function pointer of bond->recv_probe in bond_handle_frameMitsuo Hayasaka1-2/+5
The bond->recv_probe is called in bond_handle_frame() when a packet is received, but bond_close() sets it to NULL. So, a panic occurs when both functions work in parallel. Why this happen: After null pointer check of bond->recv_probe, an sk_buff is duplicated and bond->recv_probe is called in bond_handle_frame. So, a panic occurs when bond_close() is called between the check and call of bond->recv_probe. Patch: This patch uses a local function pointer of bond->recv_probe in bond_handle_frame(). So, it can avoid the null pointer dereference. Signed-off-by: Mitsuo Hayasaka <[email protected]> Cc: Jay Vosburgh <[email protected]> Cc: Andy Gospodarek <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: WANG Cong <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-19smsc911x: Add support for SMSC LAN89218Phil Edworthy1-0/+2
LAN89218 is register compatible with LAN911x. Signed-off-by: Phil Edworthy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-18tg3: negate USE_PHYLIB flag checkJiri Pirko1-1/+1
USE_PHYLIB flag in tg3_remove_one() is being checked incorrectly. This results tg3_phy_fini->phy_disconnect is never called and when tg3 module is removed. In my case this resulted in panics in phy_state_machine calling function phydev->adjust_link. So correct this check. Signed-off-by: Jiri Pirko <[email protected]> Acked-by: Matt Carlson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-18netconsole: enable netconsole can make net_device refcnt incorrentGao feng1-0/+5
There is no check if netconsole is enabled current. so when exec echo 1 > enabled; the reference of net_device will increment always. Signed-off-by: Gao feng <[email protected]> Acked-by: Flavio Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-18bluetooth: Properly clone LSM attributes to newly created child connectionsPaul Moore4-1/+12
The Bluetooth stack has internal connection handlers for all of the various Bluetooth protocols, and unfortunately, they are currently lacking the LSM hooks found in the core network stack's connection handlers. I say unfortunately, because this can cause problems for users who have have an LSM enabled and are using certain Bluetooth devices. See one problem report below: * http://bugzilla.redhat.com/show_bug.cgi?id=741703 In order to keep things simple at this point in time, this patch fixes the problem by cloning the parent socket's LSM attributes to the newly created child socket. If we decide we need a more elaborate LSM marking mechanism for Bluetooth (I somewhat doubt this) we can always revisit this decision in the future. Reported-by: James M. Cape <[email protected]> Signed-off-by: Paul Moore <[email protected]> Acked-by: James Morris <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-18l2tp: fix a potential skb leak in l2tp_xmit_skb()Eric Dumazet1-1/+3
l2tp_xmit_skb() can leak one skb if skb_cow_head() returns an error. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-18bridge: fix hang on removal of bridge via netlinkstephen hemminger3-4/+7
Need to cleanup bridge device timers and ports when being bridge device is being removed via netlink. This fixes the problem of observed when doing: ip link add br0 type bridge ip link set dev eth1 master br0 ip link set br0 up ip link del br0 which would cause br0 to hang in unregister_netdev because of leftover reference count. Reported-by: Sridhar Samudrala <[email protected]> Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Sridhar Samudrala <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-18cputimer: Cure lock inversionPeter Zijlstra1-3/+4
There's a lock inversion between the cputimer->lock and rq->lock; notably the two callchains involved are: update_rlimit_cpu() sighand->siglock set_process_cpu_timer() cpu_timer_sample_group() thread_group_cputimer() cputimer->lock thread_group_cputime() task_sched_runtime() ->pi_lock rq->lock scheduler_tick() rq->lock task_tick_fair() update_curr() account_group_exec() cputimer->lock Where the first one is enabling a CLOCK_PROCESS_CPUTIME_ID timer, and the second one is keeping up-to-date. This problem was introduced by e8abccb7193 ("posix-cpu-timers: Cure SMP accounting oddities"). Cure the problem by removing the cputimer->lock and rq->lock nesting, this leaves concurrent enablers doing duplicate work, but the time wasted should be on the same order otherwise wasted spinning on the lock and the greater-than assignment filter should ensure we preserve monotonicity. Reported-by: Dave Jones <[email protected]> Reported-by: Simon Kirby <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: [email protected] Cc: Linus Torvalds <[email protected]> Cc: Martin Schwidefsky <[email protected]> Link: http://lkml.kernel.org/r/1318928713.21167.4.camel@twins Signed-off-by: Thomas Gleixner <[email protected]>
2011-10-18drm/radeon/kms/DCE4.1: fix Select_CrtcSource EncodeMode setting for DP ↵Alex Deucher1-1/+11
bridges (v2) Settings in this table reflect the physical panel/connector rather than the internal dig encoding. v2: fix typo for DRM_MODE_CONNECTOR_VGA case. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-18drm/radeon/kms/DCE4.1: ss is not supported on the internal ppllsAlex Deucher1-1/+1
It's handled via external clock. It should already be protected by the external ss flag, but add an explicit check just in case. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-18drm/radeon/kms/DCE4.1: fix dig encoder to transmitter mappingAlex Deucher1-4/+9
llano has fully routeable dig encoders similar to DCE3.2 while ontario has a hardcoded mapping similar to DCE4.0. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-18ALSA: HDA: conexant support for Lenovo T520/W520Daniel Suchy1-0/+1
This is patch for Conexant codec of Intel HDA driver, adding new quirk for Lenovo Thinkpad T520 and W520. Conexant autodetection works fine for T520 (similar subsystem ID is used also in W520 model) and detects more mixer features compared to generic (fallback) Lenovo quirk with hardcoded options in Conexant codec. Patch was activelly tested with Linux 3.0.4, 3.0.6 and 3.0.7 without any problems. Signed-off-by: Daniel Suchy <[email protected]> Cc: <[email protected]> [3.0+] Signed-off-by: Takashi Iwai <[email protected]>
2011-10-18ALSA: hda - Add position_fix quirk for Dell Inspiron 1010Takashi Iwai1-0/+1
The previous fix for the position-buffer check gives yet another regression on a Dell laptop. The safest fix right now is to add a static quirk for this device (and better to apply it for stable kernels too). Reported-by: Éric Piel <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2011-10-18ttm: Fix error-path using an uninitialized valueThomas Hellstrom1-1/+1
Pointed out by Michel Daenzer. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-17Linux 3.1-rc10Linus Torvalds1-1/+1
2011-10-17Merge branch 'nf' of git://1984.lsi.us.es/netDavid S. Miller4-53/+89
2011-10-17x25: Prevent skb overreads when checking call user dataMatthew Daley1-1/+2
x25_find_listener does not check that the amount of call user data given in the skb is big enough in per-socket comparisons, hence buffer overreads may occur. Fix this by adding a check. Signed-off-by: Matthew Daley <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Andrew Hendry <[email protected]> Cc: stable <[email protected]> Acked-by: Andrew Hendry <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-17x25: Handle undersized/fragmented skbsMatthew Daley6-17/+87
There are multiple locations in the X.25 packet layer where a skb is assumed to be of at least a certain size and that all its data is currently available at skb->data. These assumptions are not checked, hence buffer overreads may occur. Use pskb_may_pull to check these minimal size assumptions and ensure that data is available at skb->data when necessary, as well as use skb_copy_bits where needed. Signed-off-by: Matthew Daley <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Andrew Hendry <[email protected]> Cc: stable <[email protected]> Acked-by: Andrew Hendry <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-17x25: Validate incoming call user data lengthsMatthew Daley2-0/+9
X.25 call user data is being copied in its entirety from incoming messages without consideration to the size of the destination buffers, leading to possible buffer overflows. Validate incoming call user data lengths before these copies are performed. It appears this issue was noticed some time ago, however nothing seemed to come of it: see http://www.spinics.net/lists/linux-x25/msg00043.html and commit 8db09f26f912f7c90c764806e804b558da520d4f. Signed-off-by: Matthew Daley <[email protected]> Acked-by: Eric Dumazet <[email protected]> Tested-by: Andrew Hendry <[email protected]> Cc: stable <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-17udplite: fast-path computation of checksum coverageGerrit Renker1-32/+31
Commit 903ab86d195cca295379699299c5fc10beba31c7 of 1 March this year ("udp: Add lockless transmit path") introduced a new fast TX path that broke the checksum coverage computation of UDP-lite, which so far depended on up->len (only set if the socket is locked and 0 in the fast path). Fixed by providing both fast- and slow-path computation of checksum coverage. The latter can be removed when UDP(-lite)v6 also uses a lockless transmit path. Reported-by: Thomas Volkert <[email protected]> Signed-off-by: Gerrit Renker <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-17Avoid using variable-length arrays in kernel/sys.cLinus Torvalds1-1/+1
The size is always valid, but variable-length arrays generate worse code for no good reason (unless the function happens to be inlined and the compiler sees the length for the simple constant it is). Also, there seems to be some code generation problem on POWER, where Henrik Bakken reports that register r28 can get corrupted under some subtle circumstances (interrupt happening at the wrong time?). That all indicates some seriously broken compiler issues, but since variable length arrays are bad regardless, there's little point in trying to chase it down. "Just don't do that, then". Reported-by: Henrik Grindal Bakken <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
2011-10-16Merge branch 'fixes' of ↵Linus Torvalds4-3/+11
http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm * 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: ARM: 7128/1: vic: Don't write to the read-only register VIC_IRQ_STATUS ARM: 7122/1: localtimer: add header linux/errno.h explicitly ARM: 7117/1: perf: fix HW_CACHE_* events on Cortex-A9 ARM: 7113/1: mm: Align bank start to MAX_ORDER_NR_PAGES
2011-10-15ARM: 7128/1: vic: Don't write to the read-only register VIC_IRQ_STATUSZoltan Devai1-1/+0
This is unneeded and causes an abort on the SPMP8000 platform. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Zoltan Devai <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-10-15ARM: 7122/1: localtimer: add header linux/errno.h explicitlyShawn Guo1-0/+2
Per the text in Documentation/SubmitChecklist as below, we should explicitly have header linux/errno.h in localtimer.h for ENXIO reference. 1: If you use a facility then #include the file that defines/declares that facility. Don't depend on other header files pulling in ones that you use. Otherwise, we may run into some compiling error like the following one, if any file includes localtimer.h without CONFIG_LOCAL_TIMERS defined. arch/arm/include/asm/localtimer.h: In function ‘local_timer_setup’: arch/arm/include/asm/localtimer.h:53:10: error: ‘ENXIO’ undeclared (first use in this function) Signed-off-by: Shawn Guo <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-10-15ARM: 7117/1: perf: fix HW_CACHE_* events on Cortex-A9Will Deacon1-2/+2
Using COHERENT_LINE_{MISS,HIT} for cache misses and references respectively is completely wrong. Instead, use the L1D events which are a better and more useful approximation despite ignoring instruction traffic. Reported-by: Alasdair Grant <[email protected]> Reported-by: Matt Horsnell <[email protected]> Reported-by: Michael Williams <[email protected]> Cc: [email protected] Cc: Jean Pihet <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-10-15Merge branch 'hwmon-for-linus' of ↵Linus Torvalds1-4/+11
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (w83627ehf) Properly report thermal diode sensors
2011-10-14intel-iommu: Export a flag indicating that the IOMMU is used for iGFX.David Woodhouse1-10/+15
We really don't want this to work in the general case; device drivers *shouldn't* care whether they are behind an IOMMU or not. But the integrated graphics is a special case, because the IOMMU and the GTT are all kind of smashed into one and generally horrifically buggy, so it's reasonable for the graphics driver to want to know when the IOMMU is active for the graphics hardware. Signed-off-by: David Woodhouse <[email protected]>
2011-10-14intel-iommu: Workaround IOTLB hang on Ironlake GPUDavid Woodhouse1-1/+5
To work around a hardware issue, we have to submit IOTLB flushes while the graphics engine is idle. The graphics driver will (we hope) go to great lengths to ensure that it gets that right on the affected chipset(s)... so let's not screw it over by deferring the unmap and doing it later. That wouldn't be very helpful. Signed-off-by: David Woodhouse <[email protected]>
2011-10-14Merge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2-1/+2
* 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6: gpio-pca953x: fix gpio_base gpio/omap: fix build error with certain OMAP1 configs
2011-10-14Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfsLinus Torvalds8-62/+69
* 'for-linus' of git://oss.sgi.com/xfs/xfs: xfs: revert to using a kthread for AIL pushing xfs: force the log if we encounter pinned buffers in .iop_pushbuf xfs: do not update xa_last_pushed_lsn for locked items
2011-10-14Merge branch 'stable' of git://github.com/cmetcalf-tilera/linux-tileLinus Torvalds2-2/+2
* 'stable' of git://github.com/cmetcalf-tilera/linux-tile: tile: revert change from <asm/atomic.h> to <linux/atomic.h> in asm files
2011-10-14Merge branch 'x86-urgent-for-linus' of git://tesla.tglx.de/git/linux-2.6-tipLinus Torvalds2-4/+5
* 'x86-urgent-for-linus' of git://tesla.tglx.de/git/linux-2.6-tip: x86: Default to vsyscall=native for now
2011-10-14x86, mrst: use a temporary variable for SFI irqMika Westerberg1-10/+12
SFI tables reside in RAM and should not be modified once they are written. Current code went to set pentry->irq to zero which causes subsequent reads to fail with invalid SFI table checksum. This will break kexec as the second kernel fails to validate SFI tables. To fix this we use temporary variable for irq number. Signed-off-by: Mika Westerberg <[email protected]> Reviewed-by: Kirill A. Shutemov <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
2011-10-13hwmon: (w83627ehf) Properly report thermal diode sensorsJean Delvare1-4/+11
The w83627ehf driver is improperly reporting thermal diode sensors as type 2, instead of 3. This caused "sensors" and possibly other monitoring tools to report these sensors as "transistor" instead of "thermal diode". Furthermore, diode subtype selection (CPU vs. external) is only supported by the original W83627EHF/EHG. All later models only support CPU diode type, and some (NCT6776F) don't even have the register in question so we should avoid reading from it. Signed-off-by: Jean Delvare <[email protected]> Cc: [email protected] Signed-off-by: Guenter Roeck <[email protected]>
2011-10-13gpio-pca953x: fix gpio_baseHartmut Knaack1-0/+1
gpio_base was set to 0 if no system platform data or open firmware platform data was provided. This led to conflicts, if any other gpiochip with a gpiobase of 0 was instantiated already. Setting it to -1 will automatically use the first one available. Signed-off-by: Hartmut Knaack <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2011-10-13gpio/omap: fix build error with certain OMAP1 configsJanusz Krzysztofik1-1/+1
With commit f64ad1a0e21a, "gpio/omap: cleanup _set_gpio_wakeup(), remove ifdefs", access to build time conditionally omitted 'suspend_wakeup' member of the 'gpio_bank' structure has been placed unconditionally in function _set_gpio_wakeup(), which is always built. This resulted in the driver compilation broken for certain OMAP1, i.e., non-OMAP16xx, configurations. Really required or not in previously excluded cases, define this structure member unconditionally as a fix. Tested with a custom OMAP1510 only configuration. Signed-off-by: Janusz Krzysztofik <[email protected]> Acked-by: Kevin Hilman <[email protected]> Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2011-10-13tile: revert change from <asm/atomic.h> to <linux/atomic.h> in asm filesChris Metcalf2-2/+2
The 32-bit TILEPro support uses some #defines in <asm/atomic_32.h> for atomic support routines in assembly. To make this more explicit, I've turned those includes into includes of <asm/atomic_32.h>, which should hopefully make it clear that they shouldn't be bombed into <linux/atomic.h> in any cleanups. Signed-off-by: Chris Metcalf <[email protected]>
2011-10-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds5-13/+25
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: mscan: too much data copied to CAN frame due to 16 bit accesses gro: refetch inet6_protos[] after pulling ext headers bnx2x: fix cl_id allocation for non-eth clients for NPAR mode mlx4_en: fix endianness with blue frame support
2011-10-13ide: Fix file references in drivers/ide/Johann Felix Soden1-12/+12
Fix file references in drivers/ide/ There are a lot of file references to now moved or deleted files in the whole tree, especially in documentation and Kconfig files. This patch fixes the references in drivers/ide/. Signed-off-by: Johann Felix Soden <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-10-13Merge branch 'btrfs-3.0' of git://github.com/chrismason/linuxLinus Torvalds1-1/+10
* 'btrfs-3.0' of git://github.com/chrismason/linux: Btrfs: make sure not to defrag extents past i_size Btrfs: fix recursive auto-defrag
2011-10-12sparc: Avoid calling sigprocmask()David S. Miller3-3/+3
Use set_current_blocked() instead. Signed-off-by: David S. Miller <[email protected]>
2011-10-12sparc: Use set_current_blocked()Matt Fleming3-49/+30
As described in e6fa16ab ("signal: sigprocmask() should do retarget_shared_pending()") the modification of current->blocked is incorrect as we need to check whether the signal we're about to block is pending in the shared queue. Cc: Oleg Nesterov <[email protected]> Cc: "David S. Miller" <[email protected]> Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-12IPVS netns shutdown/startup dead-lockHans Schillstrom3-51/+87
ip_vs_mutext is used by both netns shutdown code and startup and both implicit uses sk_lock-AF_INET mutex. cleanup CPU-1 startup CPU-2 ip_vs_dst_event() ip_vs_genl_set_cmd() sk_lock-AF_INET __ip_vs_mutex sk_lock-AF_INET __ip_vs_mutex * DEAD LOCK * A new mutex placed in ip_vs netns struct called sync_mutex is added. Comments from Julian and Simon added. This patch has been running for more than 3 month now and it seems to work. Ver. 3 IP_VS_SO_GET_DAEMON in do_ip_vs_get_ctl protected by sync_mutex instead of __ip_vs_mutex as sugested by Julian. Signed-off-by: Hans Schillstrom <[email protected]> Acked-by: Julian Anastasov <[email protected]> Signed-off-by: Simon Horman <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
2011-10-11xfs: revert to using a kthread for AIL pushingChristoph Hellwig4-51/+45
Currently we have a few issues with the way the workqueue code is used to implement AIL pushing: - it accidentally uses the same workqueue as the syncer action, and thus can be prevented from running if there are enough sync actions active in the system. - it doesn't use the HIGHPRI flag to queue at the head of the queue of work items At this point I'm not confident enough in getting all the workqueue flags and tweaks right to provide a perfectly reliable execution context for AIL pushing, which is the most important piece in XFS to make forward progress when the log fills. Revert back to use a kthread per filesystem which fixes all the above issues at the cost of having a task struct and stack around for each mounted filesystem. In addition this also gives us much better ways to diagnose any issues involving hung AIL pushing and removes a small amount of code. Signed-off-by: Christoph Hellwig <[email protected]> Reported-by: Stefan Priebe <[email protected]> Tested-by: Stefan Priebe <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Alex Elder <[email protected]>
2011-10-11xfs: force the log if we encounter pinned buffers in .iop_pushbufChristoph Hellwig5-10/+24
We need to check for pinned buffers even in .iop_pushbuf given that inode items flush into the same buffers that may be pinned directly due operations on the unlinked inode list operating directly on buffers. To do this add a return value to .iop_pushbuf that tells the AIL push about this and use the existing log force mechanisms to unpin it. Signed-off-by: Christoph Hellwig <[email protected]> Reported-by: Stefan Priebe <[email protected]> Tested-by: Stefan Priebe <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Alex Elder <[email protected]>
2011-10-11xfs: do not update xa_last_pushed_lsn for locked itemsChristoph Hellwig1-1/+0
If an item was locked we should not update xa_last_pushed_lsn and thus skip it when restarting the AIL scan as we need to be able to lock and write it out as soon as possible. Otherwise heavy lock contention might starve AIL pushing too easily, especially given the larger backoff once we moved xa_last_pushed_lsn all the way to the target lsn. Signed-off-by: Christoph Hellwig <[email protected]> Reported-by: Stefan Priebe <[email protected]> Tested-by: Stefan Priebe <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Alex Elder <[email protected]>
2011-10-11Btrfs: make sure not to defrag extents past i_sizeChris Mason1-1/+3
The btrfs file defrag code will loop through the extents and force COW on them. But there is a concurrent truncate in the middle of the defrag, it might end up defragging the same range over and over again. The problem is that writepage won't go through and do anything on pages past i_size, so the cow won't happen, so the file will appear to still be fragmented. defrag will end up hitting the same extents again and again. In the worst case, the truncate can actually live lock with the defrag because the defrag keeps creating new ordered extents which the truncate code keeps waiting on. The fix here is to make defrag check for i_size inside the main loop, instead of just once before the looping starts. Signed-off-by: Chris Mason <[email protected]>
2011-10-11x86: Default to vsyscall=native for nowAdrian Bunk2-4/+5
This UML breakage: linux-2.6.30.1[3800] vsyscall fault (exploit attempt?) ip:ffffffffff600000 cs:33 sp:7fbfb9c498 ax:ffffffffff600000 si:0 di:606790 linux-2.6.30.1[3856] vsyscall fault (exploit attempt?) ip:ffffffffff600000 cs:33 sp:7fbfb13168 ax:ffffffffff600000 si:0 di:606790 Is caused by commit 3ae36655 ("x86-64: Rework vsyscall emulation and add vsyscall= parameter") - the vsyscall emulation code is not fully cooked yet as UML relies on some rather fragile SIGSEGV semantics. Linus suggested in https://lkml.org/lkml/2011/8/9/376 to default to vsyscall=native for now, this patch implements that. Signed-off-by: Adrian Bunk <[email protected]> Acked-by: Andrew Lutomirski <[email protected]> Cc: H. Peter Anvin <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>