diff options
-rw-r--r-- | config-armv7 | 1 | ||||
-rw-r--r-- | kernel-arm64.patch | 87 | ||||
-rw-r--r-- | kernel.spec | 11 | ||||
-rw-r--r-- | kernfs-kernfs_notify-must-be-usable-from-non-sleepable-contexts.patch | 262 | ||||
-rw-r--r-- | sources | 2 |
5 files changed, 6 insertions, 357 deletions
diff --git a/config-armv7 b/config-armv7 index 7d37d2af2..e032333b2 100644 --- a/config-armv7 +++ b/config-armv7 @@ -369,6 +369,7 @@ CONFIG_QCOM_GSBI=m CONFIG_MSM_IOMMU=y CONFIG_DRM_MSM=m CONFIG_DRM_MSM_FBDEV=y +CONFIG_USB_EHCI_MSM=m # CONFIG_DRM_MSM_REGISTER_LOGGING is not set # i.MX diff --git a/kernel-arm64.patch b/kernel-arm64.patch index 54c3c88a0..05249a97e 100644 --- a/kernel-arm64.patch +++ b/kernel-arm64.patch @@ -623,65 +623,6 @@ Date: Mon Jun 2 05:18:35 2014 -0700 Signed-off-by: Saurabh Tangri <saurabh.tangri@intel.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> -commit 83a31f42054546344d10493a6edbd8ce1914c36b -Author: Michal Nazarewicz <mina86@mina86.com> -Date: Thu Jun 26 10:42:17 2014 +1000 - - mm: page_alloc: fix CMA area initialisation when pageblock > MAX_ORDER - - With a kernel configured with ARM64_64K_PAGES && !TRANSPARENT_HUGEPAGE, - the following is triggered at early boot: - - SMP: Total of 8 processors activated. - devtmpfs: initialized - Unable to handle kernel NULL pointer dereference at virtual address 00000008 - pgd = fffffe0000050000 - [00000008] *pgd=00000043fba00003, *pmd=00000043fba00003, *pte=00e0000078010407 - Internal error: Oops: 96000006 [#1] SMP - Modules linked in: - CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.15.0-rc864k+ #44 - task: fffffe03bc040000 ti: fffffe03bc080000 task.ti: fffffe03bc080000 - PC is at __list_add+0x10/0xd4 - LR is at free_one_page+0x270/0x638 - ... - Call trace: - [<fffffe00003ee970>] __list_add+0x10/0xd4 - [<fffffe000019c478>] free_one_page+0x26c/0x638 - [<fffffe000019c8c8>] __free_pages_ok.part.52+0x84/0xbc - [<fffffe000019d5e8>] __free_pages+0x74/0xbc - [<fffffe0000c01350>] init_cma_reserved_pageblock+0xe8/0x104 - [<fffffe0000c24de0>] cma_init_reserved_areas+0x190/0x1e4 - [<fffffe0000090418>] do_one_initcall+0xc4/0x154 - [<fffffe0000bf0a50>] kernel_init_freeable+0x204/0x2a8 - [<fffffe00007520a0>] kernel_init+0xc/0xd4 - - This happens because init_cma_reserved_pageblock() calls __free_one_page() - with pageblock_order as page order but it is bigger than MAX_ORDER. This - in turn causes accesses past zone->free_list[]. - - Fix the problem by changing init_cma_reserved_pageblock() such that it - splits pageblock into individual MAX_ORDER pages if pageblock is bigger - than a MAX_ORDER page. - - In cases where !CONFIG_HUGETLB_PAGE_SIZE_VARIABLE, which is all - architectures expect for ia64, powerpc and tile at the moment, the - “pageblock_order > MAX_ORDER” condition will be optimised out since - both sides of the operator are constants. In cases where pageblock size - is variable, the performance degradation should not be significant anyway - since init_cma_reserved_pageblock() is called only at boot time at most - MAX_CMA_AREAS times which by default is eight. - - Signed-off-by: Michal Nazarewicz <mina86@mina86.com> - Reported-by: Mark Salter <msalter@redhat.com> - Tested-by: Mark Salter <msalter@redhat.com> - Tested-by: Christopher Covington <cov@codeaurora.org> - Cc: Mel Gorman <mgorman@suse.de> - Cc: David Rientjes <rientjes@google.com> - Cc: Marek Szyprowski <m.szyprowski@samsung.com> - Cc: Catalin Marinas <catalin.marinas@arm.com> - Cc: <stable@vger.kernel.org> [3.5+] - Signed-off-by: Andrew Morton <akpm@linux-foundation.org> - commit 026545c8ed8737f6686036326a80498ae14d7fe5 Author: Suman Tripathi <stripathi@apm.com> Date: Thu Jun 19 06:51:32 2014 -0400 @@ -7163,34 +7104,6 @@ index 0000000..9eac712 +#endif + +#endif -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 20d17f8..0ea758b 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -816,9 +816,21 @@ void __init init_cma_reserved_pageblock(struct page *page) - set_page_count(p, 0); - } while (++p, --i); - -- set_page_refcounted(page); - set_pageblock_migratetype(page, MIGRATE_CMA); -- __free_pages(page, pageblock_order); -+ -+ if (pageblock_order >= MAX_ORDER) { -+ i = pageblock_nr_pages; -+ p = page; -+ do { -+ set_page_refcounted(p); -+ __free_pages(p, MAX_ORDER - 1); -+ p += MAX_ORDER_NR_PAGES; -+ } while (i -= MAX_ORDER_NR_PAGES); -+ } else { -+ set_page_refcounted(page); -+ __free_pages(page, pageblock_order); -+ } -+ - adjust_managed_page_count(page, pageblock_nr_pages); - } - #endif diff --git a/tools/perf/arch/arm64/include/perf_regs.h b/tools/perf/arch/arm64/include/perf_regs.h index e9441b9..1d3f39c 100644 --- a/tools/perf/arch/arm64/include/perf_regs.h diff --git a/kernel.spec b/kernel.spec index b50a66a5d..bc5620b3f 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %define rcrev 3 # The git snapshot level -%define gitrev 2 +%define gitrev 3 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -638,9 +638,6 @@ Patch25109: revert-input-wacom-testing-result-shows-get_report-is-unnecessary.pa #rhbz 1021036, submitted upstream Patch25110: 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch -#rhbz 1113805 -Patch25111: kernfs-kernfs_notify-must-be-usable-from-non-sleepable-contexts.patch - # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1365,9 +1362,6 @@ ApplyPatch revert-input-wacom-testing-result-shows-get_report-is-unnecessary.pat #rhbz 1021036, submitted upstream ApplyPatch 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch -#rhbz 1113805 -ApplyPatch kernfs-kernfs_notify-must-be-usable-from-non-sleepable-contexts.patch - %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2247,6 +2241,9 @@ fi # ||----w | # || || %changelog +* Fri Jul 04 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.16.0-0.rc3.git3.1 +- Linux v3.16-rc3-149-g034a0f6b7db7 + * Wed Jul 02 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.16.0-0.rc3.git2.1 - Linux v3.16-rc3-62-gd92a333a65a1 - Add patch to fix virt_blk oops (rhbz 1113805) diff --git a/kernfs-kernfs_notify-must-be-usable-from-non-sleepable-contexts.patch b/kernfs-kernfs_notify-must-be-usable-from-non-sleepable-contexts.patch deleted file mode 100644 index 83bacc342..000000000 --- a/kernfs-kernfs_notify-must-be-usable-from-non-sleepable-contexts.patch +++ /dev/null @@ -1,262 +0,0 @@ -Bugzilla: 1113805 -Upstream-status: queued for 3.16 -Delivered-To: jwboyer@gmail.com -Received: by 10.76.6.212 with SMTP id d20csp61002oaa; - Tue, 1 Jul 2014 13:41:10 -0700 (PDT) -X-Received: by 10.70.36.203 with SMTP id s11mr216865pdj.30.1404247270266; - Tue, 01 Jul 2014 13:41:10 -0700 (PDT) -Return-Path: <htejun@gmail.com> -Received: from bastion.fedoraproject.org (bastion02.fedoraproject.org. [209.132.181.3]) - by mx.google.com with ESMTP id kk10si24969097pbd.238.2014.07.01.13.41.09 - for <jwboyer@gmail.com>; - Tue, 01 Jul 2014 13:41:10 -0700 (PDT) -Received-SPF: softfail (google.com: domain of transitioning htejun@gmail.com does not designate 209.132.181.3 as permitted sender) client-ip=209.132.181.3; -Authentication-Results: mx.google.com; - spf=softfail (google.com: domain of transitioning htejun@gmail.com does not designate 209.132.181.3 as permitted sender) smtp.mail=htejun@gmail.com; - dkim=pass header.i=@gmail.com -Received: by bastion02.phx2.fedoraproject.org (Postfix) - id B10D940254; Tue, 1 Jul 2014 20:41:09 +0000 (UTC) -Delivered-To: jwboyer@fedoraproject.org -Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.16]) - by bastion02.phx2.fedoraproject.org (Postfix) with ESMTP id B85F34023B - for <jwboyer@fedoraproject.org>; Tue, 1 Jul 2014 20:41:08 +0000 (UTC) -Received: from mail-qg0-f54.google.com (mail-qg0-f54.google.com [209.85.192.54]) - by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s61Kf6SO012731 - (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) - for <jwboyer@fedoraproject.org>; Tue, 1 Jul 2014 16:41:07 -0400 -Received: by mail-qg0-f54.google.com with SMTP id q107so4001033qgd.13 - for <jwboyer@fedoraproject.org>; Tue, 01 Jul 2014 13:41:06 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20120113; - h=sender:date:from:to:cc:subject:message-id:references:mime-version - :content-type:content-disposition:in-reply-to:user-agent; - bh=6XKZNT2j9E5fPfYRAGlZGjGhRFI/mJ2H4GG/9wx0YJ8=; - b=y5rarhV+vMKAm+ta99eylQ+byg9AD0erza6YL9fdzP/Zn1StotASphxOFR5kgPTecY - QDAy7UTOje/NG0GtGLPU7r1rIT77mUNCSYhALFpG6yUHQmMlX5Lo+BuXQSOJBoIGefcv - mLwG3YwsHrmE8JEov4fJvU67VO2ZPq2GW1iTASOea3qn/f6595XqdIUHzpHjvmz/aX9R - nxAxkE+VGEZDm1Rp72rlwSSh2MJ5k3fbprLW8Ec41NyV2u5mehYHTgEf5DCu4JodmlHY - j94xfjqvm7HIqNtKGB3aTsNl2L7+dGDZ0dwbdo2/WRINOhGkPuNnJ5wqS9YaDDaQG4ND - HQ0w== -X-Received: by 10.140.22.134 with SMTP id 6mr70449172qgn.4.1404247266223; - Tue, 01 Jul 2014 13:41:06 -0700 (PDT) -Received: from htj.dyndns.org (207-38-225-25.c3-0.43d-ubr1.qens-43d.ny.cable.rcn.com. [207.38.225.25]) - by mx.google.com with ESMTPSA id q12sm39024393qad.40.2014.07.01.13.41.04 - for <multiple recipients> - (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); - Tue, 01 Jul 2014 13:41:05 -0700 (PDT) -Sender: Tejun Heo <htejun@gmail.com> -Date: Tue, 1 Jul 2014 16:41:03 -0400 -From: Tejun Heo <tj@kernel.org> -To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Cc: Jens Axboe <axboe@kernel.dk>, "Michael S. Tsirkin" <mst@redhat.com>, - Christoph Hellwig <hch@lst.de>, Josh Boyer <jwboyer@fedoraproject.org>, - Rusty Russell <rusty@rustcorp.com.au>, - virtualization@lists.linux-foundation.org, - "Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>, - Brian Lane <bcl@redhat.com>, John McCutchan <john@johnmccutchan.com>, - Robert Love <rlove@rlove.org>, Eric Paris <eparis@parisplace.org> -Subject: [PATCH driver-core-linus] kernfs: kernfs_notify() must be useable - from non-sleepable contexts -Message-ID: <20140701204103.GA12459@htj.dyndns.org> -References: <CA+5PVA4h2hQJLrAm4eEZ8oUgGiAjq2y5eAyBcJWxK_FiQXnuQg@mail.gmail.com> - <20140629082637.GA23942@redhat.com> - <20140629193222.GA7030@lst.de> - <20140629204710.GB11100@redhat.com> - <53B07D48.60003@kernel.dk> - <20140630201741.GA20853@htj.dyndns.org> -MIME-Version: 1.0 -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline -In-Reply-To: <20140630201741.GA20853@htj.dyndns.org> -User-Agent: Mutt/1.5.23 (2014-03-12) -X-RedHat-Spam-Score: -2.31 (BAYES_00,DCC_REPUT_00_12,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS) -X-Scanned-By: MIMEDefang 2.68 on 10.5.110.16 - -d911d9874801 ("kernfs: make kernfs_notify() trigger inotify events -too") added fsnotify triggering to kernfs_notify() which requires a -sleepable context. There are already existing users of -kernfs_notify() which invoke it from an atomic context and in general -it's silly to require a sleepable context for triggering a -notification. - -The following is an invalid context bug triggerd by md invoking -sysfs_notify() from IO completion path. - - BUG: sleeping function called from invalid context at kernel/locking/mutex.c:586 - in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: swapper/1 - 2 locks held by swapper/1/0: - #0: (&(&vblk->vq_lock)->rlock){-.-...}, at: [<ffffffffa0039042>] virtblk_done+0x42/0xe0 [virtio_blk] - #1: (&(&bitmap->counts.lock)->rlock){-.....}, at: [<ffffffff81633718>] bitmap_endwrite+0x68/0x240 - irq event stamp: 33518 - hardirqs last enabled at (33515): [<ffffffff8102544f>] default_idle+0x1f/0x230 - hardirqs last disabled at (33516): [<ffffffff818122ed>] common_interrupt+0x6d/0x72 - softirqs last enabled at (33518): [<ffffffff810a1272>] _local_bh_enable+0x22/0x50 - softirqs last disabled at (33517): [<ffffffff810a29e0>] irq_enter+0x60/0x80 - CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.16.0-0.rc2.git2.1.fc21.x86_64 #1 - Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 - 0000000000000000 f90db13964f4ee05 ffff88007d403b80 ffffffff81807b4c - 0000000000000000 ffff88007d403ba8 ffffffff810d4f14 0000000000000000 - 0000000000441800 ffff880078fa1780 ffff88007d403c38 ffffffff8180caf2 - Call Trace: - <IRQ> [<ffffffff81807b4c>] dump_stack+0x4d/0x66 - [<ffffffff810d4f14>] __might_sleep+0x184/0x240 - [<ffffffff8180caf2>] mutex_lock_nested+0x42/0x440 - [<ffffffff812d76a0>] kernfs_notify+0x90/0x150 - [<ffffffff8163377c>] bitmap_endwrite+0xcc/0x240 - [<ffffffffa00de863>] close_write+0x93/0xb0 [raid1] - [<ffffffffa00df029>] r1_bio_write_done+0x29/0x50 [raid1] - [<ffffffffa00e0474>] raid1_end_write_request+0xe4/0x260 [raid1] - [<ffffffff813acb8b>] bio_endio+0x6b/0xa0 - [<ffffffff813b46c4>] blk_update_request+0x94/0x420 - [<ffffffff813bf0ea>] blk_mq_end_io+0x1a/0x70 - [<ffffffffa00392c2>] virtblk_request_done+0x32/0x80 [virtio_blk] - [<ffffffff813c0648>] __blk_mq_complete_request+0x88/0x120 - [<ffffffff813c070a>] blk_mq_complete_request+0x2a/0x30 - [<ffffffffa0039066>] virtblk_done+0x66/0xe0 [virtio_blk] - [<ffffffffa002535a>] vring_interrupt+0x3a/0xa0 [virtio_ring] - [<ffffffff81116177>] handle_irq_event_percpu+0x77/0x340 - [<ffffffff8111647d>] handle_irq_event+0x3d/0x60 - [<ffffffff81119436>] handle_edge_irq+0x66/0x130 - [<ffffffff8101c3e4>] handle_irq+0x84/0x150 - [<ffffffff818146ad>] do_IRQ+0x4d/0xe0 - [<ffffffff818122f2>] common_interrupt+0x72/0x72 - <EOI> [<ffffffff8105f706>] ? native_safe_halt+0x6/0x10 - [<ffffffff81025454>] default_idle+0x24/0x230 - [<ffffffff81025f9f>] arch_cpu_idle+0xf/0x20 - [<ffffffff810f5adc>] cpu_startup_entry+0x37c/0x7b0 - [<ffffffff8104df1b>] start_secondary+0x25b/0x300 - -This patch fixes it by punting the notification delivery through a -work item. This ends up adding an extra pointer to kernfs_elem_attr -enlarging kernfs_node by a pointer, which is not ideal but not a very -big deal either. If this turns out to be an actual issue, we can move -kernfs_elem_attr->size to kernfs_node->iattr later. - -Signed-off-by: Tejun Heo <tj@kernel.org> -Reported-by: Josh Boyer <jwboyer@fedoraproject.org> -Cc: "Michael S. Tsirkin" <mst@redhat.com> -Cc: Jens Axboe <axboe@kernel.dk> ---- - fs/kernfs/file.c | 69 +++++++++++++++++++++++++++++++++++++++---------- - include/linux/kernfs.h | 1 - 2 files changed, 56 insertions(+), 14 deletions(-) - ---- a/fs/kernfs/file.c -+++ b/fs/kernfs/file.c -@@ -39,6 +39,19 @@ struct kernfs_open_node { - struct list_head files; /* goes through kernfs_open_file.list */ - }; - -+/* -+ * kernfs_notify() may be called from any context and bounces notifications -+ * through a work item. To minimize space overhead in kernfs_node, the -+ * pending queue is implemented as a singly linked list of kernfs_nodes. -+ * The list is terminated with the self pointer so that whether a -+ * kernfs_node is on the list or not can be determined by testing the next -+ * pointer for NULL. -+ */ -+#define KERNFS_NOTIFY_EOL ((void *)&kernfs_notify_list) -+ -+static DEFINE_SPINLOCK(kernfs_notify_lock); -+static struct kernfs_node *kernfs_notify_list = KERNFS_NOTIFY_EOL; -+ - static struct kernfs_open_file *kernfs_of(struct file *file) - { - return ((struct seq_file *)file->private_data)->private; -@@ -783,24 +796,25 @@ static unsigned int kernfs_fop_poll(stru - return DEFAULT_POLLMASK|POLLERR|POLLPRI; - } - --/** -- * kernfs_notify - notify a kernfs file -- * @kn: file to notify -- * -- * Notify @kn such that poll(2) on @kn wakes up. -- */ --void kernfs_notify(struct kernfs_node *kn) -+static void kernfs_notify_workfn(struct work_struct *work) - { -- struct kernfs_root *root = kernfs_root(kn); -+ struct kernfs_node *kn; - struct kernfs_open_node *on; - struct kernfs_super_info *info; -- unsigned long flags; -- -- if (WARN_ON(kernfs_type(kn) != KERNFS_FILE)) -+repeat: -+ /* pop one off the notify_list */ -+ spin_lock_irq(&kernfs_notify_lock); -+ kn = kernfs_notify_list; -+ if (kn == KERNFS_NOTIFY_EOL) { -+ spin_unlock_irq(&kernfs_notify_lock); - return; -+ } -+ kernfs_notify_list = kn->attr.notify_next; -+ kn->attr.notify_next = NULL; -+ spin_unlock_irq(&kernfs_notify_lock); - - /* kick poll */ -- spin_lock_irqsave(&kernfs_open_node_lock, flags); -+ spin_lock_irq(&kernfs_open_node_lock); - - on = kn->attr.open; - if (on) { -@@ -808,12 +822,12 @@ void kernfs_notify(struct kernfs_node *k - wake_up_interruptible(&on->poll); - } - -- spin_unlock_irqrestore(&kernfs_open_node_lock, flags); -+ spin_unlock_irq(&kernfs_open_node_lock); - - /* kick fsnotify */ - mutex_lock(&kernfs_mutex); - -- list_for_each_entry(info, &root->supers, node) { -+ list_for_each_entry(info, &kernfs_root(kn)->supers, node) { - struct inode *inode; - struct dentry *dentry; - -@@ -833,6 +847,33 @@ void kernfs_notify(struct kernfs_node *k - } - - mutex_unlock(&kernfs_mutex); -+ kernfs_put(kn); -+ goto repeat; -+} -+ -+/** -+ * kernfs_notify - notify a kernfs file -+ * @kn: file to notify -+ * -+ * Notify @kn such that poll(2) on @kn wakes up. Maybe be called from any -+ * context. -+ */ -+void kernfs_notify(struct kernfs_node *kn) -+{ -+ static DECLARE_WORK(kernfs_notify_work, kernfs_notify_workfn); -+ unsigned long flags; -+ -+ if (WARN_ON(kernfs_type(kn) != KERNFS_FILE)) -+ return; -+ -+ spin_lock_irqsave(&kernfs_notify_lock, flags); -+ if (!kn->attr.notify_next) { -+ kernfs_get(kn); -+ kn->attr.notify_next = kernfs_notify_list; -+ kernfs_notify_list = kn; -+ schedule_work(&kernfs_notify_work); -+ } -+ spin_unlock_irqrestore(&kernfs_notify_lock, flags); - } - EXPORT_SYMBOL_GPL(kernfs_notify); - ---- a/include/linux/kernfs.h -+++ b/include/linux/kernfs.h -@@ -91,6 +91,7 @@ struct kernfs_elem_attr { - const struct kernfs_ops *ops; - struct kernfs_open_node *open; - loff_t size; -+ struct kernfs_node *notify_next; /* for kernfs_notify() */ - }; - - /* @@ -1,4 +1,4 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz 423d8cf28277a385276146c990d029e8 patch-3.16-rc3.xz -436a44358b6011f5a85a1c8391603bde patch-3.16-rc3-git2.xz +ce65aa872e1668f878c3fda481ce968b patch-3.16-rc3-git3.xz |