From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chentao(Boby)" Subject: xen-blkback unmap with network retansmission will cause a coredump Date: Sat, 20 Sep 2014 18:57:16 +0800 Message-ID: <541D5D8C.8020604@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XVIMJ-0004AC-KX for xen-devel@lists.xenproject.org; Sat, 20 Sep 2014 10:57:43 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "konrad.wilk" , =?ISO-8859-1?Q?Roger_Pau_?= =?ISO-8859-1?Q?Monn=E9?= Cc: dengguoqiang@huawei.com, meiwanlong@huawei.com, mu.muyang@huawei.com, Yanqiangjun , liuyongan@huawei.com, huangzhichao@huawei.com, xen-devel@lists.xenproject.org, zhangmin , wu.wubin@huawei.com List-Id: xen-devel@lists.xenproject.org Hi konrad and roger, When xen-blkback module executes unmap operation, and at the same time the skb of network retansmission uses this map page, it will cause a crash of hostos. The crash stack of this problem is like below. {do_page_fault+0x38e} {page_fault+0x28} {memcpy+0xb} {swiotlb_tbl_map_single+0x212} {swiotlb_map_page+0x17a} {tg3:tg3_start_xmit+0x656} {dev_hard_start_xmit+0x334} {sch_direct_xmit+0x1ae} I search website, found citrix engineers has met this problem long time ago. And I realized citrix engineers solve this problem according to modify kernel stack. Because this modification is very large, linux kernel community hasn't accept it until now. I have a immature thought, in dispatch_rw_block_io function, if this io is a write operation, we use grant copy hypercall instead of grant map hypercall. I verify my modification and it can solve this problem. What's your opinion of my modification? I am very looking forward to your reply. Any reply is appreciated. Best wishes. Tao Chen