linux/drivers
Tejun Heo ba02508248 [PATCH] blk: fix tag shrinking (revive real_max_size)
My patch in commit fa72b903f7 incorrectly
removed blk_queue_tag->real_max_depth.

The original resize implementation was incorrect in the following
points.

 * actual allocation size of tag_index was shorter than real_max_size,
   but assumed to be of the same size, possibly causing memory access
   beyond the allocated area.
 * bits in tag_map between max_deptn and real_max_depth were
   initialized to 1's, making the tags permanently reserved.

In an attempt to fix above two bugs, I had removed allocation optimization
in init_tag_map and real_max_size.  Tag map/index were allocated and freed
immediately during resize.

Unfortunately, I wasn't considering that tag map/index can be resized
dynamically with tags beyond new_depth active.  This led to accessing
freed area after shrinking tags and led to the following bug reporting
thread on linux-scsi.

   http://marc.theaimsgroup.com/?l=linux-scsi&m=112319898111885&w=2

To fix the problem, I've revived real_max_depth without allocation
optimization in init_tag_map, and Andrew Vasquez confirmed that the
problem was fixed.  As Jens is not going to be available for a week, he
asked me to make sure that this patch reaches you.

   http://marc.theaimsgroup.com/?l=linux-scsi&m=112325778530886&w=2

Also, a comment was added to make sure that real_max_size is needed for
dynamic shrinking.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-05 13:43:16 -07:00
..
acorn [PATCH] I2C: Kill address ranges in non-sensors i2c chip drivers 2005-06-21 21:51:48 -07:00
acpi Merge master.kernel.org:/pub/scm/linux/kernel/git/lenb/to-linus 2005-08-04 10:36:25 -07:00
atm [ATM]: zatm: mailbox converted to pci_alloc_consistent() 2005-07-20 12:01:46 -07:00
base [ACPI] merge acpi-2.6.12 branch into latest Linux 2.6.13-rc... 2005-07-12 17:21:56 -04:00
block [PATCH] blk: fix tag shrinking (revive real_max_size) 2005-08-05 13:43:16 -07:00
bluetooth [NET]: Transform skb_queue_len() binary tests into skb_queue_empty() 2005-07-08 14:57:23 -07:00
cdrom [PATCH] Update CREDITS entry and listings in source files for Jesper Juhl 2005-07-27 16:26:20 -07:00
char [PATCH] tpm_infineon: Support for new TPM 1.2 and PNPACPI 2005-08-05 12:22:37 -07:00
cpufreq Here are two possible cleanups in cpufreq.c: 2005-07-28 09:43:56 -07:00
crypto [CRYPTO] Update IV correctly for Padlock CBC encryption 2005-07-06 13:54:09 -07:00
dio [PATCH] Driver Core: drivers/base - drivers/i2c/chips/adm1026.c: update device attribute callbacks 2005-06-20 15:15:32 -07:00
eisa [PATCH] Driver Core: drivers/base - drivers/i2c/chips/adm1026.c: update device attribute callbacks 2005-06-20 15:15:32 -07:00
fc4 [SCSI] fc4 warning fix 2005-07-30 09:47:53 -05:00
firmware [PATCH] PCDP: if PCDP contains parity information, use it 2005-07-28 08:39:02 -07:00
hwmon [PATCH] I2C: use time_after in 3 chip drivers 2005-07-29 13:12:50 -07:00
i2c [PATCH] i2c-mpc.c: revert duplicate patch 2005-08-01 19:13:59 -07:00
ide [PATCH] ide: fix kmalloc_node breakage in ide driver 2005-08-04 13:00:53 -07:00
ieee1394 [PATCH] turn many #if $undefined_string into #ifdef $undefined_string 2005-07-27 16:26:08 -07:00
infiniband [PATCH] [IPoIB] Handle sending of unicast RARP responses 2005-07-28 13:17:26 -07:00
input Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input 2005-07-29 09:48:34 -07:00
isdn [PATCH] clean up inline static vs static inline 2005-07-27 16:26:20 -07:00
macintosh [PATCH] ppc64: hide CONFIG_ADB 2005-07-27 16:25:57 -07:00
mca [PATCH] unexport mca_find_device_by_slot 2005-06-25 16:24:56 -07:00
md [PATCH] dm-raid locking fix 2005-08-04 13:00:55 -07:00
media [PATCH] v4l: oopsfix for BTTV on badly behaved PCI chipsets 2005-08-04 13:00:54 -07:00
message Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-07-26 13:28:47 -07:00
misc [PATCH] IBM_ASM Kconfig corrections 2005-07-12 16:01:02 -07:00
mmc [PATCH] clean up inline static vs static inline 2005-07-27 16:26:20 -07:00
mtd [PATCH] turn many #if $undefined_string into #ifdef $undefined_string 2005-07-27 16:26:08 -07:00
net [PATCH] silence cs89x0 2005-08-01 19:14:01 -07:00
nubus Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
oprofile [PATCH] clean up inline static vs static inline 2005-07-27 16:26:20 -07:00
parisc [PATCH] acpi bridge hotadd: ACPI based root bridge hot-add 2005-06-27 21:52:39 -07:00
parport [PATCH] pcmcia: remove references to pcmcia/version.h 2005-07-07 18:24:07 -07:00
pci [PATCH] PCI: restore BAR values after D3hot->D0 for devices that need it 2005-08-04 21:32:46 -07:00
pcmcia [PATCH] pci and yenta: pcibios_bus_to_resource 2005-08-04 21:32:46 -07:00
pnp [PATCH] drivers/pnp/pnpbios/rsparser.c: fix compile error with PCI=n 2005-07-27 16:25:50 -07:00
s390 [PATCH] s390: device recognition 2005-07-29 15:01:14 -07:00
sbus [SPARC]: Fix up sleep_on() removal in vfc driver. 2005-08-04 07:05:37 -07:00
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-08-04 13:08:29 -07:00
serial [PATCH] serial: add MMIO support to 8250_pnp 2005-07-29 15:01:13 -07:00
sh [PATCH] Driver Core: drivers/s390/net/qeth_sys.c - drivers/usb/gadget/pxa2xx_udc.c: update device attribute callbacks 2005-06-20 15:15:35 -07:00
sn [PATCH] ioc4: PCI bus speed detection 2005-06-21 18:46:32 -07:00
tc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
telephony [PATCH] pcmcia: remove references to pcmcia/version.h 2005-07-07 18:24:07 -07:00
usb [PATCH] USB: Fix setup packet initialization in isp116x-hcd 2005-08-04 21:32:46 -07:00
video [PATCH] tridentfb: Fix scrolling artifacts during disk IO 2005-08-01 10:07:53 -07:00
w1 [PATCH] w1: kconfig/Makefile fix. 2005-07-29 13:12:51 -07:00
zorro [PATCH] Driver Core: drivers/usb/input/aiptek.c - drivers/zorro/zorro-sysfs.c: update device attribute callbacks 2005-06-20 15:15:35 -07:00
Kconfig Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6 2005-07-12 15:54:36 -07:00
Makefile [PATCH] I2C: Move hwmon drivers (1/3) 2005-07-11 14:14:31 -07:00