Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755674Ab2HTHrn (ORCPT ); Mon, 20 Aug 2012 03:47:43 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:6230 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755622Ab2HTHrk (ORCPT ); Mon, 20 Aug 2012 03:47:40 -0400 Message-ID: <5031EB66.50307@huawei.com> Date: Mon, 20 Aug 2012 15:46:46 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Toshi Kani CC: "Luck, Tony" , "Yu, Fenghua" , "linux-ia64@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jiang Liu , Eric Biederman , Vivek Goyal , Haren Myneni , Yinghai Lu , Yasuaki Ishimatsu , Taku Izumi , Wen Congyang , Tang Chen , Jianguo Wu Subject: Re: [BUGFIX PATCH][RESEND] kexec & iosapic: kexec oops when iosapic was removed References: <1344583395-9128-1-git-send-email-guohanjun@huawei.com> <5025CD41.2030502@huawei.com> <3908561D78D1C84285E8C5FCA982C28F19375F30@ORSMSX104.amr.corp.intel.com> <502CCB38.1030705@huawei.com> <1345145597.4732.21.camel@misato.fc.hp.com> In-Reply-To: <1345145597.4732.21.camel@misato.fc.hp.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.135.69.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1601 Lines: 51 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/