aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-10-20dm: fix thaw_bdevJun'ichi Nomura
This patch fixes a bd_mount_sem counter corruption bug in device-mapper. thaw_bdev() should be called only when freeze_bdev() was called for the device. Otherwise, thaw_bdev() will up bd_mount_sem and corrupt the semaphore counter. struct block_device with the corrupted semaphore may remain in slab cache and be reused later. Attached patch will fix it by calling unlock_fs() instead. unlock_fs() will determine whether it should call thaw_bdev() by checking the device is frozen or not. Easy reproducer is: #!/bin/sh while [ 1 ]; do dmsetup --notable create a dmsetup --nolockfs suspend a dmsetup remove a done It's not easy to see the effect of corrupted semaphore. So I have tested with putting printk below in bdev_alloc_inode(): if (atomic_read(&ei->bdev.bd_mount_sem.count) != 1) printk(KERN_DEBUG "Incorrect semaphore count = %d (%p)\n", atomic_read(&ei->bdev.bd_mount_sem.count), &ei->bdev); Without the patch, I saw something like: Incorrect semaphore count = 17 (f2ab91c0) With the patch, the message didn't appear. The bug was introduced in 2.6.16 with this bug fix: commit d9dde59ba03095e526640988c0fedd75e93bc8b7 Date: Fri Feb 24 13:04:24 2006 -0800 [PATCH] dm: missing bdput/thaw_bdev at removal Need to unfreeze and release bdev otherwise the bdev inode with inconsistent state is reused later and cause problem. and backported to 2.6.15.5. It occurs only in free_dev(), which is called only when the dm device is removed. The buggy code is executed only if md->suspended_bdev is non-NULL and that can happen only when the device was suspended without noflush. Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: stable@kernel.org
2007-10-20dm delay: fix statusMilan Broz
Fix missing space in dm-delay target status output if separate read and write delay are configured. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2007-10-20dm delay: fix ctr error pathsDmitry Monakhov
Add missing 'dm_put_device' to dm-delay target constructor. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2007-10-20dm raid1: fix leakageDmitry Monakhov
Add missing 'dm_io_client_destroy' to alloc_context error path. Reorganize mirror constructor error path in order to prevent workqueue leakage. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2007-10-20dm crypt: missing kfree in ctr error pathDmitry Monakhov
Insert missing kfree() in crypt_iv_essiv_ctr() error path. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2007-10-20dm crypt: drop device ref in ctr error pathDmitry Monakhov
Add a missing 'dm_put_device' in an error path in crypt target constructor. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2007-10-20dm io:ctl use constant struct sizeMilan Broz
Make size of dm_ioctl struct always 312 bytes on all supported architectures. This change retains compatibility with already-compiled code because it uses an embedded offset to locate the payload that follows the structure. On 64-bit architectures there is no change at all; on 32-bit we are increasing the size of dm-ioctl from 308 to 312 bytes. Currently with 32-bit userspace / 64-bit kernel on x86_64 some ioctls (including rename, message) are incorrectly rejected by the comparison against 'param + 1'. This breaks userspace lvrename and multipath 'fail_if_no_path' changes, for example. (BTW Device-mapper uses its own versioning and ignores the ioctl size bits. Only the generic ioctl compat code on mixed arches checks them, and that will continue to accept both sizes for now, but we intend to list 308 as deprecated and eventually remove it.) Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: Guido Guenther <agx@sigxcpu.org> Cc: Kevin Corry <kevcorry@us.ibm.com> Cc: stable@kernel.org
2007-10-20dm mpath: rdac fix init raceBryn M. Reeves
Re-order the initialisation of dm-rdac to avoid registering the hw handler before the workqueue has been initialised. Closes a race that would potentially give an oops. Signed-off-by: Bryn M. Reeves <breeves@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2007-10-20small documentation fixesPhilipp Marek
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20Fix compiler warning in smount example program from sharedsubtree.txtJesper Juhl
If one compiles the example smount program, found in Documentation/sharedsubtree.txt, with -Wall then there's a small compiler warning rearing its ugly head : smount.c: In function 'main': smount.c:45: warning: implicit declaration of function 'strcmp' Easily fixed by just including string.h Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20docs/sysfs: add missing word to sysfs attribute explanationShaun Zinck
Add the obvious missing word. Signed-off-by: Shaun Zinck <shaun.zinck@gmail.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20documentation/ext3: grammar fixesShaun Zinck
Fix some grammar in the explanation of the Journal Block Device layer. Signed-off-by: Shaun Zinck <shaun.zinck@gmail.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20Documentation/java.txt: typo and grammar fixesShaun Zinck
This fixes a typo and rearranges the sentence to make more sense. Signed-off-by: Shaun Zinck <shaun.zinck@gmail.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20Documentation/filesystems/vfs.txt: typo fixShaun Zinck
Signed-off-by: Shaun Zinck <shaun.zinck@gmail.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20include/asm-*/system.h: remove unused set_rmb(), set_wmb() macrosStefan Richter
These don't appear anywhere else in the kernel anymore. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20trivial copy_data_pages() tidy upFengguang Wu
Change the loop style of copy_data_pages() to remove a duplicate condition. Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20Fix typo in arch/x86/kernel/tsc_32.cJosh Triplett
Signed-off-by: Josh Triplett <josh@kernel.org> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20file link fix for Pegasus USB net driver helpCal Peake
Update the file link in the Pegasus USB network driver's help text. Signed-off-by: Cal Peake <cp@absolutedigital.net> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20remove unused return within void return functionDenis Cheng
Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20Typo fixes retrun -> returnGabriel Craciunescu
Typo fixes retrun -> return Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20x86 hpet.h: remove broken linksDave Young
Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20Update 2.4 maintainer in documentLi Yang
Update the maintainer of 2.4 kernel in Documentations/SubmittingPatches. Signed-off-by: Li Yang <leo@zh-kernel.org> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20fix comment: unlock_hrtimer_base is the counterpart of lock_hrtimer_baseUwe Kleine-König
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20fix typo "sort" -> "short"Uwe Kleine-König
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20fix typo "insted" -> "instead"Uwe Kleine-König
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20Documentation/filesystems/files.txt: remove rcuref_inc_lf() reverencesEric Dumazet
rcuref_inc_lf() is not used anymore. Replace it by atomic_inc_not_zero() Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20kernel/sched.c: remove bogus comment from account_user_timeMichael Neuling
hardirq_offset is no longer needed. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20typo fixesMatt LaPlante
Most of these fixes were already submitted for old kernel versions, and were approved, but for some reason they never made it into the releases. Because this is a consolidation of a couple old missed patches, it touches both Kconfigs and documentation texts. Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: Documentation/Simon Arlott
Spelling fixes in Documentation/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: lib/Simon Arlott
Spelling fix in lib/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: init/Simon Arlott
Spelling fix in init/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: mm/Simon Arlott
Spelling fixes in mm/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: arch/x86_64/Simon Arlott
Spelling fixes in arch/x86_64/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: arch/v850/Simon Arlott
Spelling fixes in arch/v850/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: arch/um/Simon Arlott
Spelling fixes in arch/um/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: arch/m68k/Simon Arlott
Spelling fixes in arch/m68k/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: arch/m32r/Simon Arlott
Spelling fixes in arch/m32r/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: arch/i386/Simon Arlott
Spelling fixes in arch/i386/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: arch/h8300/Simon Arlott
Spelling fixes in arch/h8300/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: arch/frv/Simon Arlott
Spelling fixes in arch/frv/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-By: David Howells <dhowells@redhat.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: arch/cris/Simon Arlott
Spelling fixes in arch/cris/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20spelling fixes: arch/alpha/Simon Arlott
Spelling fixes in arch/alpha/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20pata_cmd64x.c typo fixAdrian Bunk
Spotted by David Miller <davem@davemloft.net>. Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20remove duplicate MMAPPER Kconfig optionAdrian Bunk
This option is already in arch/um/Kconfig.char Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Jeff Dike <jdike@addtoit.com>
2007-10-20fix up security_socket_getpeersec_* documentationSerge Hallyn
Update the security_socket_peersec documentation in include/linux/security.h. security_socket_peersec has been split into two functions - _stream and _dgram, with new capabilities. Signed-off-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20changed emailJohann Deneux
Changed email address of Johann Deneux (myself) Also removed CVS tags in comments (no longer using cvs) Signed-off-by: Johann Deneux <johann.deneux@gmail.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20powerpc: Remove obsolete prototypeJulio M. Merino Vidal
The include/asm-powerpc/paca.h file has a prototype for a function that does not exist any more; its name is setup_boot_paca. This function was removed in commit 4ba99b97dadd35b9ce1438b2bc7c992a4a14a8b1, so its prototype should have been removed at that time too. Signed-off-by: Julio M. Merino Vidal <jmerino@ac.upc.edu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20ide: remove inclusion of non-existent io_trace.hRobert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: gadio@netvision.net.il Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide-disk: add get_smart_data() helperBartlomiej Zolnierkiewicz
Merge get_smart_values() and get_smart_thresholds() into get_smart_data() helper. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: fix ->data_phase in taskfile_load_raw()Bartlomiej Zolnierkiewicz
It should be TASKFILE_NO_DATA, not TASKFILE_IN. Luckily ATM ->data_phase is unused if ->command_type == IDE_DRIVE_TASK_NO_DATA but this may change in the future. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>