Unverified Commit 16ac9447 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!4706 mtd: Fix gluebi NULL pointer dereference caused by ftl notifier

parents 6937c0a8 999093a8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -527,7 +527,7 @@ static void blktrans_notify_add(struct mtd_info *mtd)
{
	struct mtd_blktrans_ops *tr;

	if (mtd->type == MTD_ABSENT)
	if (mtd->type == MTD_ABSENT || mtd->type == MTD_UBIVOLUME)
		return;

	list_for_each_entry(tr, &blktrans_majors, list)
@@ -570,7 +570,7 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr)
	list_add(&tr->list, &blktrans_majors);

	mtd_for_each_device(mtd)
		if (mtd->type != MTD_ABSENT)
		if (mtd->type != MTD_ABSENT && mtd->type != MTD_UBIVOLUME)
			tr->add_mtd(tr, mtd);

	mtd_table_mutex_unlock();