Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9e4e6e1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  tcm_fc: Handle DDP/SW fc_frame_payload_get failures in ft_recv_write_data
  target: Fix bug for transport_generic_wait_for_tasks with direct operation
  target: iscsi_target depends on NET
  target: Fix WRITE_SAME_16 lba assignment breakage
  MAINTAINERS: Add target-devel list for drivers/target/
  iscsi-target: Fix CONFIG_SMP=n and CONFIG_MODULES=n build failure
  iscsi-target: Fix snprintf usage with MAX_PORTAL_LEN
  iscsi-target: Fix uninitialized usage of cmd->pad_bytes
  iscsi-target: strlen() doesn't count the terminator
  iscsi-target: Fix NULL dereference on allocation failure
parents 27665ffa dcd998cc
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -6319,6 +6319,7 @@ F: include/linux/sysv_fs.h
TARGET SUBSYSTEM
TARGET SUBSYSTEM
M:	Nicholas A. Bellinger <nab@linux-iscsi.org>
M:	Nicholas A. Bellinger <nab@linux-iscsi.org>
L:	linux-scsi@vger.kernel.org
L:	linux-scsi@vger.kernel.org
L:	target-devel@vger.kernel.org
L:	http://groups.google.com/group/linux-iscsi-target-dev
L:	http://groups.google.com/group/linux-iscsi-target-dev
W:	http://www.linux-iscsi.org
W:	http://www.linux-iscsi.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git master
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git master
+1 −0
Original line number Original line Diff line number Diff line
config ISCSI_TARGET
config ISCSI_TARGET
	tristate "Linux-iSCSI.org iSCSI Target Mode Stack"
	tristate "Linux-iSCSI.org iSCSI Target Mode Stack"
	depends on NET
	select CRYPTO
	select CRYPTO
	select CRYPTO_CRC32C
	select CRYPTO_CRC32C
	select CRYPTO_CRC32C_INTEL if X86
	select CRYPTO_CRC32C_INTEL if X86
+10 −5
Original line number Original line Diff line number Diff line
@@ -120,7 +120,7 @@ struct iscsi_tiqn *iscsit_add_tiqn(unsigned char *buf)
	struct iscsi_tiqn *tiqn = NULL;
	struct iscsi_tiqn *tiqn = NULL;
	int ret;
	int ret;


	if (strlen(buf) > ISCSI_IQN_LEN) {
	if (strlen(buf) >= ISCSI_IQN_LEN) {
		pr_err("Target IQN exceeds %d bytes\n",
		pr_err("Target IQN exceeds %d bytes\n",
				ISCSI_IQN_LEN);
				ISCSI_IQN_LEN);
		return ERR_PTR(-EINVAL);
		return ERR_PTR(-EINVAL);
@@ -1857,7 +1857,7 @@ static int iscsit_handle_text_cmd(
	char *text_ptr, *text_in;
	char *text_ptr, *text_in;
	int cmdsn_ret, niov = 0, rx_got, rx_size;
	int cmdsn_ret, niov = 0, rx_got, rx_size;
	u32 checksum = 0, data_crc = 0, payload_length;
	u32 checksum = 0, data_crc = 0, payload_length;
	u32 padding = 0, text_length = 0;
	u32 padding = 0, pad_bytes = 0, text_length = 0;
	struct iscsi_cmd *cmd;
	struct iscsi_cmd *cmd;
	struct kvec iov[3];
	struct kvec iov[3];
	struct iscsi_text *hdr;
	struct iscsi_text *hdr;
@@ -1896,7 +1896,7 @@ static int iscsit_handle_text_cmd(


		padding = ((-payload_length) & 3);
		padding = ((-payload_length) & 3);
		if (padding != 0) {
		if (padding != 0) {
			iov[niov].iov_base = cmd->pad_bytes;
			iov[niov].iov_base = &pad_bytes;
			iov[niov++].iov_len  = padding;
			iov[niov++].iov_len  = padding;
			rx_size += padding;
			rx_size += padding;
			pr_debug("Receiving %u additional bytes"
			pr_debug("Receiving %u additional bytes"
@@ -1917,7 +1917,7 @@ static int iscsit_handle_text_cmd(
		if (conn->conn_ops->DataDigest) {
		if (conn->conn_ops->DataDigest) {
			iscsit_do_crypto_hash_buf(&conn->conn_rx_hash,
			iscsit_do_crypto_hash_buf(&conn->conn_rx_hash,
					text_in, text_length,
					text_in, text_length,
					padding, cmd->pad_bytes,
					padding, (u8 *)&pad_bytes,
					(u8 *)&data_crc);
					(u8 *)&data_crc);


			if (checksum != data_crc) {
			if (checksum != data_crc) {
@@ -3468,7 +3468,12 @@ static inline void iscsit_thread_check_cpumask(
}
}


#else
#else
#define iscsit_thread_get_cpumask(X) ({})

void iscsit_thread_get_cpumask(struct iscsi_conn *conn)
{
	return;
}

#define iscsit_thread_check_cpumask(X, Y, Z) ({})
#define iscsit_thread_check_cpumask(X, Y, Z) ({})
#endif /* CONFIG_SMP */
#endif /* CONFIG_SMP */


+1 −1
Original line number Original line Diff line number Diff line
@@ -181,7 +181,7 @@ struct se_tpg_np *lio_target_call_addnptotpg(
		return ERR_PTR(-EOVERFLOW);
		return ERR_PTR(-EOVERFLOW);
	}
	}
	memset(buf, 0, MAX_PORTAL_LEN + 1);
	memset(buf, 0, MAX_PORTAL_LEN + 1);
	snprintf(buf, MAX_PORTAL_LEN, "%s", name);
	snprintf(buf, MAX_PORTAL_LEN + 1, "%s", name);


	memset(&sockaddr, 0, sizeof(struct __kernel_sockaddr_storage));
	memset(&sockaddr, 0, sizeof(struct __kernel_sockaddr_storage));


+1 −1
Original line number Original line Diff line number Diff line
@@ -978,7 +978,7 @@ struct iscsi_login *iscsi_target_init_negotiation(
		pr_err("Unable to allocate memory for struct iscsi_login.\n");
		pr_err("Unable to allocate memory for struct iscsi_login.\n");
		iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
		iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
				ISCSI_LOGIN_STATUS_NO_RESOURCES);
				ISCSI_LOGIN_STATUS_NO_RESOURCES);
		goto out;
		return NULL;
	}
	}


	login->req = kzalloc(ISCSI_HDR_LEN, GFP_KERNEL);
	login->req = kzalloc(ISCSI_HDR_LEN, GFP_KERNEL);
Loading