aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-10-25Btrfs: fix memory leak when cloning root's nodeLiu Bo1-3/+5
After cloning root's node, we forgot to dec the src's ref which can lead to a memory leak. Signed-off-by: Liu Bo <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2012-10-25Merge branch 'for-chris-fixed' of git://git.jan-o-sch.net/btrfs-unstableChris Mason3-18/+55
2012-10-25Btrfs: Use btrfs_update_inode_fallback when creating a snapshotJosef Bacik3-5/+6
On a really full file system I was getting ENOSPC back from btrfs_update_inode when trying to update the parent inode when creating a snapshot. Just use the fallback method so we can update the inode and not have to worry about having a delayed ref. Thanks, Signed-off-by: Josef Bacik <[email protected]>
2012-10-25Btrfs: Send: preserve ownership (uid and gid) also for symlinks.Alex Lyakas1-14/+13
This patch also requires a change in the user-space part of "receive". We need to use "lchown" instead of "chown". We will do this in the following patch. Signed-off-by: Alex Lyakas <[email protected]> if (S_ISREG(sctx->cur_inode_mode)) {
2012-10-25Btrfs: fix deadlock caused by the nested chunk allocationMiao Xie1-0/+7
Steps to reproduce: # mkfs.btrfs -m raid1 <disk1> <disk2> # btrfstune -S 1 <disk1> # mount <disk1> <mnt> # btrfs device add <disk3> <disk4> <mnt> # mount -o remount,rw <mnt> # dd if=/dev/zero of=<mnt>/tmpfile bs=1M count=1 Deadlock happened. It is because of the nested chunk allocation. When we wrote the data into the filesystem, we would allocate the data chunk because there was no data chunk in the filesystem. At the end of the data chunk allocation, we should insert the metadata of the data chunk into the extent tree, but there was no raid1 chunk, so we tried to lock the chunk allocation mutex to allocate the new chunk, but we had held the mutex, the deadlock happened. By rights, we would allocate the raid1 chunk when we added the second device because the profile of the seed filesystem is raid1 and we had two devices. But we didn't do that in fact. It is because the last step of the first device insertion didn't commit the transaction. So when we added the second device, we didn't cow the tree, and just inserted the relative metadata into the leaves which were generated by the first device insertion, and its profile was dup. So, I fix this problem by commiting the transaction at the end of the first device insertion. Signed-off-by: Miao Xie <[email protected]>
2012-10-25btrfs: Return EINVAL when length to trim is less than FSBLukas Czerner1-1/+2
Currently if len argument in btrfs_ioctl_fitrim() is smaller than one FSB we will continue and finally return 0 bytes discarded. However if the length to discard is smaller then file system block we should really return EINVAL. Signed-off-by: Lukas Czerner <[email protected]>
2012-10-25Btrfs: fix memory leak in btrfs_quota_enable()Tsutomu Itoh1-4/+13
We should free quota_root before returning from the error handling code. Signed-off-by: Tsutomu Itoh <[email protected]>
2012-10-25Btrfs: send correct rdev and mode in btrfs-sendArne Jansen1-1/+2
When sending a device file, the stream was missing the mode. Also the rdev was encoded wrongly. Signed-off-by: Arne Jansen <[email protected]>
2012-10-25Btrfs: extended inode refs support for send mechanismJan Schmidt3-58/+94
This adds support for the new extended inode refs to btrfs send. Signed-off-by: Jan Schmidt <[email protected]>
2012-10-25Btrfs: Fix wrong error handling codeStefan Behrens1-2/+2
gcc says "warning: comparison of unsigned expression >= 0 is always true" because i is an unsigned long. And gcc is right this time. Signed-off-by: Stefan Behrens <[email protected]>
2012-10-25Fix a sign bug causing invalid memory access in the ino_paths ioctl.Gabriel de Perthuis1-1/+1
To see the problem, create many hardlinks to the same file (120 should do it), then look up paths by inode with: ls -i btrfs inspect inode-resolve -v $ino /mnt/btrfs I noticed the memory layout of the fspath->val data had some irregularities (some unnecessary gaps that stop appearing about halfway), so I'm not sure there aren't any bugs left in it.
2012-10-25Merge tag 'asoc-3.7' of ↵Takashi Iwai585-7664/+8457
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v3.7 A couple of driver fixes, one that improves the interoperability of WM8994 with controllers that are sensitive to extra BCLK cycles and some build break fixes for ux500.
2012-10-25sonypi: suspend/resume callbacks should be conditionally compiled on ↵Yuanhan Liu1-1/+1
CONFIG_PM_SLEEP This will fix warnings like following when CONFIG_PM_SLEEP is not set: warning: 'xxx_suspend' defined but not used [-Wunused-function] warning: 'xxx_resume' defined but not used [-Wunused-function] Because SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) Only references the callbacks on CONFIG_PM_SLEEP (instead of CONFIG_PM). Cc: Mattia Dongili <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: [email protected] Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25Documentation:Chinese translation of Documentation/arm64/memory.txtTekkaman Ninja1-0/+93
This is a Chinese translated version of Documentation/arm64/memory.txt Signed-off-by: Fu Wei <[email protected]> Acked-by: Catalin Marinas <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25Documentation:Chinese translation of Documentation/arm64/booting.txtTekkaman Ninja1-0/+156
This is a Chinese translated version of Documentation/arm64/booting.txt Signed-off-by: Fu Wei <[email protected]> Acked-by: Catalin Marinas <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25Documentation:Chinese translation of Documentation/IRQ.txtTekkaman Ninja1-0/+39
This is a Chinese translated version of Documentation/IRQ.txt Signed-off-by: Fu Wei <[email protected]> Acked-by: Harry Wei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25firmware loader: document kernel direct loadingMing Lei1-9/+17
This patch adds description on recently introduced direct firmware loading by Linus. Cc: Linus Torvalds <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25ehci: Add yet-another Lucid nohandoff pci quirkAnisse Astier1-0/+7
Board name changed on another shipping Lucid tablet. Signed-off-by: Anisse Astier <[email protected]> Cc: <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25ehci: fix Lucid nohandoff pci quirk to be more generic with BIOS versionsAnisse Astier1-1/+1
BIOS vendors keep changing the BIOS versions. Only match the beginning of the string to match all Lucid tablets with board name M11JB. Signed-off-by: Anisse Astier <[email protected]> Cc: <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: mos7840: fix port_probe flowJohan Hovold1-183/+166
Remove temporary do-while(0) loop used to keep changes minimal. Fixup indentation, remove some line breaks, and replace break with goto to maintain flow. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: mos7840: fix port-data memory leakJohan Hovold1-130/+89
Fix port-data memory leak by moving port data allocation and deallocation to port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note that the indentation was kept intact using a do-while(0) in order to facilitate review. A follow-up patch will remove it. Compile-only tested. Signed-off-by: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: mos7840: remove invalid disconnect handlingJohan Hovold1-12/+1
Remove private zombie flag used to signal disconnect and to prevent control urb from being submitted from interrupt urb completion handler. The control urb will not be re-submitted as both the control urb and the interrupt urb is killed on disconnect. Signed-off-by: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: mos7840: remove NULL-urb submissionJohan Hovold1-13/+1
The private int_urb is never allocated so the submission from the control completion handler will always fail. Remove this odd piece of broken code. Signed-off-by: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25x86: efi: Turn off efi_enabled after setup on mixed fw/kernelOlof Johansson3-8/+23
When 32-bit EFI is used with 64-bit kernel (or vice versa), turn off efi_enabled once setup is done. Beyond setup, it is normally used to determine if runtime services are available and we will have none. This will resolve issues stemming from efivars modprobe panicking on a 32/64-bit setup, as well as some reboot issues on similar setups. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45991 Reported-by: Marko Kohtala <[email protected]> Reported-by: Maxim Kammerer <[email protected]> Signed-off-by: Olof Johansson <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> Cc: [email protected] # 3.4 - 3.6 Cc: Matthew Garrett <[email protected]> Signed-off-by: Matt Fleming <[email protected]>
2012-10-25USB: qcserial: fix interface-data memory leak in error pathJohan Hovold1-15/+16
Move interface data allocation to attach so that it is deallocated should usb-serial probe fail. Signed-off-by: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: option: fix interface-data memory leak in error pathJohan Hovold1-2/+19
Move interface data allocation to attach so that it is deallocated should usb-serial probe fail. Note that the usb device id is stored at probe so that it can be used in attach to determine send-setup blacklisting. Signed-off-by: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: ipw: fix interface-data memory leak in error pathJohan Hovold1-3/+2
Move interface data allocation to attach so that it is deallocated should usb-serial probe fail. Signed-off-by: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: mos7840: fix port-device leak in error pathJohan Hovold1-1/+0
The driver set the usb-serial port pointers to NULL on errors in attach, effectively preventing usb-serial core from decrementing the port ref counters and releasing the port devices and associated data. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: mos7840: fix urb leak at releaseJohan Hovold1-0/+1
Make sure control urb is freed at release. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: sierra: fix port-data memory leakJohan Hovold1-67/+58
Fix port-data memory leak by moving port data allocation and deallocation to port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note also that urb-count for multi-port interfaces has not been changed even though the usb-serial port number is now determined from the port and interface minor numbers. Compile-only tested. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: sierra: fix memory leak in probe error pathJohan Hovold1-6/+10
Move interface data allocation to attach so that it is deallocated on errors in usb-serial probe. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: sierra: fix memory leak in attach error pathJohan Hovold1-1/+8
Make sure port private data is deallocated on errors in attach. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: usb-wwan: fix multiple memory leaks in error pathsJohan Hovold5-78/+54
Fix port-data memory leak in usb-serial probe error path by moving port data allocation to port_probe. Since commit a1028f0abf ("usb: usb_wwan: replace release and disconnect with a port_remove hook") port data is deallocated in port_remove. This leaves a possibility for memory leaks if usb-serial probe fails after attach but before the port in question has been successfully registered. Note that this patch also fixes two additional memory leaks in the error path of attach should port initialisation fail for any port as the urbs were never freed and neither was the data of any of the successfully initialised ports. Compile-only tested. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: keyspan: fix NULL-pointer dereferences and memory leaksJohan Hovold2-93/+96
Fix NULL-pointer dereference at release by moving port data allocation and deallocation to port_probe and port_remove. Fix NULL-pointer dereference at disconnect by stopping port urbs at port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer accessible at disconnect or release. Note that this patch also fixes port and interface-data memory leaks in the error path of attach should port initialisation fail for any port. Compile-only tested. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: mct_u232: fix broken closeJohan Hovold1-6/+8
Make sure generic close is called at close. The driver relies on the generic write implementation but did not call generic close. Note that the call to kill the read urb is not redundant, as mct_u232 uses an interrupt urb from the second port as the read urb and that generic close therefore fails to kill it. Compile-only tested. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: mct_u232: fix port-data memory leakJohan Hovold1-20/+25
Fix port-data memory leak by moving port data allocation and deallocation to port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note that the write waitqueue was initialised but never used. Compile-only tested. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: opticon: fix memory leak in error pathJohan Hovold1-1/+3
Fix memory leak in write error path. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: opticon: fix DMA from stackJohan Hovold1-1/+6
Make sure to allocate the control-message buffer dynamically as some platforms cannot do DMA from stack. Note that only the first byte of the old buffer was used. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: quatech2: fix io after disconnectJohan Hovold1-0/+7
Make sure no control urb is submitted during close after a disconnect by checking the disconnected flag. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: quatech2: fix close and disconnect urb handlingJohan Hovold1-4/+2
Kill urbs unconditionally at close and disconnect. Note that URB status is not valid outside of completion handler. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: quatech2: fix port-data memory leaksJohan Hovold1-70/+51
Fix port-data memory leak by moving port data allocation and deallocation to port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note that this also fixes memory leaks in the error path of attach where the write urbs were not freed on errors. Make sure all interface-data deallocation is done in release by moving the read urb deallocation from disconnect. Note that the write urb is killed during close so that the call in disconnect was superfluous. Compile-only tested. Cc: Bill Pemberton <[email protected]> Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: quatech2: fix memory leak in error pathJohan Hovold1-0/+1
Fix memory leak in attach error path where the read urb was never freed. Cc: Bill Pemberton <[email protected]> Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: omninet: fix port-data memory leakJohan Hovold1-18/+18
Fix port-data memory leak by replacing attach and release with port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Compile-only tested. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: mos7720: fix port-data memory leakJohan Hovold1-30/+32
Fix port-data memory leak by moving port data allocation and deallocation to port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note that this patch also fixes a second port-data memory leak in the error path of attach, should parallel-port initialisation fail. Compile-only tested. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: digi_acceleport: fix port-data memory leakJohan Hovold1-50/+67
Fix port-data memory leak by moving port data allocation and deallocation to port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note that the oob port is never registered as a port device and should thus be handled in attach and release. Compile-only tested. Cc: Peter Berger <[email protected]> Cc: Al Borchers <[email protected]> Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: ch341: fix port-data memory leakJohan Hovold1-7/+16
Fix port-data memory leak by moving port data allocation to port_probe and actually implementing deallocation. Note that this driver has never even bothered to try to deallocate it's port data... Compile-only tested. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: whiteheat: fix port-data memory leakJohan Hovold1-33/+26
Fix port-data memory leak by moving port data allocation and deallocation to port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note that the fifth port (command port) is never registered as a port device and thus should be handled in attach and release. Compile-only tested. Cc: <[email protected]> Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: whiteheat: fix memory leak in error pathJohan Hovold1-0/+1
Make sure command buffer is deallocated in case of errors during attach. Cc: <[email protected]> Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: metro-usb: fix io after disconnectJohan Hovold1-9/+6
Make sure no control urb is submitted during close after a disconnect by checking the disconnected flag. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25USB: metro-usb: fix port-data memory leakJohan Hovold1-37/+13
Fix port-data memory leak by moving port data allocation and deallocation to port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note that the call to metrousb_clean (close) in shutdown was redundant. Compile-only tested. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>