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

Commit 61a53d80 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ext4: fix potential use after free in __ext4_journal_stop"

parents b4003190 f8c8ce79
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -829,6 +829,7 @@ static void disk_seqf_stop(struct seq_file *seqf, void *v)
	if (iter) {
		class_dev_iter_exit(iter);
		kfree(iter);
		seqf->private = NULL;
	}
}

+2 −0
Original line number Diff line number Diff line
@@ -149,8 +149,10 @@ static int get_task_ioprio(struct task_struct *p)
	if (ret)
		goto out;
	ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM);
	task_lock(p);
	if (p->io_context)
		ret = p->io_context->ioprio;
	task_unlock(p);
out:
	return ret;
}
+3 −3
Original line number Diff line number Diff line
@@ -88,13 +88,13 @@ int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle)
		return 0;
	}

	err = handle->h_err;
	if (!handle->h_transaction) {
		err = jbd2_journal_stop(handle);
		return handle->h_err ? handle->h_err : err;
		rc = jbd2_journal_stop(handle);
		return err ? err : rc;
	}

	sb = handle->h_transaction->t_journal->j_private;
	err = handle->h_err;
	rc = jbd2_journal_stop(handle);

	if (!err)