{"shas":[["5e1710043e924fa22b725645abfd3621dc5cb4be","978acd1567d5598152161fdf8bf3ca568f950c9b@linux-iscsi.org","target: Fix task SGL chaining breakage with transport_allocate_data_tasks\n\nThis patch fixes two bugs associated with transport_do_task_sg_chain()\noperation where transport_allocate_data_tasks() was incorrectly setting\ntask_padded_sg for all tasks, and causing bogus task->task_sg_nents\nassignments + OOPsen with fabrics depending upon this code.  The first bit\nhere adds a task_sg_nents_padded check in transport_allocate_data_tasks()\nto include an extra SGL vector when necessary for tasks that expect to\nbe linked using sg_chain().\n\nThe second change involves making transport_do_task_sg_chain() properly\naccount for the extra SGL vector when task->task_padded_sg is set for\nthe non trailing ->task_sg or single ->task_sg allocations.  Note this\npatch also removes the BUG_ON(!task->task_padded_sg) check within\ntransport_do_task_sg_chain() as we expect this to happen normally\nwith the updated logic in transport_allocate_data_tasks(), along with\nbeing bogus for CONTROL_SG_IO_CDB type payloads.\n\nSo far this bugfix has been tested with tcm_qla2xxx and iblock backends\nin (task_count > 1)( and (task_count == 1) operation.\n\nReported-by: Kiran Patil <kiran.patil@intel.com>\nCc: Kiran Patil <kiran.patil@intel.com>\nCc: Andy Grover <agrover@redhat.com>\nCc: Christoph Hellwig <hch@lst.de>\nSigned-off-by: Nicholas Bellinger <nab@linux-iscsi.org>","Nicholas Bellinger"]],"ref":"refs/heads/v3.1-rc1-liofix","size":1,"head":"5e1710043e924fa22b725645abfd3621dc5cb4be","push_id":39443685}