mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KyongHo Cho <pullip.cho@samsung.com>
To: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Cc: Joerg Roedel <joro@8bytes.org>,
	Sanghyun Lee <sanghyun75.lee@samsung.com>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Younglak Kim <younglak1004.kim@samsung.com>,
	KyongHo Cho <pullip.cho@samsung.com>
Subject: [PATCH] iommu: Initialize domain->handler in iommu_domain_alloc()
Date: Tue, 13 Dec 2011 16:14:26 +0900	[thread overview]
Message-ID: <1323760466-30333-1-git-send-email-pullip.cho@samsung.com> (raw)

Since it is not guaranteed that an iommu driver initializes in its
domain_init() function, it must be initialized with NULL to prevent
calling a function in an arbitrary location when iommu fault occurred.

Signed-off-by: KyongHo Cho <pullip.cho@samsung.com>
---
 drivers/iommu/iommu.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 7cc3c65..1afb896 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -148,6 +148,7 @@ struct iommu_domain *iommu_domain_alloc(struct bus_type *bus)
 		return NULL;
 
 	domain->ops = bus->iommu_ops;
+	domain->handler = NULL;
 
 	ret = domain->ops->domain_init(domain);
 	if (ret)
-- 
1.7.1


             reply	other threads:[~2011-12-15  5:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-13  7:14 KyongHo Cho [this message]
2011-12-15  8:10 ` Joerg Roedel
2011-12-16 12:38   ` KyongHo Cho
2011-12-16 14:15     ` 'Joerg Roedel'

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1323760466-30333-1-git-send-email-pullip.cho@samsung.com \
    --to=pullip.cho@samsung.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sanghyun75.lee@samsung.com \
    --cc=younglak1004.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome