Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending

Pull target fixes from Nicholas Bellinger:
"This includes a bugfix from MDR to address a NULL pointer OOPs with
FCoE aborts, along with a WRITE_SAME emulation bugfix for NOLB=0
cases, and persistent reservation return cleanups from Roland.

All three patches are CC'ed to stable."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
target: Fix range calculation in WRITE SAME emulation when num blocks == 0
target: Clean up returning errors in PR handling code
tcm_fc: Fix crash seen with aborts and large reads

+7 -4
+1 -1
drivers/target/target_core_cdb.c
··· 1095 1095 if (num_blocks != 0) 1096 1096 range = num_blocks; 1097 1097 else 1098 - range = (dev->transport->get_blocks(dev) - lba); 1098 + range = (dev->transport->get_blocks(dev) - lba) + 1; 1099 1099 1100 1100 pr_debug("WRITE_SAME UNMAP: LBA: %llu Range: %llu\n", 1101 1101 (unsigned long long)lba, (unsigned long long)range);
+4 -3
drivers/target/target_core_pr.c
··· 2031 2031 if (IS_ERR(file) || !file || !file->f_dentry) { 2032 2032 pr_err("filp_open(%s) for APTPL metadata" 2033 2033 " failed\n", path); 2034 - return (PTR_ERR(file) < 0 ? PTR_ERR(file) : -ENOENT); 2034 + return IS_ERR(file) ? PTR_ERR(file) : -ENOENT; 2035 2035 } 2036 2036 2037 2037 iov[0].iov_base = &buf[0]; ··· 3818 3818 " SPC-2 reservation is held, returning" 3819 3819 " RESERVATION_CONFLICT\n"); 3820 3820 cmd->scsi_sense_reason = TCM_RESERVATION_CONFLICT; 3821 - ret = EINVAL; 3821 + ret = -EINVAL; 3822 3822 goto out; 3823 3823 } 3824 3824 ··· 3828 3828 */ 3829 3829 if (!cmd->se_sess) { 3830 3830 cmd->scsi_sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; 3831 - return -EINVAL; 3831 + ret = -EINVAL; 3832 + goto out; 3832 3833 } 3833 3834 3834 3835 if (cmd->data_length < 24) {
+2
drivers/target/tcm_fc/tfc_cmd.c
··· 230 230 { 231 231 struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd); 232 232 233 + if (cmd->aborted) 234 + return ~0; 233 235 return fc_seq_exch(cmd->seq)->rxid; 234 236 } 235 237