<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/scsi_lib.c, branch linux-2.6.36.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.36.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.36.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-01-07T21:58:51Z</updated>
<entry>
<title>block: Deprecate QUEUE_FLAG_CLUSTER and use queue_limits instead</title>
<updated>2011-01-07T21:58:51Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2010-12-01T18:41:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42e9b5a7c3c6697e4d03d300df72e3527b67f5b1'/>
<id>urn:sha1:42e9b5a7c3c6697e4d03d300df72e3527b67f5b1</id>
<content type='text'>
commit e692cb668fdd5a712c6ed2a2d6f2a36ee83997b4 upstream.

When stacking devices, a request_queue is not always available. This
forced us to have a no_cluster flag in the queue_limits that could be
used as a carrier until the request_queue had been set up for a
metadevice.

There were several problems with that approach. First of all it was up
to the stacking device to remember to set queue flag after stacking had
completed. Also, the queue flag and the queue limits had to be kept in
sync at all times. We got that wrong, which could lead to us issuing
commands that went beyond the max scatterlist limit set by the driver.

The proper fix is to avoid having two flags for tracking the same thing.
We deprecate QUEUE_FLAG_CLUSTER and use the queue limit directly in the
block layer merging functions. The queue_limit 'no_cluster' is turned
into 'cluster' to avoid double negatives and to ease stacking.
Clustering defaults to being enabled as before. The queue flag logic is
removed from the stacking function, and explicitly setting the cluster
flag is no longer necessary in DM and MD.

Reported-by: Ed Lin &lt;ed.lin@promise.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Acked-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Fix regressions in scsi_internal_device_block</title>
<updated>2010-11-22T19:03:17Z</updated>
<author>
<name>Mike Christie</name>
</author>
<published>2010-10-06T08:10:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf54d251e555dbf5122621970c52a6e35df571f5'/>
<id>urn:sha1:bf54d251e555dbf5122621970c52a6e35df571f5</id>
<content type='text'>
commit 986fe6c7f50974e871b8ab5a800f5310ea25b361 upstream.

Deleting a SCSI device on a blocked fc_remote_port (before
fast_io_fail_tmo fires) results in a hanging thread:

  STACK:
  0 schedule+1108 [0x5cac48]
  1 schedule_timeout+528 [0x5cb7fc]
  2 wait_for_common+266 [0x5ca6be]
  3 blk_execute_rq+160 [0x354054]
  4 scsi_execute+324 [0x3b7ef4]
  5 scsi_execute_req+162 [0x3b80ca]
  6 sd_sync_cache+138 [0x3cf662]
  7 sd_shutdown+138 [0x3cf91a]
  8 sd_remove+112 [0x3cfe4c]
  9 __device_release_driver+124 [0x3a08b8]
10 device_release_driver+60 [0x3a0a5c]
11 bus_remove_device+266 [0x39fa76]
12 device_del+340 [0x39d818]
13 __scsi_remove_device+204 [0x3bcc48]
14 scsi_remove_device+66 [0x3bcc8e]
15 sysfs_schedule_callback_work+50 [0x260d66]
16 worker_thread+622 [0x162326]
17 kthread+160 [0x1680b0]
18 kernel_thread_starter+6 [0x10aaea]

During the delete, the SCSI device is in moved to SDEV_CANCEL.  When
the FC transport class later calls scsi_target_unblock, this has no
effect, since scsi_internal_device_unblock ignores SCSI devics in this
state.

It looks like all these are regressions caused by:
5c10e63c943b4c67561ddc6bf61e01d4141f881f
[SCSI] limit state transitions in scsi_internal_device_unblock

Fix by rejecting offline and cancel in the state transition.

Signed-off-by: Christof Schmitt &lt;christof.schmitt@de.ibm.com&gt;
[jejb: Original patch by Christof Schmitt, modified by Mike Christie]
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[SCSI] fix use-after-free in scsi_init_io()</title>
<updated>2010-09-09T14:58:18Z</updated>
<author>
<name>James Bottomley</name>
</author>
<published>2010-08-16T15:06:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a5c19c23db65a554f2e4f5df5f307c668277056'/>
<id>urn:sha1:3a5c19c23db65a554f2e4f5df5f307c668277056</id>
<content type='text'>
we're using a pointer through a freed command to reset the request,
which has shown up as an oops with slab poisoning:

Reported-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>scsi: remove superfluous NULL pointer check from scsi_kill_request()</title>
<updated>2010-08-11T15:59:00Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
</author>
<published>2010-08-11T01:01:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d6e9fb46cd9e60946dc3e89ad8e32dd251dcc05d'/>
<id>urn:sha1:d6e9fb46cd9e60946dc3e89ad8e32dd251dcc05d</id>
<content type='text'>
Dan's list included:

drivers/scsi/scsi_lib.c +1365 scsi_kill_request(9) warning: variable derefenced in initializer 'cmd'
drivers/scsi/scsi_lib.c +1365 scsi_kill_request(9) warning: variable derefenced before check 'cmd'

