Revision tags: v3.16-rc6, v3.16-rc5, v3.16-rc4, v3.16-rc3 |
|
#
9cb78c16 |
| 25-Jun-2014 |
Hannes Reinecke <hare@suse.de> |
scsi: use 64-bit LUNs
The SCSI standard defines 64-bit values for LUNs, and large arrays employing large or hierarchical LUN numbers become more and more common.
So update the linux SCSI stack to u
scsi: use 64-bit LUNs
The SCSI standard defines 64-bit values for LUNs, and large arrays employing large or hierarchical LUN numbers become more and more common.
So update the linux SCSI stack to use 64-bit LUN numbers.
Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@infradead.org> Reviewed-by: Ewan Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
Revision tags: v3.16-rc2, v3.16-rc1, v3.15 |
|
#
6bb5e6e7 |
| 02-Jun-2014 |
Akinobu Mita <akinobu.mita@gmail.com> |
scsi_debug: allow huge transfer length for read/write commands
This change enables to test read/write commands with huge transfer length such as 1GB. For example:
# modprobe scsi_debug dev_size_m
scsi_debug: allow huge transfer length for read/write commands
This change enables to test read/write commands with huge transfer length such as 1GB. For example:
# modprobe scsi_debug dev_size_mb=1024 clustering=1 opts=1 # cat /sys/block/$DEV/queue/max_hw_sectors_kb > \ /sys/block/$DEV/queue/max_sectors_kb # fio --name=test --rw=write --bs=1g --size=1g --filename=/dev/$DEV \ --mem=mmaphuge --direct=1
The data type of max_sectors in scsi_host_template has been extended to unsigned int by the previous change. So we can increase it from 0xffff to 0xffffffff to allow such huge transfer length.
Also, this increases sg_tablesize and max_segment_size, otherwise the maximum transfer length is limited to 64MB. (sg_tablesize * max_segment_size = 256 * 256KB)
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Acked by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
Revision tags: v3.15-rc8, v3.15-rc7, v3.15-rc6, v3.15-rc5, v3.15-rc4 |
|
#
b57d7c01 |
| 01-May-2014 |
Christoph Hellwig <hch@lst.de> |
scsi_debug: simple short transfer injection
Add an option to only transfer half the data for every n-th command.
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Douglas Gilbert <dgilbert@in
scsi_debug: simple short transfer injection
Add an option to only transfer half the data for every n-th command.
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.15-rc3, v3.15-rc2, v3.15-rc1, v3.14, v3.14-rc8, v3.14-rc7, v3.14-rc6, v3.14-rc5 |
|
#
0759c666 |
| 26-Feb-2014 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: add ability to enable clustering
This adds a module parameter to enable clustering.
Without enabling clustering support, the transfer length for read and write scsi commands is l
[SCSI] scsi_debug: add ability to enable clustering
This adds a module parameter to enable clustering.
Without enabling clustering support, the transfer length for read and write scsi commands is limited upto 8MB when page size is 4KB and sg_tablesize is 2048 (= SCSI_MAX_SG_CHAIN_SEGMENTS). I would like to test commands with more than that transfer length.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
6c78cc06 |
| 26-Feb-2014 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: protect device access with atomic_rw lock
This change ensures that concurrent device access including ramdisk storage, protection info, and provisioning map by read, write, and un
[SCSI] scsi_debug: protect device access with atomic_rw lock
This change ensures that concurrent device access including ramdisk storage, protection info, and provisioning map by read, write, and unmap commands are protected with atomic_rw spinlock.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
be4e11be |
| 26-Feb-2014 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: prepare to enable clustering
Currently, clustering support for scsi_debug is disabled. This is because there are for_each_sg() loops which assume that each sg list element is con
[SCSI] scsi_debug: prepare to enable clustering
Currently, clustering support for scsi_debug is disabled. This is because there are for_each_sg() loops which assume that each sg list element is consisted with a single page. But enabling clustering support, each sg list element for scsi commands can be consisted with multiple pages.
This replaces these for_each_sg() loops with sg mapping iterator which is capable of handling each sg list element is consisted with multiple pages.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
c5af0db9 |
| 26-Feb-2014 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: fix resp_xdwriteread() return value when running out of memory
When resp_xdwriteread() can't allocate temporary buffer, it returns -1. But the return value is used as scsi status
[SCSI] scsi_debug: fix resp_xdwriteread() return value when running out of memory
When resp_xdwriteread() can't allocate temporary buffer, it returns -1. But the return value is used as scsi status code and -1 is not interpreted as correct code.
target_core_mod has similar xdwriteread emulation code. So this mimics what target_core_mod does for xdwriteread when running out of memory.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
c613d061 |
| 26-Feb-2014 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: fix duplicate dif_errors increment
It is unnecessary to increase dif_errors in dif_verify(), because the caller will increment it when dif_verify() detects failure.
This bug was
[SCSI] scsi_debug: fix duplicate dif_errors increment
It is unnecessary to increase dif_errors in dif_verify(), because the caller will increment it when dif_verify() detects failure.
This bug was introduced by commit beb40ea42bd6 ("[SCSI] scsi_debug: reduce duplication between prot_verify_read and prot_verify_write")
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
11ddceca |
| 26-Feb-2014 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: make pseudo_primary static
As pseudo_primary is only used in scsi_debug.c, it should be static.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by: Douglas Gilbert
[SCSI] scsi_debug: make pseudo_primary static
As pseudo_primary is only used in scsi_debug.c, it should be static.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
c45eabec |
| 26-Feb-2014 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: fix false positive logical block reference tag check fail
Reading partially unwritten sectors generates a false positive logical block reference tag check failure when DIF is enab
[SCSI] scsi_debug: fix false positive logical block reference tag check fail
Reading partially unwritten sectors generates a false positive logical block reference tag check failure when DIF is enabled.
This bug is caused by missing ei_lba increment in loop of dif_verify() when unwritten sector is skipped.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
Revision tags: v3.14-rc4, v3.14-rc3, v3.14-rc2, v3.14-rc1, v3.13, v3.13-rc8, v3.13-rc7, v3.13-rc6, v3.13-rc5, v3.13-rc4, v3.13-rc3, v3.13-rc2, v3.13-rc1, v3.12, v3.12-rc7, v3.12-rc6 |
|
#
82069379 |
| 14-Oct-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: simplify creation and destruction of driver attribute files
Instead of repeatedly calling driver_create_file() to create driver attribute files, This achieves the same thing by co
[SCSI] scsi_debug: simplify creation and destruction of driver attribute files
Instead of repeatedly calling driver_create_file() to create driver attribute files, This achieves the same thing by constructing an array of driver_attribute and setting it to bus_type->drv_groups.
This change simplifies both creation and destruction of the attribute files, and also removes sparse warning caused by driver_attributes which are unnecessarily declared as global.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
Revision tags: v3.12-rc5, v3.12-rc4, v3.12-rc3, v3.12-rc2 |
|
#
51d648af |
| 18-Sep-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: fix sparse warnings related to data integrity field
Each member in data integrity field tuple is big-endian. But the endianness of the values being compared with these members ar
[SCSI] scsi_debug: fix sparse warnings related to data integrity field
Each member in data integrity field tuple is big-endian. But the endianness of the values being compared with these members are not annotated. So this fixes these sparse warnings.
Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
68aee7ba |
| 18-Sep-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: fix invalid value check for guard module parameter
In the module initialization, invalid value for guard module parameter is detected by the following check:
if (scsi_deb
[SCSI] scsi_debug: fix invalid value check for guard module parameter
In the module initialization, invalid value for guard module parameter is detected by the following check:
if (scsi_debug_guard > 1) { printk(KERN_ERR "scsi_debug_init: guard must be 0 or 1\n"); return -EINVAL; }
But this check isn't enough, because the type of scsi_debug_guard is 'int' and scsi_debug_guard could be a negative value.
This fixes it by changing the type of scsi_debug_guard to 'unsigned int' instead of adding extra check for a negative value.
Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
65f72f2a |
| 18-Sep-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: avoid partial copying PI from prot_sglist to dif_storep
If data integrity support is enabled, prot_verify_write() is called in response to WRITE commands and it verifies protectio
[SCSI] scsi_debug: avoid partial copying PI from prot_sglist to dif_storep
If data integrity support is enabled, prot_verify_write() is called in response to WRITE commands and it verifies protection info from prot_sglist by comparing against data sglist, and copies protection info to dif_storep.
When multiple blocks are transfered by a WRITE command, it verifies and copies these blocks one by one. So if it fails to verify protection info in the middle of blocks, the actual data transfer to fake_storep isn't proceeded at all although protection info for some blocks are already copied to dif_storep. Therefore, it breaks the data integrity between fake_storep and dif_storep.
This fixes it by ensuring that copying protection info to dif_storep is done after all blocks are successfully verified. Reusing dif_copy_prot() with supporting the opposite direction simplifies this fix.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
bb8c063c |
| 18-Sep-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: factor out copying PI from dif_storep to prot_sglist
If data integrity support is enabled, prot_verify_read() is called in response to READ commands and it verifies protection inf
[SCSI] scsi_debug: factor out copying PI from dif_storep to prot_sglist
If data integrity support is enabled, prot_verify_read() is called in response to READ commands and it verifies protection info from dif_storep by comparing against fake_storep, and copies protection info to prot_sglist.
This factors out the portion of copying protection info into a separate function. It will also be reused in the next change after supporting the opposite direction (copying prot_sglist to dif_storep).
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
14faa944 |
| 18-Sep-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: fix buffer overrun when DIF/DIX is enabled and virtual_gb > 0
If the module parameter virtual_gb is greater than 0, the READ command may request the blocks which exceed actual ram
[SCSI] scsi_debug: fix buffer overrun when DIF/DIX is enabled and virtual_gb > 0
If the module parameter virtual_gb is greater than 0, the READ command may request the blocks which exceed actual ramdisk storage (fake_storep). prot_verify_read() should treat those blocks as wrap around the end of fake_storep. But it actually causes fake_storep and dif_storep buffer overruns.
This fixes these buffer overruns. In order to simplify the fix, this also introduces fake_store() and dif_store() which return corresponding wrap around addresses.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
Revision tags: v3.12-rc1, v3.11 |
|
#
a027b5b9 |
| 26-Aug-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: fix logical block provisioning support when unmap_alignment != 0
Commit b90ebc3d5c41c9164ae04efd2e4f8204c2a186f1 ("[SCSI] scsi_debug: fix logical block provisioning support") fixe
[SCSI] scsi_debug: fix logical block provisioning support when unmap_alignment != 0
Commit b90ebc3d5c41c9164ae04efd2e4f8204c2a186f1 ("[SCSI] scsi_debug: fix logical block provisioning support") fixed several issues with logical block provisioning support, but it still doesn't properly fix the cases when unmap_alignment > 0.
For example, load scsi_debug module with the following module parameters and make all blocks mapped by filling the storage with zero.
# modprobe scsi_debug lbpu=1 unmap_alignment=1 unmap_granularity=4 # dd if=/dev/zero of=$DEV
Then, try to unmap the first unmappable blocks at lba=1, but GET LBA STATUS unexpectedly reports that the last UNMAP has done nothing.
# sg_unmap --lba=1 --num=4 $DEV # sg_get_lba_status --lba=1 $DEV descriptor LBA: 0x0000000000000001 blocks: 16383 mapped
The problem is in map_index_to_lba(), which should return the first LBA which is corresponding to a given index of provisioning map (map_storep).
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: "Martin K. Petersen" <martin.petersen@oracle.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
150c3544 |
| 26-Aug-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: fix endianness bug in sdebug_build_parts()
With module parameter num_parts > 0, partition table is built on the ramdisk storage when loading the driver. Unfortunately, there is a
[SCSI] scsi_debug: fix endianness bug in sdebug_build_parts()
With module parameter num_parts > 0, partition table is built on the ramdisk storage when loading the driver. Unfortunately, there is an endianness bug in sdebug_build_parts(). So the partition table is not correctly initialized on big-endian systems.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Tested-by: Martin Peschke <mpeschke@linux.vnet.ibm.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
Revision tags: v3.11-rc7, v3.11-rc6, v3.11-rc5, v3.11-rc4, v3.11-rc3, v3.11-rc2, v3.11-rc1 |
|
#
a4517511 |
| 08-Jul-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
scsi_debug: fix do_device_access() with wrap around range
do_device_access() is a function that abstracts copying SG list from/to ramdisk storage (fake_storep).
It must deal with the ranges exceedi
scsi_debug: fix do_device_access() with wrap around range
do_device_access() is a function that abstracts copying SG list from/to ramdisk storage (fake_storep).
It must deal with the ranges exceeding actual fake_storep size, because such ranges are valid if virtual_gb is set greater than zero, and they should be treated as fake_storep is repeatedly mirrored up to virtual size.
Unfortunately, it can't deal with the range which wraps around the end of fake_storep. A wrap around range is copied by two sg_copy_{from,to}_buffer() calls, but sg_copy_{from,to}_buffer() can't copy from/to in the middle of SG list, therefore the second call can't copy correctly.
This fixes it by using sg_pcopy_{from,to}_buffer() that can copy from/to the middle of SG list.
This also simplifies the assignment of sdb->resid in fill_from_dev_buffer(). Because fill_from_dev_buffer() is now only called once per command execution cycle. So it is not necessary to take care to decrease sdb->resid if fill_from_dev_buffer() is called more than once.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: Douglas Gilbert <dgilbert@interlog.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Horia Geanta <horia.geanta@freescale.com> Cc: Imre Deak <imre.deak@intel.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
Revision tags: v3.10 |
|
#
beb40ea4 |
| 29-Jun-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: reduce duplication between prot_verify_read and prot_verify_write
In order to reduce code duplication between prot_verify_read() and prot_verify_write(), this moves common code in
[SCSI] scsi_debug: reduce duplication between prot_verify_read and prot_verify_write
In order to reduce code duplication between prot_verify_read() and prot_verify_write(), this moves common code into the new functions.
[jejb: fix unitialised variable warning] Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Acked-by: "Martin K. Petersen" <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
e18d8bea |
| 29-Jun-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: simplify offset calculation for dif_storep
dif_storep is declared as pointer to unsigned char type. But it is actually used to store vmalloced array of struct sd_dif_tuple.
This
[SCSI] scsi_debug: simplify offset calculation for dif_storep
dif_storep is declared as pointer to unsigned char type. But it is actually used to store vmalloced array of struct sd_dif_tuple.
This changes the type of dif_storep to the pointer to struct sd_dif_tuple. It simplifies offset calculation for dif_storep and enables to remove hardcoded size of struct sd_dif_tuple.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Acked-by: "Martin K. Petersen" <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
e9926b43 |
| 29-Jun-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: invalidate protection info for unmapped region
When UNMAP command is issued with the data integrity support enabled, the protection info for the unmapped region is remain unchange
[SCSI] scsi_debug: invalidate protection info for unmapped region
When UNMAP command is issued with the data integrity support enabled, the protection info for the unmapped region is remain unchanged. So READ command for the region later on causes data integrity failure.
This fixes it by invalidating protection info for the unmapped region by filling with 0xff pattern.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Acked-by: "Martin K. Petersen" <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
7cb69d03 |
| 29-Jun-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: fix NULL pointer dereference with parameters dif=0 dix=1
The protection info dif_storep is allocated only when parameter dif is not zero. But it will be accessed when reading or
[SCSI] scsi_debug: fix NULL pointer dereference with parameters dif=0 dix=1
The protection info dif_storep is allocated only when parameter dif is not zero. But it will be accessed when reading or writing to the storage installed with parameter dix is not zero.
So kernel crashes if scsi_debug module is loaded with parameters dix=1 and dif=0.
This fixes it by making dif_storep available if parameter dix is not zero instead of checking if parameter dif is not zero.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Acked-by: "Martin K. Petersen" <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
fc3fc352 |
| 29-Jun-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: fix incorrectly nested kmap_atomic()
In the function prot_verify_write(), kmap_atomic()/kunmap_atomic() for data page and kmap_atomic()/kunmap_atomic() for protection information
[SCSI] scsi_debug: fix incorrectly nested kmap_atomic()
In the function prot_verify_write(), kmap_atomic()/kunmap_atomic() for data page and kmap_atomic()/kunmap_atomic() for protection information page are not nested each other.
It worked perfectly before commit 3e4d3af501cccdc8a8cca41bdbe57d54ad7e7e73 ("mm: stack based kmap_atomic()"). Because the kmap_atomic slot KM_IRQ0 was used for data page and the slot KM_IRQ1 was used for protection page.
But KM_types are gone and kmap_atomic() is using stack based implementation. So two different kmap_atomic() usages must be strictly nested now.
This change ensures kmap_atomic() usage is strictly nested.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Acked-by: "Martin K. Petersen" <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
518d9df8 |
| 29-Jun-2013 |
Akinobu Mita <akinobu.mita@gmail.com> |
[SCSI] scsi_debug: fix invalid address passed to kunmap_atomic()
In the function prot_verify_write(), the kmap address 'daddr' is incremented in the loop for each data page. Finally 'daddr' reaches
[SCSI] scsi_debug: fix invalid address passed to kunmap_atomic()
In the function prot_verify_write(), the kmap address 'daddr' is incremented in the loop for each data page. Finally 'daddr' reaches the next page boundary in the end of the loop, and the invalid address is passed to kunmap_atomic().
Fix the issue by not incrementing 'daddr' in the loop and offsetting it by the loop counter on demand.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Acked-by: "Martin K. Petersen" <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|