Skip to content

DLPX-91780 Merge conflict in linux-kernel-aws after DLPX-91748 #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
2b6d9ab
DLPX-71852 iSCSI: journal flooded with "Unable to locate Target IQN" …
pzakha Feb 9, 2021
b96dd19
DLPX-74216 nfs-server restarts fail when order-5 allocations are exha…
Feb 26, 2021
8f95b92
DLPX-72065 Aborted iSCSI command never completes after LUN reset (#4)
pzakha Mar 8, 2021
368917a
DLPX-82827 Fix for Solaris NFSv4 client mounts (#19)
Sep 6, 2022
c9c0381
DLPX-83442 Disable various kernel modules which we don't use (#20)
Aug 8, 2023
c08a599
TOOL-16649 CONFIG_MD is needed on the buildserver (#22)
Nov 10, 2022
cef038a
target: login should wait until tx/rx threads have properly started. …
pcd1193182 Nov 14, 2022
76cf593
DLPX-83701 Make function mnt_add_count() traceable (#24)
Dec 7, 2022
5510197
DLPX-84469 Users unable to connect to CIFS mounts (#28)
Feb 1, 2023
6a11d4d
DLPX-84907 CVE-2022-3628 (#29)
Mar 1, 2023
cb3e8b5
DLPX-84985 target: iscsi: fix deadlock in the iSCSI login code (#30)
sdimitro Mar 7, 2023
552f423
DLPX-84995 NFSD: Never call nfsd_file_gc() in foreground paths (#35)
Mar 21, 2023
f65f10a
DLPX-84906 Disable frame buffer drivers
sumedhbala-delphix May 3, 2023
45685fb
DLPX-86177 Azure Accelerated networking broken because Mellanox drive…
palash-gandhi May 23, 2023
e9b2110
DLPX-86675 Disk quota exceeded when unpacking an upgrade image (#44)
Jun 27, 2023
8500225
DLPX-87344 Fix kernel merge conflict with upstream
Aug 15, 2023
8d1d126
DLPX-87710 upgrade from 6.0.16.0 to 15.0.0.0 failed because disk quot…
palash-gandhi Sep 7, 2023
dbc3b14
DLPX-87970 Move Delphix annotations to linux-pkg to reduce merge conf…
palash-gandhi Sep 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,6 @@ LINUXINCLUDE := \
-I$(objtree)/include \
$(USERINCLUDE)

# UBUNTU: Include our third party driver stuff too
LINUXINCLUDE += -I$(srctree)/ubuntu/include

KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
Expand Down Expand Up @@ -675,7 +672,7 @@ endif
ifeq ($(KBUILD_EXTMOD),)
# Objects we will link into vmlinux / subdirs we need to visit
core-y := init/ usr/ arch/$(SRCARCH)/
drivers-y := drivers/ sound/ ubuntu/
drivers-y := drivers/ sound/
drivers-$(CONFIG_SAMPLES) += samples/
drivers-$(CONFIG_NET) += net/
drivers-y += virt/
Expand Down Expand Up @@ -1351,7 +1348,6 @@ headers: $(version_h) scripts_unifdef uapi-asm-generic archheaders archscripts
$(if $(filter um, $(SRCARCH)), $(error Headers not exportable for UML))
$(Q)$(MAKE) $(hdr-inst)=include/uapi
$(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi
$(Q)$(MAKE) $(hdr-inst)=ubuntu/include dst=include oldheaders=

# Deprecated. It is no-op now.
PHONY += headers_check
Expand Down
5 changes: 3 additions & 2 deletions debian.aws-5.15/config/annotations
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Menu: HEADER
# FORMAT: 4
# ARCH: amd64 arm64
# FLAVOUR: amd64-aws arm64-aws
# ARCH: amd64
# FLAVOUR: amd64-aws

include "../../debian.aws/config/annotations"

Expand Down Expand Up @@ -48,3 +48,4 @@ CONFIG_LD_VERSION policy<{'amd64': '23400', 'arm64
CONFIG_PAHOLE_VERSION policy<{'amd64': '121', 'arm64': '121'}>
CONFIG_SLS policy<{'amd64': '-'}>
CONFIG_ZERO_CALL_USED_REGS policy<{'amd64': '-', 'arm64': '-'}>

1 change: 0 additions & 1 deletion debian.aws/dkms-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
zfs-linux 2.1.5-1ubuntu6~22.04.4 modulename=zfs debpath=pool/universe/z/%package%/zfs-dkms_%version%_all.deb arch=amd64 arch=arm64 arch=ppc64el arch=s390x rprovides=spl-modules rprovides=spl-dkms rprovides=zfs-modules rprovides=zfs-dkms
v4l2loopback 0.12.7-2ubuntu2~22.04.1 modulename=v4l2loopback debpath=pool/universe/v/%package%/v4l2loopback-dkms_%version%_all.deb arch=amd64 rprovides=v4l2loopback-modules rprovides=v4l2loopback-dkms
2 changes: 0 additions & 2 deletions debian.master/dkms-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
zfs-linux 2.1.5-1ubuntu6~22.04.4 modulename=zfs debpath=pool/universe/z/%package%/zfs-dkms_%version%_all.deb arch=amd64 arch=arm64 arch=ppc64el arch=s390x rprovides=spl-modules rprovides=spl-dkms rprovides=zfs-modules rprovides=zfs-dkms
backport-iwlwifi-dkms 9858-0ubuntu3.4 modulename=iwlwifi debpath=pool/universe/b/%package%/backport-iwlwifi-dkms_%version%_all.deb arch=amd64 rprovides=iwlwifi-modules rprovides=backport-iwlwifi-dkms type=standalone
v4l2loopback 0.12.7-2ubuntu2~22.04.1 modulename=v4l2loopback debpath=pool/universe/v/%package%/v4l2loopback-dkms_%version%_all.deb arch=amd64 rprovides=v4l2loopback-modules rprovides=v4l2loopback-dkms
2 changes: 1 addition & 1 deletion debian/rules.d/2-binary-arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ shlibdeps_opts = $(if $(CROSS_COMPILE),-- -l$(CROSS_COMPILE:%-=/usr/%)/lib)
debian/scripts/fix-filenames: debian/scripts/fix-filenames.c
$(CC) -o $@ $^

$(stampdir)/stamp-prepare-%: config-prepare-check-%
$(stampdir)/stamp-prepare-%: $(stampdir)/stamp-prepare-tree-%
@echo Debug: $@
@touch $@
$(stampdir)/stamp-prepare-tree-%: target_flavour = $*
Expand Down
2 changes: 2 additions & 0 deletions drivers/target/iscsi/iscsi_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -3815,6 +3815,7 @@ int iscsi_target_tx_thread(void *arg)
* connection recovery / failure event can be triggered externally.
*/
allow_signal(SIGINT);
complete(&conn->kthr_start_comp);

while (!kthread_should_stop()) {
/*
Expand Down Expand Up @@ -4043,6 +4044,7 @@ int iscsi_target_rx_thread(void *arg)
* connection recovery / failure event can be triggered externally.
*/
allow_signal(SIGINT);
complete(&conn->kthr_start_comp);
/*
* Wait for iscsi_post_login_handler() to complete before allowing
* incoming iscsi/tcp socket I/O, and/or failing the connection.
Expand Down
23 changes: 19 additions & 4 deletions drivers/target/iscsi/iscsi_target_erl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,18 @@ void iscsit_handle_dataout_timeout(struct timer_list *t)

iscsit_inc_conn_usage_count(conn);

/*
* If the command was aborted, for instance following a LUN RESET,
* a dataout timeout might be normal.
*/
if (target_cmd_interrupted(&cmd->se_cmd)) {
pr_debug("DataOut timeout on interrupted cmd with"
" ITT[0x%08llx]\n", cmd->se_cmd.tag);
cmd->dataout_timer_flags &= ~ISCSI_TF_RUNNING;
iscsit_dec_conn_usage_count(conn);
return;
}

spin_lock_bh(&cmd->dataout_timeout_lock);
if (cmd->dataout_timer_flags & ISCSI_TF_STOP) {
spin_unlock_bh(&cmd->dataout_timeout_lock);
Expand All @@ -1115,19 +1127,22 @@ void iscsit_handle_dataout_timeout(struct timer_list *t)
if (!sess->sess_ops->ErrorRecoveryLevel) {
pr_err("Unable to recover from DataOut timeout while"
" in ERL=0, closing iSCSI connection for I_T Nexus"
" %s,i,0x%6phN,%s,t,0x%02x\n",
" %s,i,0x%6phN,%s,t,0x%02x, cmd ITT[0x%08llx]\n",
sess->sess_ops->InitiatorName, sess->isid,
sess->tpg->tpg_tiqn->tiqn, (u32)sess->tpg->tpgt);
sess->tpg->tpg_tiqn->tiqn, (u32)sess->tpg->tpgt,
cmd->se_cmd.tag);
goto failure;
}

if (++cmd->dataout_timeout_retries == na->dataout_timeout_retries) {
pr_err("Command ITT: 0x%08x exceeded max retries"
" for DataOUT timeout %u, closing iSCSI connection for"
" I_T Nexus %s,i,0x%6phN,%s,t,0x%02x\n",
" I_T Nexus %s,i,0x%6phN,%s,t,0x%02x,"
" cmd ITT[0x%08llx]\n",
cmd->init_task_tag, na->dataout_timeout_retries,
sess->sess_ops->InitiatorName, sess->isid,
sess->tpg->tpg_tiqn->tiqn, (u32)sess->tpg->tpgt);
sess->tpg->tpg_tiqn->tiqn, (u32)sess->tpg->tpgt,
cmd->se_cmd.tag);
goto failure;
}

Expand Down
6 changes: 5 additions & 1 deletion drivers/target/iscsi/iscsi_target_login.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ int iscsit_start_kthreads(struct iscsi_conn *conn)
ret = PTR_ERR(conn->tx_thread);
goto out_bitmap;
}
wait_for_completion(&conn->kthr_start_comp);
conn->tx_thread_active = true;

conn->rx_thread = kthread_run(iscsi_target_rx_thread, conn,
Expand All @@ -656,6 +657,7 @@ int iscsit_start_kthreads(struct iscsi_conn *conn)
ret = PTR_ERR(conn->rx_thread);
goto out_tx;
}
wait_for_completion(&conn->kthr_start_comp);
conn->rx_thread_active = true;

return 0;
Expand Down Expand Up @@ -1104,6 +1106,7 @@ static struct iscsi_conn *iscsit_alloc_conn(struct iscsi_np *np)
init_completion(&conn->rx_half_close_comp);
init_completion(&conn->tx_half_close_comp);
init_completion(&conn->rx_login_comp);
init_completion(&conn->kthr_start_comp);
spin_lock_init(&conn->cmd_lock);
spin_lock_init(&conn->conn_usage_lock);
spin_lock_init(&conn->immed_queue_lock);
Expand All @@ -1114,6 +1117,7 @@ static struct iscsi_conn *iscsit_alloc_conn(struct iscsi_np *np)
timer_setup(&conn->nopin_response_timer,
iscsit_handle_nopin_response_timeout, 0);
timer_setup(&conn->nopin_timer, iscsit_handle_nopin_timeout, 0);
timer_setup(&conn->login_timer, iscsit_login_timeout, 0);

if (iscsit_conn_set_transport(conn, np->np_transport) < 0)
goto free_conn;
Expand Down Expand Up @@ -1154,7 +1158,7 @@ void iscsi_target_login_sess_out(struct iscsi_conn *conn,
if (!new_sess)
goto old_sess_out;

pr_err("iSCSI Login negotiation failed.\n");
pr_debug("iSCSI Login negotiation failed.\n");
iscsit_collect_login_stats(conn, ISCSI_STATUS_CLS_INITIATOR_ERR,
ISCSI_LOGIN_STATUS_INIT_ERR);
if (!zero_tsih || !conn->sess)
Expand Down
50 changes: 18 additions & 32 deletions drivers/target/iscsi/iscsi_target_nego.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,18 @@ static int iscsi_target_do_login(struct iscsi_conn *, struct iscsi_login *);

static bool __iscsi_target_sk_check_close(struct sock *sk)
{
if (sk->sk_state == TCP_CLOSE_WAIT || sk->sk_state == TCP_CLOSE) {
pr_debug("__iscsi_target_sk_check_close: TCP_CLOSE_WAIT|TCP_CLOSE,"
switch (sk->sk_state) {
case TCP_FIN_WAIT1:
case TCP_FIN_WAIT2:
case TCP_CLOSE_WAIT:
case TCP_LAST_ACK:
case TCP_CLOSE:
pr_debug("__iscsi_target_sk_check_close: socket closing,"
"returning TRUE\n");
return true;
default:
return false;
}
return false;
}

static bool iscsi_target_sk_check_close(struct iscsi_conn *conn)
Expand Down Expand Up @@ -534,25 +540,6 @@ static void iscsi_target_login_drop(struct iscsi_conn *conn, struct iscsi_login
iscsi_target_login_sess_out(conn, zero_tsih, true);
}

struct conn_timeout {
struct timer_list timer;
struct iscsi_conn *conn;
};

static void iscsi_target_login_timeout(struct timer_list *t)
{
struct conn_timeout *timeout = from_timer(timeout, t, timer);
struct iscsi_conn *conn = timeout->conn;

pr_debug("Entering iscsi_target_login_timeout >>>>>>>>>>>>>>>>>>>\n");

if (conn->login_kworker) {
pr_debug("Sending SIGINT to conn->login_kworker %s/%d\n",
conn->login_kworker->comm, conn->login_kworker->pid);
send_sig(SIGINT, conn->login_kworker, 1);
}
}

static void iscsi_target_do_login_rx(struct work_struct *work)
{
struct iscsi_conn *conn = container_of(work,
Expand All @@ -561,7 +548,6 @@ static void iscsi_target_do_login_rx(struct work_struct *work)
struct iscsi_np *np = login->np;
struct iscsi_portal_group *tpg = conn->tpg;
struct iscsi_tpg_np *tpg_np = conn->tpg_np;
struct conn_timeout timeout;
int rc, zero_tsih = login->zero_tsih;
bool state;

Expand Down Expand Up @@ -599,14 +585,7 @@ static void iscsi_target_do_login_rx(struct work_struct *work)
conn->login_kworker = current;
allow_signal(SIGINT);

timeout.conn = conn;
timer_setup_on_stack(&timeout.timer, iscsi_target_login_timeout, 0);
mod_timer(&timeout.timer, jiffies + TA_LOGIN_TIMEOUT * HZ);
pr_debug("Starting login timer for %s/%d\n", current->comm, current->pid);

rc = conn->conn_transport->iscsit_get_login_rx(conn, login);
del_timer_sync(&timeout.timer);
destroy_timer_on_stack(&timeout.timer);
flush_signals(current);
conn->login_kworker = NULL;

Expand Down Expand Up @@ -647,6 +626,7 @@ static void iscsi_target_do_login_rx(struct work_struct *work)
goto err;
} else if (rc == 1) {
cancel_delayed_work(&conn->login_work);
iscsit_stop_login_timer(conn);
iscsi_target_nego_release(conn);
iscsi_post_login_handler(np, conn, zero_tsih);
iscsit_deaccess_np(np, tpg, tpg_np);
Expand All @@ -656,6 +636,7 @@ static void iscsi_target_do_login_rx(struct work_struct *work)
err:
iscsi_target_restore_sock_callbacks(conn);
cancel_delayed_work(&conn->login_work);
iscsit_stop_login_timer(conn);
iscsi_target_login_drop(conn, login);
iscsit_deaccess_np(np, tpg, tpg_np);
}
Expand Down Expand Up @@ -1183,7 +1164,7 @@ int iscsi_target_locate_portal(
*/
tiqn = iscsit_get_tiqn_for_login(t_buf);
if (!tiqn) {
pr_err("Unable to locate Target IQN: %s in"
pr_debug("Unable to locate Target IQN: %s in"
" Storage Node\n", t_buf);
iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
ISCSI_LOGIN_STATUS_SVC_UNAVAILABLE);
Expand Down Expand Up @@ -1301,6 +1282,9 @@ int iscsi_target_start_negotiation(
set_bit(LOGIN_FLAGS_INITIAL_PDU, &conn->login_flags);
write_unlock_bh(&sk->sk_callback_lock);
}

iscsit_start_login_timer(conn);

/*
* If iscsi_target_do_login returns zero to signal more PDU
* exchanges are required to complete the login, go ahead and
Expand All @@ -1319,8 +1303,10 @@ int iscsi_target_start_negotiation(
iscsi_target_restore_sock_callbacks(conn);
iscsi_remove_failed_auth_entry(conn);
}
if (ret != 0)
if (ret != 0) {
iscsit_stop_login_timer(conn);
iscsi_target_nego_release(conn);
}

return ret;
}
Expand Down
28 changes: 28 additions & 0 deletions drivers/target/iscsi/iscsi_target_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,34 @@ void iscsit_stop_nopin_timer(struct iscsi_conn *conn)
spin_unlock_bh(&conn->nopin_timer_lock);
}

void iscsit_login_timeout(struct timer_list *t)
{
struct iscsi_conn *conn = from_timer(conn, t, login_timer);

pr_debug("Entering iscsi_target_login_timeout >>>>>>>>>>>>>>>>>>>\n");

if (conn->login_kworker) {
pr_debug("Sending SIGINT to conn->login_kworker %s/%d\n",
conn->login_kworker->comm, conn->login_kworker->pid);
send_sig(SIGINT, conn->login_kworker, 1);
} else {
pr_debug("Shutting down the socket.\n");
kernel_sock_shutdown(conn->sock, SHUT_RDWR);
}
}

void iscsit_start_login_timer(struct iscsi_conn *conn)
{
pr_debug("Login timer started\n");
mod_timer(&conn->login_timer, jiffies + TA_LOGIN_TIMEOUT * HZ);
}

void iscsit_stop_login_timer(struct iscsi_conn *conn)
{
pr_debug("Login timer stopped\n");
del_timer_sync(&conn->login_timer);
}

int iscsit_send_tx_data(
struct iscsi_cmd *cmd,
struct iscsi_conn *conn,
Expand Down
3 changes: 3 additions & 0 deletions drivers/target/iscsi/iscsi_target_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ extern void iscsit_handle_nopin_timeout(struct timer_list *t);
extern void __iscsit_start_nopin_timer(struct iscsi_conn *);
extern void iscsit_start_nopin_timer(struct iscsi_conn *);
extern void iscsit_stop_nopin_timer(struct iscsi_conn *);
extern void iscsit_login_timeout(struct timer_list *t);
extern void iscsit_start_login_timer(struct iscsi_conn *);
extern void iscsit_stop_login_timer(struct iscsi_conn *);
extern int iscsit_send_tx_data(struct iscsi_cmd *, struct iscsi_conn *, int);
extern int iscsit_fe_sendpage_sg(struct iscsi_cmd *, struct iscsi_conn *);
extern int iscsit_tx_login_rsp(struct iscsi_conn *, u8, u8);
Expand Down
3 changes: 2 additions & 1 deletion drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ static void target_abort_work(struct work_struct *work)
target_handle_abort(cmd);
}

static bool target_cmd_interrupted(struct se_cmd *cmd)
bool target_cmd_interrupted(struct se_cmd *cmd)
{
int post_ret;

Expand All @@ -868,6 +868,7 @@ static bool target_cmd_interrupted(struct se_cmd *cmd)

return false;
}
EXPORT_SYMBOL(target_cmd_interrupted);

/* May be called from interrupt context so must not sleep. */
void target_complete_cmd_with_sense(struct se_cmd *cmd, u8 scsi_status,
Expand Down
5 changes: 3 additions & 2 deletions fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void mnt_release_group_id(struct mount *mnt)
/*
* vfsmount lock must be held for read
*/
static inline void mnt_add_count(struct mount *mnt, int n)
static noinline __noclone void mnt_add_count(struct mount *mnt, int n)
{
#ifdef CONFIG_SMP
this_cpu_add(mnt->mnt_pcp->mnt_count, n);
Expand Down Expand Up @@ -1590,7 +1590,8 @@ static int do_umount_root(struct super_block *sb)
return ret;
}

static int do_umount(struct mount *mnt, int flags)
/* force a bpftrace dynamic function probe here */
static noinline __noclone int do_umount(struct mount *mnt, int flags)
{
struct super_block *sb = mnt->mnt.mnt_sb;
int retval;
Expand Down
2 changes: 2 additions & 0 deletions include/target/iscsi/iscsi_target_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ struct iscsi_conn {
struct completion conn_logout_comp;
struct completion tx_half_close_comp;
struct completion rx_half_close_comp;
struct completion kthr_start_comp;
/* socket used by this connection */
struct socket *sock;
void (*orig_data_ready)(struct sock *);
Expand All @@ -567,6 +568,7 @@ struct iscsi_conn {
struct timer_list nopin_timer;
struct timer_list nopin_response_timer;
struct timer_list transport_timer;
struct timer_list login_timer;
struct task_struct *login_kworker;
/* Spinlock used for add/deleting cmd's from conn_cmd_list */
spinlock_t cmd_lock;
Expand Down
1 change: 1 addition & 0 deletions include/target/target_core_fabric.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ sense_reason_t transport_generic_new_cmd(struct se_cmd *);

void target_put_cmd_and_wait(struct se_cmd *cmd);
void target_execute_cmd(struct se_cmd *cmd);
bool target_cmd_interrupted(struct se_cmd *cmd);

int transport_generic_free_cmd(struct se_cmd *, int);

Expand Down