From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:58966 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753002AbeBXCqp (ORCPT ); Fri, 23 Feb 2018 21:46:45 -0500 Date: Fri, 23 Feb 2018 18:46:41 -0800 From: Matthew Wilcox To: Chris Mi Cc: Cong Wang , Khalid Aziz , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: Re: Fwd: Re: Kernel panic with 4.16-rc1 (and 4.16-rc2) running selftest Message-ID: <20180224024641.GB15231@bombadil.infradead.org> References: <7995f335-ccac-bfdc-bb37-46d0f887c647@oracle.com> <96bf4941-17c0-0796-292c-b66087f5f52e@infradead.org> <20180224011528.GA15231@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Sat, Feb 24, 2018 at 01:49:35AM +0000, Chris Mi wrote: > To verify this patch, the following is a sanity test case: > > # tc qdisc delete dev $link ingress > /dev/null 2>&1; > # tc qdisc add dev $link ingress; > # tc filter add dev $link prio 1 protocol ip handle 0x80000001 parent ffff: flower skip_hw src_mac e4:11:0:0:0:2 dst_mac e4:12:0:0:0:2 action drop; > # tc filter show dev $link parent ffff: > > filter pref 1 flower chain 0 > filter pref 1 flower chain 0 handle 0x80000001 I added these tests to my local tree for now. diff --git a/tools/testing/radix-tree/idr-test.c b/tools/testing/radix-tree/idr-test.c index 44ef9eba5a7a..28d99325a32d 100644 --- a/tools/testing/radix-tree/idr-test.c +++ b/tools/testing/radix-tree/idr-test.c @@ -178,6 +178,29 @@ void idr_get_next_test(int base) idr_destroy(&idr); } +void idr_u32_test(struct idr *idr, int base) +{ + assert(idr_is_empty(idr)); + idr_init_base(idr, base); + u32 handle = 10; + idr_alloc_u32(idr, NULL, &handle, handle, GFP_KERNEL); + BUG_ON(handle != 10); + idr_remove(idr, handle); + assert(idr_is_empty(idr)); + + handle = 0x80000001; + idr_alloc_u32(idr, NULL, &handle, handle, GFP_KERNEL); + BUG_ON(handle != 0x80000001); + idr_remove(idr, handle); + assert(idr_is_empty(idr)); + + handle = 0xffe00000; + idr_alloc_u32(idr, NULL, &handle, handle, GFP_KERNEL); + BUG_ON(handle != 0xffe00000); + idr_remove(idr, handle); + assert(idr_is_empty(idr)); +} + void idr_checks(void) { unsigned long i; @@ -248,6 +271,9 @@ void idr_checks(void) idr_get_next_test(0); idr_get_next_test(1); idr_get_next_test(4); + idr_u32_test(&idr, 0); + idr_u32_test(&idr, 1); + idr_u32_test(&idr, 4); } /*