Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-1.4.git;a=commitdiff;h=4b7a95426d01f96e18dfc362291c206b540149d5
commit 4b7a95426d01f96e18dfc362291c206b540149d5 Author: Miklos Vajna <vmik...@frugalware.org> Date: Mon May 16 00:41:54 2011 +0200 kernel-2.6.37-3nexon1-i686 - up to patchlevel .6 - closes #4489 diff --git a/source/base/kernel/FrugalBuild b/source/base/kernel/FrugalBuild index 2122e1a..33f8932 100644 --- a/source/base/kernel/FrugalBuild +++ b/source/base/kernel/FrugalBuild @@ -4,8 +4,7 @@ USE_DEVEL=${USE_DEVEL:-"n"} if ! Fuse $USE_DEVEL; then - _F_kernel_patches=(sched-cgroup-use-exit-hook-to-avoid-use-after-free-c.patch \ - libata-set-queue-dma-alignment-to-sector-size-for-atapi-too.patch) + _F_kernel_patches=() else # example for a tagged rc release: 2.6.32.rc5 # example for a random snapshot (based on git describe output): 2.6.32.rc5.81.g964fe08 @@ -16,3 +15,4 @@ else fi Finclude kernel +pkgrel=3nexon1 diff --git a/source/base/kernel/libata-set-queue-dma-alignment-to-sector-size-for-atapi-too.patch b/source/base/kernel/libata-set-queue-dma-alignment-to-sector-size-for-atapi-too.patch deleted file mode 100644 index 8c9422a..0000000 --- a/source/base/kernel/libata-set-queue-dma-alignment-to-sector-size-for-atapi-too.patch +++ /dev/null @@ -1,80 +0,0 @@ -6a300e628a48cf12bac93a964a535e83cd1d Mon Sep 17 00:00:00 2001 -From: Tejun Heo <hte...@gmail.com> -Date: Thu, 20 Jan 2011 13:59:06 +0100 -Subject: libata: set queue DMA alignment to sector size for ATAPI too - -From: Tejun Heo <hte...@gmail.com> - -commit 729a6a300e628a48cf12bac93a964a535e83cd1d upstream. - -ata_pio_sectors() expects buffer for each sector to be contained in a -single page; otherwise, it ends up overrunning the first page. This -is achieved by setting queue DMA alignment. If sector_size is smaller -than PAGE_SIZE and all buffers are sector_size aligned, buffer for -each sector is always contained in a single page. - -This wasn't applied to ATAPI devices but IDENTIFY_PACKET is executed -as ATA_PROT_PIO and thus uses ata_pio_sectors(). Newer versions of -udev issue IDENTIFY_PACKET with unaligned buffer triggering the -problem and causing oops. - -This patch fixes the problem by setting sdev->sector_size to -ATA_SECT_SIZE on ATATPI devices and always setting DMA alignment to -sector_size. While at it, add a warning for the unlikely but still -possible scenario where sector_size is larger than PAGE_SIZE, in which -case the alignment wouldn't be enough. - -Signed-off-by: Tejun Heo <t...@kernel.org> -Reported-by: John Stanley <jpsinthe...@verizon.net> -Tested-by: John Stanley <jpsinthe...@verizon.net> -Signed-off-by: Jeff Garzik <jgar...@redhat.com> -Signed-off-by: Greg Kroah-Hartman <gre...@suse.de> - ---- - drivers/ata/libata-scsi.c | 24 ++++++++++++++++++------ - 1 file changed, 18 insertions(+), 6 deletions(-) - ---- a/drivers/ata/libata-scsi.c -+++ b/drivers/ata/libata-scsi.c -@@ -1102,9 +1102,9 @@ static int ata_scsi_dev_config(struct sc - struct request_queue *q = sdev->request_queue; - void *buf; - -- /* set the min alignment and padding */ -- blk_queue_update_dma_alignment(sdev->request_queue, -- ATA_DMA_PAD_SZ - 1); -+ sdev->sector_size = ATA_SECT_SIZE; -+ -+ /* set DMA padding */ - blk_queue_update_dma_pad(sdev->request_queue, - ATA_DMA_PAD_SZ - 1); - -@@ -1118,13 +1118,25 @@ static int ata_scsi_dev_config(struct sc - - blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN); - } else { -- /* ATA devices must be sector aligned */ - sdev->sector_size = ata_id_logical_sector_size(dev->id); -- blk_queue_update_dma_alignment(sdev->request_queue, -- sdev->sector_size - 1); - sdev->manage_start_stop = 1; - } - -+ /* -+ * ata_pio_sectors() expects buffer for each sector to not cross -+ * page boundary. Enforce it by requiring buffers to be sector -+ * aligned, which works iff sector_size is not larger than -+ * PAGE_SIZE. ATAPI devices also need the alignment as -+ * IDENTIFY_PACKET is executed as ATA_PROT_PIO. -+ */ -+ if (sdev->sector_size > PAGE_SIZE) -+ ata_dev_printk(dev, KERN_WARNING, -+ "sector_size=%u > PAGE_SIZE, PIO may malfunction\n", -+ sdev->sector_size); -+ -+ blk_queue_update_dma_alignment(sdev->request_queue, -+ sdev->sector_size - 1); -+ - if (dev->flags & ATA_DFLAG_AN) - set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events); - diff --git a/source/base/kernel/sched-cgroup-use-exit-hook-to-avoid-use-after-free-c.patch b/source/base/kernel/sched-cgroup-use-exit-hook-to-avoid-use-after-free-c.patch deleted file mode 100644 index 502df84..0000000 --- a/source/base/kernel/sched-cgroup-use-exit-hook-to-avoid-use-after-free-c.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 068c5cc5ac7414a8e9eb7856b4bf3cc4d4744267 Mon Sep 17 00:00:00 2001 -From: Peter Zijlstra <pet...@infradead.org> -Date: Wed, 19 Jan 2011 12:26:11 +0100 -Subject: [PATCH] sched, cgroup: Use exit hook to avoid use-after-free crash - -By not notifying the controller of the on-exit move back to -init_css_set, we fail to move the task out of the previous -cgroup's cfs_rq. This leads to an opportunity for a -cgroup-destroy to come in and free the cgroup (there are no -active tasks left in it after all) to which the not-quite dead -task is still enqueued. - -Reported-by: Miklos Vajna <vmik...@frugalware.org> -Fixed-by: Mike Galbraith <efa...@gmx.de> -Signed-off-by: Peter Zijlstra <a.p.zijls...@chello.nl> -Cc: <sta...@kernel.org> -Cc: Mike Galbraith <efa...@gmx.de> -Signed-off-by: Ingo Molnar <mi...@elte.hu> -LKML-Reference: <1293206353.29444.205.camel@laptop> ---- - kernel/sched.c | 18 ++++++++++++++++++ - 1 files changed, 18 insertions(+), 0 deletions(-) - -diff --git a/kernel/sched.c b/kernel/sched.c -index 0a169a8..fa5272a 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -606,6 +606,9 @@ static inline struct task_group *task_group(struct task_struct *p) - struct task_group *tg; - struct cgroup_subsys_state *css; - -+ if (p->flags & PF_EXITING) -+ return &root_task_group; -+ - css = task_subsys_state_check(p, cpu_cgroup_subsys_id, - lockdep_is_held(&task_rq(p)->lock)); - tg = container_of(css, struct task_group, css); -@@ -8880,6 +8883,20 @@ cpu_cgroup_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, - } - } - -+static void -+cpu_cgroup_exit(struct cgroup_subsys *ss, struct task_struct *task) -+{ -+ /* -+ * cgroup_exit() is called in the copy_process() failure path. -+ * Ignore this case since the task hasn't ran yet, this avoids -+ * trying to poke a half freed task state from generic code. -+ */ -+ if (!(task->flags & PF_EXITING)) -+ return; -+ -+ sched_move_task(task); -+} -+ - #ifdef CONFIG_FAIR_GROUP_SCHED - static int cpu_shares_write_u64(struct cgroup *cgrp, struct cftype *cftype, - u64 shareval) -@@ -8952,6 +8969,7 @@ struct cgroup_subsys cpu_cgroup_subsys = { - .destroy = cpu_cgroup_destroy, - .can_attach = cpu_cgroup_can_attach, - .attach = cpu_cgroup_attach, -+ .exit = cpu_cgroup_exit, - .populate = cpu_cgroup_populate, - .subsys_id = cpu_cgroup_subsys_id, - .early_init = 1, --- -1.7.3.2.164.g6f10c.dirty - diff --git a/source/include/kernel-version.sh b/source/include/kernel-version.sh index d45ddc3..02c11e3 100644 --- a/source/include/kernel-version.sh +++ b/source/include/kernel-version.sh @@ -17,7 +17,7 @@ ### _F_kernelver_ver=2.6.37 _F_kernelver_rel=2 -_F_kernelver_stable= +_F_kernelver_stable=6 ### # == APPENDED VALUES _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git