All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hanjun Guo <guohanjun@huawei.com>
To: Toshi Kani <toshi.kani@hp.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
	"Yu, Fenghua" <fenghua.yu@intel.com>,
	"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jiang Liu <jiang.liu@huawei.com>,
	Eric Biederman <ebiederm@xmission.com>,
	Vivek Goyal <vgoyal@redhat.com>, Haren Myneni <hbabu@us.ibm.com>,
	Yinghai Lu <yinghai@kernel.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Taku Izumi <izumi.taku@jp.fujitsu.com>,
	Wen Congyang <wency@cn.fujitsu.com>,
	Tang Chen <tangchen@cn.fujitsu.com>,
	Jianguo Wu <wujianguo@huawei.com>
Subject: Re: [BUGFIX PATCH][RESEND] kexec & iosapic: kexec oops when iosapic was removed
Date: Mon, 20 Aug 2012 07:46:46 +0000	[thread overview]
Message-ID: <5031EB66.50307@huawei.com> (raw)
In-Reply-To: <1345145597.4732.21.camel@misato.fc.hp.com>

On 2012/8/17 3:33, Toshi Kani wrote:
> On Thu, 2012-08-16 at 18:28 +0800, Hanjun Guo wrote:
>> On 2012/8/13 10:54, Luck, Tony wrote:
>>>> 		vec = irq_to_vector(irq);
>>>> 		list_for_each_entry(rte, &info->rtes,
>>>> 				rte_list) {
>>>> +			if (rte->refcnt = NO_REF_RTE)
>>>> +				continue;
>>>> +
>>>> 			iosapic_write(rte->iosapic,
>>>> 					IOSAPIC_RTE_LOW(rte->rte_index),
>>>> 					IOSAPIC_MASK|vec);
>>>
>>> This will work - but is it papering over a problem when you removed the
>>> iosapic? Should we really have removed this "rte" from rte_list when the
>>> iosapic was removed?
>>>
>>> -Tony
>>>
>>
>> Hi Tony,
>>     Thanks for your comments, and sorry for the late reply.
>>
>> We only set rte->refcnt to NO_REF_RTE if no device attach to this RTE when
>> unregister a GSI, and increase the rte->refcnt if the RTE is already existing
>> when register a GSI, so "rte" will not removed from rte_list when the
>> iosapic is removed.
> 
> Hi Hanjun,
> 
> I think updating rte->refcnt makes sense as long as rte->iosapic points
> to a valid iosapic entry.  It looks odd to me that rte->iosapic is left
> pointing an invalid iosapic entry after this iosapic is removed.  So, I
> agree with Tony's concern.

Hi Toshi,

I agree with you and Tony.
I will find a better solution and do some clean up, and then send another patch.

Thanks
Hanjun Guo





WARNING: multiple messages have this Message-ID (diff)
From: Hanjun Guo <guohanjun@huawei.com>
To: Toshi Kani <toshi.kani@hp.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
	"Yu, Fenghua" <fenghua.yu@intel.com>,
	"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jiang Liu <jiang.liu@huawei.com>,
	Eric Biederman <ebiederm@xmission.com>,
	Vivek Goyal <vgoyal@redhat.com>, Haren Myneni <hbabu@us.ibm.com>,
	Yinghai Lu <yinghai@kernel.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Taku Izumi <izumi.taku@jp.fujitsu.com>,
	Wen Congyang <wency@cn.fujitsu.com>,
	Tang Chen <tangchen@cn.fujitsu.com>,
	Jianguo Wu <wujianguo@huawei.com>
Subject: Re: [BUGFIX PATCH][RESEND] kexec & iosapic: kexec oops when iosapic was removed
Date: Mon, 20 Aug 2012 15:46:46 +0800	[thread overview]
Message-ID: <5031EB66.50307@huawei.com> (raw)
In-Reply-To: <1345145597.4732.21.camel@misato.fc.hp.com>

On 2012/8/17 3:33, Toshi Kani wrote:
> On Thu, 2012-08-16 at 18:28 +0800, Hanjun Guo wrote:
>> On 2012/8/13 10:54, Luck, Tony wrote:
>>>> 		vec = irq_to_vector(irq);
>>>> 		list_for_each_entry(rte, &info->rtes,
>>>> 				rte_list) {
>>>> +			if (rte->refcnt == NO_REF_RTE)
>>>> +				continue;
>>>> +
>>>> 			iosapic_write(rte->iosapic,
>>>> 					IOSAPIC_RTE_LOW(rte->rte_index),
>>>> 					IOSAPIC_MASK|vec);
>>>
>>> This will work - but is it papering over a problem when you removed the
>>> iosapic? Should we really have removed this "rte" from rte_list when the
>>> iosapic was removed?
>>>
>>> -Tony
>>>
>>
>> Hi Tony,
>>     Thanks for your comments, and sorry for the late reply.
>>
>> We only set rte->refcnt to NO_REF_RTE if no device attach to this RTE when
>> unregister a GSI, and increase the rte->refcnt if the RTE is already existing
>> when register a GSI, so "rte" will not removed from rte_list when the
>> iosapic is removed.
> 
> Hi Hanjun,
> 
> I think updating rte->refcnt makes sense as long as rte->iosapic points
> to a valid iosapic entry.  It looks odd to me that rte->iosapic is left
> pointing an invalid iosapic entry after this iosapic is removed.  So, I
> agree with Tony's concern.

Hi Toshi,

I agree with you and Tony.
I will find a better solution and do some clean up, and then send another patch.

Thanks
Hanjun Guo





  reply	other threads:[~2012-08-20  7:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10  7:23 [BUGFIX PATCH] kexec & iosapic: kexec oops when iosapic was removed Hanjun Guo
2012-08-11  3:10 ` [BUGFIX PATCH][RESEND] " Hanjun Guo
2012-08-11  3:10   ` Hanjun Guo
2012-08-13  2:54   ` Luck, Tony
2012-08-13  2:54     ` Luck, Tony
2012-08-16 10:28     ` Hanjun Guo
2012-08-16 10:28       ` Hanjun Guo
2012-08-16 19:33       ` Toshi Kani
2012-08-16 19:33         ` Toshi Kani
2012-08-20  7:46         ` Hanjun Guo [this message]
2012-08-20  7:46           ` Hanjun Guo

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=5031EB66.50307@huawei.com \
    --to=guohanjun@huawei.com \
    --cc=ebiederm@xmission.com \
    --cc=fenghua.yu@intel.com \
    --cc=hbabu@us.ibm.com \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=jiang.liu@huawei.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tangchen@cn.fujitsu.com \
    --cc=tony.luck@intel.com \
    --cc=toshi.kani@hp.com \
    --cc=vgoyal@redhat.com \
    --cc=wency@cn.fujitsu.com \
    --cc=wujianguo@huawei.com \
    --cc=yinghai@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.