Age | Commit message (Collapse) | Author |
|
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
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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
|
|
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>
|
|
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
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>
|
|
Add the obvious missing word.
Signed-off-by: Shaun Zinck <shaun.zinck@gmail.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Shaun Zinck <shaun.zinck@gmail.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Josh Triplett <josh@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
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>
|
|
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Typo fixes retrun -> return
Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
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>
|
|
hardirq_offset is no longer needed.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
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>
|
|
Spelling fixes in Documentation/.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Spelling fix in lib/.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Spelling fix in init/.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Spelling fixes in mm/.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Spelling fixes in arch/x86_64/.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Spelling fixes in arch/v850/.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
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>
|
|
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>
|
|
Spelling fixes in arch/m32r/.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Spelling fixes in arch/i386/.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Spelling fixes in arch/h8300/.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
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>
|
|
Spelling fixes in arch/cris/.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Spelling fixes in arch/alpha/.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Spotted by David Miller <davem@davemloft.net>.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
This option is already in arch/um/Kconfig.char
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Jeff Dike <jdike@addtoit.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Cc: gadio@netvision.net.il
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Merge get_smart_values() and get_smart_thresholds()
into get_smart_data() helper.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
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>
|