We dereference cmd (and possible OOPS if cmd == NULL) before starting the
request so just remove the superfluous debugging code altogether.

[ bart: the potential NULL pointer dereference was finally fixed in
  (much later than mine) commit 03b1470 but my patch is still valid ]

Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Eugene Teo &lt;eteo@redhat.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>scsi: fix discard page leak</title>
<updated>2010-08-07T16:24:28Z</updated>
<author>
<name>FUJITA Tomonori</name>
</author>
<published>2010-07-08T08:16:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=610a63498f7f366031a6327eaaa9963ffa110b2b'/>
<id>urn:sha1:610a63498f7f366031a6327eaaa9963ffa110b2b</id>
<content type='text'>
We leak a page allocated for discard on some error conditions
(e.g. scsi_prep_state_check returns BLKPREP_DEFER in
scsi_setup_blk_pc_cmnd).

We unprep on requests that weren't prepped in the error path of
scsi_init_io. It makes the error path to clean up scsi commands messy.

Let's strictly apply the rule that we can't unprep on a request that
wasn't prepped.

Calling just scsi_put_command() in the error path of scsi_init_io() is
enough. We don't set REQ_DONTPREP yet.

scsi_setup_discard_cmnd can safely free a page on the error case with
the above rule.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>block: implement an unprep function corresponding directly to prep</title>
<updated>2010-08-07T16:23:47Z</updated>
<author>
<name>James Bottomley</name>
</author>
<published>2010-07-01T10:49:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=28018c242a4ec7017bbbf81d2d3952f820a27118'/>
<id>urn:sha1:28018c242a4ec7017bbbf81d2d3952f820a27118</id>
<content type='text'>
Reviewed-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;

Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>block: remove wrappers for request type/flags</title>
<updated>2010-08-07T16:17:56Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2010-08-07T16:17:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33659ebbae262228eef4e0fe990f393d1f0ed941'/>
<id>urn:sha1:33659ebbae262228eef4e0fe990f393d1f0ed941</id>
<content type='text'>
Remove all the trivial wrappers for the cmd_type and cmd_flags fields in
struct requests.  This allows much easier grepping for different request
types instead of unwinding through macros.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block</title>
<updated>2010-03-01T17:00:29Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2010-03-01T17:00:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1bf9368407ae7e89d8a005bb40beb70a41df539'/>
<id>urn:sha1:b1bf9368407ae7e89d8a005bb40beb70a41df539</id>
<content type='text'>
* 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block: (38 commits)
  block: don't access jiffies when initialising io_context
  cfq: remove 8 bytes of padding from cfq_rb_root on 64 bit builds
  block: fix for "Consolidate phys_segment and hw_segment limits"
  cfq-iosched: quantum check tweak
  blktrace: perform cleanup after setup error
  blkdev: fix merge_bvec_fn return value checks
  cfq-iosched: requests "in flight" vs "in driver" clarification
  cciss: Fix problem with scatter gather elements in the scsi half of the driver
  cciss: eliminate unnecessary pointer use in cciss scsi code
  cciss: do not use void pointer for scsi hba data
  cciss: factor out scatter gather chain block mapping code
  cciss: fix scatter gather chain block dma direction kludge
  cciss: simplify scatter gather code
  cciss: factor out scatter gather chain block allocation and freeing
  cciss: detect bad alignment of scsi commands at build time
  cciss: clarify command list padding calculation
  cfq-iosched: rethink seeky detection for SSDs
  cfq-iosched: rework seeky detection
  block: remove padding from io_context on 64bit builds
  block: Consolidate phys_segment and hw_segment limits
  ...
</content>
</entry>
<entry>
<title>block: Consolidate phys_segment and hw_segment limits</title>
<updated>2010-02-26T12:58:08Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2010-02-26T05:20:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a78362c4eefc1deddbefe2c7f38aabbc2429d6b'/>
<id>urn:sha1:8a78362c4eefc1deddbefe2c7f38aabbc2429d6b</id>
<content type='text'>
Except for SCSI no device drivers distinguish between physical and
hardware segment limits.  Consolidate the two into a single segment
limit.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: Rename blk_queue_max_sectors to blk_queue_max_hw_sectors</title>
<updated>2010-02-26T12:58:08Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2010-02-26T05:20:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=086fa5ff0854c676ec333760f4c0154b3b242616'/>
<id>urn:sha1:086fa5ff0854c676ec333760f4c0154b3b242616</id>
<content type='text'>
The block layer calling convention is blk_queue_&lt;limit name&gt;.
blk_queue_max_sectors predates this practice, leading to some confusion.
Rename the function to appropriately reflect that its intended use is to
set max_hw_sectors.

Also introduce a temporary wrapper for backwards compability.  This can
be removed after the merge window is closed.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
</feed>
