prep linux for 3.7

This commit is contained in:
abveritas 2013-01-14 21:42:19 +00:00
parent 9bf9aa2160
commit 981d923818
15 changed files with 1406 additions and 771 deletions

View File

@ -8,15 +8,15 @@ pkgbase=linux
pkgname=('linux' 'linux-headers' 'linux-docs') # Build stock -CHAKRA kernel
# pkgname=linux-custom # Build kernel with a different name
_kernelname=${pkgname#linux}
_basekernel=3.6
pkgver=3.6.6
_basekernel=3.7
pkgver=3.7.2
pkgrel=1
arch=('x86_64')
url="http://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl')
options=('!strip')
source=("http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.6.tar.xz"
source=("http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.7.tar.xz"
"http://www.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.xz"
# the main kernel config files
'config.x86_64'
@ -24,7 +24,6 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.6.tar.xz"
'aufs3-loopback.patch'
'aufs3-base.patch'
'aufs3-proc_map.patch'
'aufs3-fix-export-__devcgroup_inode_permission.patch'
'aufs3-standalone.patch'
'aufs3-kbuild.patch'
'aufs3.patch'
@ -32,23 +31,24 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.6.tar.xz"
# standard config files for mkinitcpio ramdisk
'linux.preset'
'change-default-console-loglevel.patch'
'module-symbol-waiting-3.6.patch'
'module-init-wait-3.6.patch')
md5sums=('1a1760420eac802c541a20ab51a093d1'
'11d6d8749d4612a77f43f0531c0f2824'
'8aeb4b852fdaa3cc013784aa73537a9a'
'360b92a032eb7611583956314636d30f'
'a0b105ee94cbb37a9bfb9d565ad92edf'
'41bd3b4e3d69d5ca030927e409278011'
'9dc1aa9fcc12b3c2f52f605830c02939'
'388890521b4f06820377f0ad7ab42d5a'
'7fa97ab324207992081aa5967ad6eed3'
'9ca80ba287ad2f0d5e59c0098a8de1ac'
'fat-3.6.x.patch'
'fix-watchdog-3.7.patch'
'drm-fix-track-free-areas-3.7.patch')
md5sums=('21223369d682bcf44bcdfe1521095983'
'132211742278e18b8f4808754d85e66c'
'327570e1825dd67b15b46215f5652ae5'
'2e33819e859125ba0176072d2cd5ac81'
'6a1ffafeacb79be96c97e4638cea2452'
'3074dfe1c01219b1b005a4e5f00e25cd'
'f18131bd568796722284557193c3a3c0'
'cd0a193e702bf4d607190e5249c67da8'
'35a09afd2e995a88d36c342ade093c27'
'52f4a2c7f6277774117c834d949d6b81'
'eb14dcfd80c00852ef81ded6e826826a'
'65cbe8e4c8efaf96dd162102e46ce81d'
'670931649c60fcb3ef2e0119ed532bd4'
'8a71abc4224f575008f974a099b5cf6f')
'88d501404f172dac6fcb248978251560'
'3485d6c7ae3af35d16e09d6d9a7ed32a'
'e365972f002482a7b25cd5360467d75f')
build() {
cd "${srcdir}/linux-${_basekernel}"
@ -59,9 +59,12 @@ build() {
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
# fix module initialisation
patch -p1 -i "${srcdir}/module-symbol-waiting-3.6.patch"
patch -p1 -i "${srcdir}/module-init-wait-3.6.patch"
# fix cosmetic fat issue
patch -p1 -i "${srcdir}/fat-3.6.x.patch"
# fix watchdog enable/disable regression
patch -p1 -i "${srcdir}/fix-watchdog-3.7.patch"
# fix GPU hang
patch -p1 -i "${srcdir}/drm-fix-track-free-areas-3.7.patch"
# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
# remove this when a Kconfig knob is made available by upstream
@ -74,7 +77,6 @@ build() {
patch -p1 -i "${srcdir}/aufs3-kbuild.patch"
patch -p1 -i "${srcdir}/aufs3-loopback.patch"
patch -p1 -i "${srcdir}/aufs3-proc_map.patch"
#patch -p1 -i "${srcdir}/aufs3-fix-export-__devcgroup_inode_permission.patch"
patch -p1 -i "${srcdir}/aufs3-standalone.patch"
cat "${srcdir}/config.x86_64" > ./.config
@ -189,7 +191,7 @@ package_linux-headers() {
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include"
for i in acpi asm-generic config crypto drm generated linux math-emu \
media mtd net pcmcia scsi sound trace video xen; do
media net pcmcia scsi sound trace uapi video xen; do
cp -a include/${i} "${pkgdir}/usr/src/linux-${_kernver}/include/"
done
@ -212,13 +214,22 @@ package_linux-headers() {
cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel/"
# add headers for lirc package
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video"
cp drivers/media/video/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/"
for i in bt8xx cpia2 cx25840 cx88 em28xx pwc saa7134 sn9c102; do
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/${i}"
cp -a drivers/media/video/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/${i}"
# pci
for i in bt8xx cx88 saa7134; do
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}"
cp -a drivers/media/pci/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}"
done
# usb
for i in cpia2 em28xx pwc sn9c102; do
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}"
cp -a drivers/media/usb/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}"
done
# i2c
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c"
cp drivers/media/i2c/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
for i in cx25840; do
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
cp -a drivers/media/i2c/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
done
# add docbook makefile
@ -238,24 +249,24 @@ package_linux-headers() {
cp net/mac80211/*.h "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
# add dvb headers for external modules
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core"
cp drivers/media/dvb/dvb-core/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core"
cp drivers/media/dvb-core/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core/"
# and...
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"
cp include/config/dvb/*.h "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/"
cp drivers/media/dvb/frontends/lgdt330x.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/"
cp drivers/media/video/msp3400-driver.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
# add dvb headers
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb"
cp drivers/media/dvb/dvb-usb/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb/"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends"
cp drivers/media/dvb/frontends/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners"
cp drivers/media/common/tuners/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners/"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb"
cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb/"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends"
cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners"
cp drivers/media/tuners/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners/"
# add xfs and shmem for aufs building
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs"

View File

@ -1,10 +1,23 @@
aufs3.6 base patch
aufs3.7 base patch
diff --git a/fs/file_table.c b/fs/file_table.c
index a72bf9d..dac6792 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -36,7 +36,7 @@ struct files_stat_struct files_stat = {
.max_files = NR_FILE
};
-DEFINE_STATIC_LGLOCK(files_lglock);
+DEFINE_LGLOCK(files_lglock);
/* SLAB cache for file structures */
static struct kmem_cache *filp_cachep __read_mostly;
diff --git a/fs/inode.c b/fs/inode.c
index ac8d904..7b2c8fa 100644
index 64999f1..ad73fc3 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1491,7 +1491,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
@@ -1503,7 +1503,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
* This does the actual work of updating an inodes time or version. Must have
* had called mnt_want_write() before calling this.
*/
@ -14,7 +27,7 @@ index ac8d904..7b2c8fa 100644
if (inode->i_op->update_time)
return inode->i_op->update_time(inode, time, flags);
diff --git a/fs/splice.c b/fs/splice.c
index 41514dd..663b402 100644
index 13e5b47..f185c6c 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1093,8 +1093,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
@ -42,10 +55,10 @@ index 41514dd..663b402 100644
ssize_t (*splice_read)(struct file *, loff_t *,
struct pipe_inode_info *, size_t, unsigned int);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index aa11047..9116d2e 100644
index 75fe9a1..70a766ae 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2741,6 +2741,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
@@ -2553,6 +2553,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
extern int inode_newsize_ok(const struct inode *, loff_t offset);
extern void setattr_copy(struct inode *inode, const struct iattr *attr);

View File

@ -1,10 +0,0 @@
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -13,6 +13,7 @@
#include <linux/slab.h>
#include <linux/rcupdate.h>
#include <linux/mutex.h>
+#include <linux/export.h>
#define ACC_MKNOD 1
#define ACC_READ 2

View File

@ -1,4 +1,4 @@
aufs3.6 kbuild patch
aufs3.7 kbuild patch
diff --git a/fs/Kconfig b/fs/Kconfig
index f95ae3a..6d8a9a5 100644
@ -13,23 +13,11 @@ index f95ae3a..6d8a9a5 100644
endif # MISC_FILESYSTEMS
diff --git a/fs/Makefile b/fs/Makefile
index 2fb9779..abefac5 100644
index 1d7af79..06db6eb 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -125,3 +125,4 @@ obj-$(CONFIG_GFS2_FS) += gfs2/
@@ -126,3 +126,4 @@ obj-$(CONFIG_GFS2_FS) += gfs2/
obj-y += exofs/ # Multiple modules
obj-$(CONFIG_CEPH_FS) += ceph/
obj-$(CONFIG_PSTORE) += pstore/
+obj-$(CONFIG_AUFS_FS) += aufs/
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index fa21760..ee029e3 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -66,6 +66,7 @@ header-y += atmppp.h
header-y += atmsap.h
header-y += atmsvc.h
header-y += audit.h
+header-y += aufs_type.h
header-y += auto_fs.h
header-y += auto_fs4.h
header-y += auxvec.h

View File

@ -1,7 +1,7 @@
aufs3.6 loopback patch
aufs3.7 loopback patch
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 3bba655..bc9351f 100644
index 54046e5..b0f8b8b 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -500,7 +500,7 @@ out:
@ -165,7 +165,7 @@ index 3bba655..bc9351f 100644
gfp_t gfp = lo->old_gfp_mask;
struct block_device *bdev = lo->lo_device;
@@ -990,6 +1023,7 @@ static int loop_clr_fd(struct loop_device *lo)
@@ -1003,6 +1036,7 @@ static int loop_clr_fd(struct loop_device *lo)
spin_lock_irq(&lo->lo_lock);
lo->lo_backing_file = NULL;
@ -173,7 +173,7 @@ index 3bba655..bc9351f 100644
spin_unlock_irq(&lo->lo_lock);
loop_release_xfer(lo);
@@ -1030,6 +1064,8 @@ static int loop_clr_fd(struct loop_device *lo)
@@ -1043,6 +1077,8 @@ static int loop_clr_fd(struct loop_device *lo)
* bd_mutex which is usually taken before lo_ctl_mutex.
*/
fput(filp);
@ -183,7 +183,7 @@ index 3bba655..bc9351f 100644
}
diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
index 896f3e7..40d875e 100644
index 5c35454..88f507b 100644
--- a/fs/aufs/f_op.c
+++ b/fs/aufs/f_op.c
@@ -352,7 +352,7 @@ static ssize_t aufs_splice_read(struct file *file, loff_t *ppos,
@ -196,7 +196,7 @@ index 896f3e7..40d875e 100644
if (file->f_mapping != h_file->f_mapping) {
file->f_mapping = h_file->f_mapping;
diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c
index 016276a..6b24e8b 100644
index 4fa75a4..a923899 100644
--- a/fs/aufs/loop.c
+++ b/fs/aufs/loop.c
@@ -131,3 +131,19 @@ void au_loopback_fin(void)
@ -220,7 +220,7 @@ index 016276a..6b24e8b 100644
+ return f;
+}
diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h
index b7af6a7..7a50e6e 100644
index 88d019c..8707c3a 100644
--- a/fs/aufs/loop.h
+++ b/fs/aufs/loop.h
@@ -36,6 +36,8 @@ void au_warn_loopback(struct super_block *h_sb);
@ -242,13 +242,13 @@ index b7af6a7..7a50e6e 100644
#endif /* __KERNEL__ */
diff --git a/fs/aufs/super.c b/fs/aufs/super.c
index ccf9ac7..36c4c02 100644
index ab4c909..8e654b8 100644
--- a/fs/aufs/super.c
+++ b/fs/aufs/super.c
@@ -780,7 +780,10 @@ static const struct super_operations aufs_sop = {
.show_options = aufs_show_options,
@@ -811,7 +811,10 @@ static const struct super_operations aufs_sop = {
.statfs = aufs_statfs,
.put_super = aufs_put_super,
.sync_fs = aufs_sync_fs,
- .remount_fs = aufs_remount_fs
+ .remount_fs = aufs_remount_fs,
+#ifdef CONFIG_AUFS_BDEV_LOOP
@ -258,10 +258,10 @@ index ccf9ac7..36c4c02 100644
/* ---------------------------------------------------------------------- */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9116d2e..02ef853 100644
index 70a766ae..31fcb91 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1878,6 +1878,10 @@ struct super_operations {
@@ -1619,6 +1619,10 @@ struct super_operations {
int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
int (*nr_cached_objects)(struct super_block *);
void (*free_cached_objects)(struct super_block *, int);
@ -273,10 +273,10 @@ index 9116d2e..02ef853 100644
/*
diff --git a/include/linux/loop.h b/include/linux/loop.h
index 11a41a8..c190b78 100644
index 6492181..2b61d6a 100644
--- a/include/linux/loop.h
+++ b/include/linux/loop.h
@@ -48,7 +48,7 @@ struct loop_device {
@@ -44,7 +44,7 @@ struct loop_device {
int (*ioctl)(struct loop_device *, int cmd,
unsigned long arg);

View File

@ -1,18 +1,18 @@
aufs3.6 proc_map patch
aufs3.7 proc_map patch
diff --git a/fs/buffer.c b/fs/buffer.c
index 58e2e7b..f314bc2 100644
index ec0aca8..107f143 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2317,6 +2317,8 @@ int __block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
@@ -2384,6 +2384,8 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
* fault so this update may be superfluous but who really cares...
*/
file_update_time(vma->vm_file);
+ if (vma->vm_prfile)
+ file_update_time(vma->vm_prfile);
lock_page(page);
size = i_size_read(inode);
ret = __block_page_mkwrite(vma, vmf, get_block);
sb_end_pagefault(sb);
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
index b1822dd..8b29ab7 100644
--- a/fs/proc/nommu.c
@ -29,10 +29,10 @@ index b1822dd..8b29ab7 100644
ino = inode->i_ino;
}
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 4540b8f..0411f0f 100644
index 90c63f9..78680c7 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -226,6 +226,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
@@ -272,6 +272,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
if (file) {
struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
@ -43,7 +43,7 @@ index 4540b8f..0411f0f 100644
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
@@ -1185,6 +1189,8 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
@@ -1232,6 +1236,8 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
if (file) {
seq_printf(m, " file=");
@ -68,10 +68,10 @@ index 1ccfa53..c39acb5 100644
ino = inode->i_ino;
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index bf78672..cac65b6 100644
index 31f8a3a..8b068ad 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -212,6 +212,7 @@ struct vm_region {
@@ -211,6 +211,7 @@ struct vm_region {
unsigned long vm_top; /* region allocated to here */
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
struct file *vm_file; /* the backing file or NULL */
@ -79,7 +79,7 @@ index bf78672..cac65b6 100644
int vm_usage; /* region usage count (access under nommu_region_sem) */
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
@@ -271,6 +272,7 @@ struct vm_area_struct {
@@ -267,6 +268,7 @@ struct vm_area_struct {
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
units, *not* PAGE_CACHE_SIZE */
struct file * vm_file; /* File we map to (can be NULL). */
@ -88,10 +88,10 @@ index bf78672..cac65b6 100644
#ifndef CONFIG_MMU
diff --git a/kernel/fork.c b/kernel/fork.c
index 2c8857e..3709356 100644
index 8b20ab7..11a9854 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -414,6 +414,8 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
@@ -416,6 +416,8 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
struct address_space *mapping = file->f_mapping;
get_file(file);
@ -101,10 +101,10 @@ index 2c8857e..3709356 100644
atomic_dec(&inode->i_writecount);
mutex_lock(&mapping->i_mmap_mutex);
diff --git a/mm/memory.c b/mm/memory.c
index 5736170..908963f 100644
index 221fc9f..a55a613 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3355,6 +3355,8 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -3368,6 +3368,8 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
/* file_update_time outside page_lock */
if (vma->vm_file && !page_mkwrite)
file_update_time(vma->vm_file);
@ -114,56 +114,56 @@ index 5736170..908963f 100644
unlock_page(vmf.page);
if (anon)
diff --git a/mm/mmap.c b/mm/mmap.c
index ae18a48..ab6498a 100644
index 9a796c4..8f3271e 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -233,6 +233,8 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
@@ -227,6 +227,8 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
vma->vm_ops->close(vma);
if (vma->vm_file) {
if (vma->vm_file)
fput(vma->vm_file);
+ if (vma->vm_prfile)
+ fput(vma->vm_prfile);
if (vma->vm_flags & VM_EXECUTABLE)
removed_exe_file_vma(vma->vm_mm);
}
@@ -636,6 +638,8 @@ again: remove_next = 1 + (end > next->vm_end);
+ if (vma->vm_prfile)
+ fput(vma->vm_prfile);
mpol_put(vma_policy(vma));
kmem_cache_free(vm_area_cachep, vma);
return next;
@@ -667,6 +669,8 @@ again: remove_next = 1 + (end > next->vm_end);
if (file) {
uprobe_munmap(next, next->vm_start, next->vm_end);
fput(file);
+ if (vma->vm_prfile)
+ fput(vma->vm_prfile);
if (next->vm_flags & VM_EXECUTABLE)
removed_exe_file_vma(mm);
}
@@ -1991,6 +1995,8 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
if (next->anon_vma)
anon_vma_merge(vma, next);
@@ -2019,6 +2023,8 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
if (new->vm_file) {
if (new->vm_file)
get_file(new->vm_file);
+ if (new->vm_prfile)
+ get_file(new->vm_prfile);
if (vma->vm_flags & VM_EXECUTABLE)
added_exe_file_vma(mm);
}
@@ -2015,6 +2021,8 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
if (vma->vm_flags & VM_EXECUTABLE)
removed_exe_file_vma(mm);
+ if (new->vm_prfile)
+ get_file(new->vm_prfile);
if (new->vm_ops && new->vm_ops->open)
new->vm_ops->open(new);
@@ -2038,6 +2044,8 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
new->vm_ops->close(new);
if (new->vm_file)
fput(new->vm_file);
+ if (new->vm_prfile)
+ fput(new->vm_prfile);
}
+ if (new->vm_prfile)
+ fput(new->vm_prfile);
unlink_anon_vmas(new);
out_free_mpol:
@@ -2412,6 +2420,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
new_vma->vm_pgoff = pgoff;
if (new_vma->vm_file) {
mpol_put(pol);
@@ -2435,6 +2443,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
goto out_free_mempol;
if (new_vma->vm_file)
get_file(new_vma->vm_file);
+ if (new_vma->vm_prfile)
+ get_file(new_vma->vm_prfile);
if (vma->vm_flags & VM_EXECUTABLE)
added_exe_file_vma(mm);
+ if (new_vma->vm_prfile)
+ get_file(new_vma->vm_prfile);
if (new_vma->vm_ops && new_vma->vm_ops->open)
new_vma->vm_ops->open(new_vma);
vma_link(mm, new_vma, prev, rb_link, rb_parent);
diff --git a/mm/nommu.c b/mm/nommu.c
index d4b0c10..a061091 100644
index 45131b4..576643c9f 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -633,6 +633,8 @@ static void __put_nommu_region(struct vm_region *region)
@ -177,14 +177,14 @@ index d4b0c10..a061091 100644
* from ramfs/tmpfs mustn't be released here */
@@ -791,6 +793,8 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
vma->vm_ops->close(vma);
if (vma->vm_file) {
if (vma->vm_file)
fput(vma->vm_file);
+ if (vma->vm_prfile)
+ fput(vma->vm_prfile);
if (vma->vm_flags & VM_EXECUTABLE)
removed_exe_file_vma(mm);
}
@@ -1363,6 +1367,8 @@ unsigned long do_mmap_pgoff(struct file *file,
+ if (vma->vm_prfile)
+ fput(vma->vm_prfile);
put_nommu_region(vma->vm_region);
kmem_cache_free(vm_area_cachep, vma);
}
@@ -1354,6 +1358,8 @@ unsigned long do_mmap_pgoff(struct file *file,
}
}
fput(region->vm_file);
@ -193,7 +193,7 @@ index d4b0c10..a061091 100644
kmem_cache_free(vm_region_jar, region);
region = pregion;
result = start;
@@ -1439,9 +1445,13 @@ error_just_free:
@@ -1430,9 +1436,13 @@ error_just_free:
error:
if (region->vm_file)
fput(region->vm_file);
@ -204,6 +204,6 @@ index d4b0c10..a061091 100644
fput(vma->vm_file);
+ if (vma->vm_prfile)
+ fput(vma->vm_prfile);
if (vma->vm_flags & VM_EXECUTABLE)
removed_exe_file_vma(vma->vm_mm);
kmem_cache_free(vm_area_cachep, vma);
kleave(" = %d", ret);
return ret;

View File

@ -1,7 +1,7 @@
aufs3.6 standalone patch
aufs3.7 standalone patch
diff --git a/fs/file_table.c b/fs/file_table.c
index 701985e..a9fe741 100644
index dac6792..e3f2c15 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -37,6 +37,7 @@ struct files_stat_struct files_stat = {
@ -12,7 +12,7 @@ index 701985e..a9fe741 100644
/* SLAB cache for file structures */
static struct kmem_cache *filp_cachep __read_mostly;
@@ -509,6 +510,8 @@ void file_sb_list_del(struct file *file)
@@ -403,6 +404,8 @@ void file_sb_list_del(struct file *file)
}
}
@ -22,7 +22,7 @@ index 701985e..a9fe741 100644
/*
diff --git a/fs/inode.c b/fs/inode.c
index 7b2c8fa..0c4318d 100644
index ad73fc3..108ff2b 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -56,6 +56,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
@ -33,7 +33,7 @@ index 7b2c8fa..0c4318d 100644
/*
* Empty aops. Can be used for the cases where the user does not
@@ -1507,6 +1508,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
@@ -1519,6 +1520,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
mark_inode_dirty_sync(inode);
return 0;
}
@ -42,7 +42,7 @@ index 7b2c8fa..0c4318d 100644
/**
* touch_atime - update the access time
diff --git a/fs/namespace.c b/fs/namespace.c
index 7bdf790..5b85c4c 100644
index 2496062..3e66a90 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -50,6 +50,7 @@ EXPORT_SYMBOL_GPL(fs_kobj);
@ -123,7 +123,7 @@ index f104d56..54f36db 100644
static int fsnotify_mark_destroy(void *ignored)
{
diff --git a/fs/open.c b/fs/open.c
index e1f2cdb..2804cd6 100644
index 59071f5..7e4c856 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -60,6 +60,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
@ -135,7 +135,7 @@ index e1f2cdb..2804cd6 100644
static long do_sys_truncate(const char __user *pathname, loff_t length)
{
diff --git a/fs/splice.c b/fs/splice.c
index 663b402..51e1deb 100644
index f185c6c..f3d89da 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1117,6 +1117,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
@ -171,7 +171,7 @@ index 6dbae46..9f4f29a 100644
}
+EXPORT_SYMBOL_GPL(cap_mmap_file);
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 442204c..e644a1c 100644
index b08d20c..a90420b 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -7,6 +7,7 @@
@ -182,19 +182,19 @@ index 442204c..e644a1c 100644
#include <linux/list.h>
#include <linux/uaccess.h>
#include <linux/seq_file.h>
@@ -493,6 +494,7 @@ found:
return -EPERM;
@@ -617,6 +618,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
access);
}
+EXPORT_SYMBOL_GPL(__devcgroup_inode_permission);
int devcgroup_inode_mknod(int mode, dev_t dev)
{
diff --git a/security/security.c b/security/security.c
index 860aeb3..ffb57bf 100644
index 8dcd4ae..6efe561 100644
--- a/security/security.c
+++ b/security/security.c
@@ -384,6 +384,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
@@ -396,6 +396,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
return 0;
return security_ops->path_rmdir(dir, dentry);
}
@ -202,7 +202,7 @@ index 860aeb3..ffb57bf 100644
int security_path_unlink(struct path *dir, struct dentry *dentry)
{
@@ -400,6 +401,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
@@ -412,6 +413,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
return 0;
return security_ops->path_symlink(dir, dentry, old_name);
}
@ -210,7 +210,7 @@ index 860aeb3..ffb57bf 100644
int security_path_link(struct dentry *old_dentry, struct path *new_dir,
struct dentry *new_dentry)
@@ -408,6 +410,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
@@ -420,6 +422,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
return 0;
return security_ops->path_link(old_dentry, new_dir, new_dentry);
}
@ -218,7 +218,7 @@ index 860aeb3..ffb57bf 100644
int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
struct path *new_dir, struct dentry *new_dentry)
@@ -426,6 +429,7 @@ int security_path_truncate(struct path *path)
@@ -438,6 +441,7 @@ int security_path_truncate(struct path *path)
return 0;
return security_ops->path_truncate(path);
}
@ -226,15 +226,15 @@ index 860aeb3..ffb57bf 100644
int security_path_chmod(struct path *path, umode_t mode)
{
@@ -433,6 +437,7 @@ int security_path_chmod(struct path *path, umode_t mode)
@@ -445,6 +449,7 @@ int security_path_chmod(struct path *path, umode_t mode)
return 0;
return security_ops->path_chmod(path, mode);
}
+EXPORT_SYMBOL_GPL(security_path_chmod);
int security_path_chown(struct path *path, uid_t uid, gid_t gid)
int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
{
@@ -440,6 +445,7 @@ int security_path_chown(struct path *path, uid_t uid, gid_t gid)
@@ -452,6 +457,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
return 0;
return security_ops->path_chown(path, uid, gid);
}
@ -242,7 +242,7 @@ index 860aeb3..ffb57bf 100644
int security_path_chroot(struct path *path)
{
@@ -516,6 +522,7 @@ int security_inode_readlink(struct dentry *dentry)
@@ -528,6 +534,7 @@ int security_inode_readlink(struct dentry *dentry)
return 0;
return security_ops->inode_readlink(dentry);
}
@ -250,7 +250,7 @@ index 860aeb3..ffb57bf 100644
int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
{
@@ -530,6 +537,7 @@ int security_inode_permission(struct inode *inode, int mask)
@@ -542,6 +549,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return security_ops->inode_permission(inode, mask);
}
@ -258,7 +258,7 @@ index 860aeb3..ffb57bf 100644
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
@@ -645,6 +653,7 @@ int security_file_permission(struct file *file, int mask)
@@ -663,6 +671,7 @@ int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask);
}
@ -266,7 +266,7 @@ index 860aeb3..ffb57bf 100644
int security_file_alloc(struct file *file)
{
@@ -705,6 +714,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
@@ -723,6 +732,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
return ret;
return ima_file_mmap(file, prot);
}

View File

@ -0,0 +1,276 @@
aufs3.7 standalone patch
diff --git a/fs/file_table.c b/fs/file_table.c
index dac6792..e3f2c15 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -37,6 +37,7 @@ struct files_stat_struct files_stat = {
};
DEFINE_LGLOCK(files_lglock);
+EXPORT_SYMBOL(files_lglock);
/* SLAB cache for file structures */
static struct kmem_cache *filp_cachep __read_mostly;
@@ -403,6 +404,8 @@ void file_sb_list_del(struct file *file)
}
}
+EXPORT_SYMBOL(file_sb_list_del);
+
#ifdef CONFIG_SMP
/*
diff --git a/fs/inode.c b/fs/inode.c
index ad73fc3..108ff2b 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -56,6 +56,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
static __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_hash_lock);
__cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_sb_list_lock);
+EXPORT_SYMBOL(inode_sb_list_lock);
/*
* Empty aops. Can be used for the cases where the user does not
@@ -1519,6 +1520,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
mark_inode_dirty_sync(inode);
return 0;
}
+EXPORT_SYMBOL(update_time);
/**
* touch_atime - update the access time
diff --git a/fs/namespace.c b/fs/namespace.c
index 2496062..3e66a90 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -50,6 +50,7 @@ EXPORT_SYMBOL_GPL(fs_kobj);
* tree or hash is modified or when a vfsmount structure is modified.
*/
DEFINE_BRLOCK(vfsmount_lock);
+EXPORT_SYMBOL(vfsmount_lock);
static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry)
{
@@ -1401,6 +1402,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
}
return 0;
}
+EXPORT_SYMBOL(iterate_mounts);
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
{
diff --git a/fs/notify/group.c b/fs/notify/group.c
index 63fc294..6f4adca 100644
--- a/fs/notify/group.c
+++ b/fs/notify/group.c
@@ -22,6 +22,7 @@
#include <linux/srcu.h>
#include <linux/rculist.h>
#include <linux/wait.h>
+#include <linux/module.h>
#include <linux/fsnotify_backend.h>
#include "fsnotify.h"
@@ -70,6 +71,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
if (atomic_dec_and_test(&group->refcnt))
fsnotify_destroy_group(group);
}
+EXPORT_SYMBOL(fsnotify_put_group);
/*
* Create a new fsnotify_group and hold a reference for the group returned.
@@ -102,3 +104,4 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
return group;
}
+EXPORT_SYMBOL(fsnotify_alloc_group);
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index f104d56..54f36db 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -112,6 +112,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
if (atomic_dec_and_test(&mark->refcnt))
mark->free_mark(mark);
}
+EXPORT_SYMBOL(fsnotify_put_mark);
/*
* Any time a mark is getting freed we end up here.
@@ -191,6 +192,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark)
if (unlikely(atomic_dec_and_test(&group->num_marks)))
fsnotify_final_destroy_group(group);
}
+EXPORT_SYMBOL(fsnotify_destroy_mark);
void fsnotify_set_mark_mask_locked(struct fsnotify_mark *mark, __u32 mask)
{
@@ -278,6 +280,7 @@ err:
return ret;
}
+EXPORT_SYMBOL(fsnotify_add_mark);
/*
* clear any marks in a group in which mark->flags & flags is true
@@ -333,6 +336,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
atomic_set(&mark->refcnt, 1);
mark->free_mark = free_mark;
}
+EXPORT_SYMBOL(fsnotify_init_mark);
static int fsnotify_mark_destroy(void *ignored)
{
diff --git a/fs/open.c b/fs/open.c
index 59071f5..7e4c856 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -60,6 +60,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
mutex_unlock(&dentry->d_inode->i_mutex);
return ret;
}
+EXPORT_SYMBOL(do_truncate);
static long do_sys_truncate(const char __user *pathname, loff_t length)
{
diff --git a/fs/splice.c b/fs/splice.c
index f185c6c..f3d89da 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1117,6 +1117,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags);
}
+EXPORT_SYMBOL(do_splice_from);
/*
* Attempt to initiate a splice from a file to a pipe.
@@ -1143,6 +1144,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags);
}
+EXPORT_SYMBOL(do_splice_to);
/**
* splice_direct_to_actor - splices data directly between two non-pipes
diff --git a/security/commoncap.c b/security/commoncap.c
index 6dbae46..9f4f29a 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -979,9 +979,11 @@ int cap_mmap_addr(unsigned long addr)
}
return ret;
}
+EXPORT_SYMBOL(cap_mmap_addr);
int cap_mmap_file(struct file *file, unsigned long reqprot,
unsigned long prot, unsigned long flags)
{
return 0;
}
+EXPORT_SYMBOL(cap_mmap_file);
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index b08d20c..a90420b 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -7,6 +7,7 @@
#include <linux/device_cgroup.h>
#include <linux/cgroup.h>
#include <linux/ctype.h>
+#include <linux/export.h>
#include <linux/list.h>
#include <linux/uaccess.h>
#include <linux/seq_file.h>
@@ -617,6 +618,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
access);
}
+EXPORT_SYMBOL(__devcgroup_inode_permission);
int devcgroup_inode_mknod(int mode, dev_t dev)
{
diff --git a/security/security.c b/security/security.c
index 8dcd4ae..6efe561 100644
--- a/security/security.c
+++ b/security/security.c
@@ -396,6 +396,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
return 0;
return security_ops->path_rmdir(dir, dentry);
}
+EXPORT_SYMBOL(security_path_rmdir);
int security_path_unlink(struct path *dir, struct dentry *dentry)
{
@@ -412,6 +413,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
return 0;
return security_ops->path_symlink(dir, dentry, old_name);
}
+EXPORT_SYMBOL(security_path_symlink);
int security_path_link(struct dentry *old_dentry, struct path *new_dir,
struct dentry *new_dentry)
@@ -420,6 +422,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
return 0;
return security_ops->path_link(old_dentry, new_dir, new_dentry);
}
+EXPORT_SYMBOL(security_path_link);
int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
struct path *new_dir, struct dentry *new_dentry)
@@ -438,6 +441,7 @@ int security_path_truncate(struct path *path)
return 0;
return security_ops->path_truncate(path);
}
+EXPORT_SYMBOL(security_path_truncate);
int security_path_chmod(struct path *path, umode_t mode)
{
@@ -445,6 +449,7 @@ int security_path_chmod(struct path *path, umode_t mode)
return 0;
return security_ops->path_chmod(path, mode);
}
+EXPORT_SYMBOL(security_path_chmod);
int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
{
@@ -452,6 +457,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
return 0;
return security_ops->path_chown(path, uid, gid);
}
+EXPORT_SYMBOL(security_path_chown);
int security_path_chroot(struct path *path)
{
@@ -528,6 +534,7 @@ int security_inode_readlink(struct dentry *dentry)
return 0;
return security_ops->inode_readlink(dentry);
}
+EXPORT_SYMBOL(security_inode_readlink);
int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
{
@@ -542,6 +549,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return security_ops->inode_permission(inode, mask);
}
+EXPORT_SYMBOL(security_inode_permission);
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
@@ -663,6 +671,7 @@ int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask);
}
+EXPORT_SYMBOL(security_file_permission);
int security_file_alloc(struct file *file)
{
@@ -723,6 +732,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
return ret;
return ima_file_mmap(file, prot);
}
+EXPORT_SYMBOL(security_mmap_file);
int security_mmap_addr(unsigned long addr)
{

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

20
linux/create-aufs.sh Normal file → Executable file
View File

@ -5,7 +5,7 @@ rm -Rf aufs3-standalone
git clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git
cd aufs3-standalone
git branch -r
git checkout origin/aufs3.6
git checkout origin/aufs3.7
# modify what you want
@ -15,16 +15,16 @@ git checkout origin/aufs3.6
rm -v $(find . -type f -name '*.orig')
grep -qse 'EXPORT_SYMBOL(' aufs3-standalone.patch && \
sed -i-old -e 's|EXPORT_SYMBOL(|EXPORT_SYMBOL_GPL(|' aufs3-standalone.patch
rm -rf ../tmp/linux-3.6
mkdir -p ../tmp/linux-3.6
cp -a fs ../tmp/linux-3.6
cp -a include ../tmp/linux-3.6
cp -a Documentation ../tmp/linux-3.6
rm ../tmp/linux-3.6/include/linux/Kbuild
rm -rf ../tmp/linux-3.7
mkdir -p ../tmp/linux-3.7
cp -a fs ../tmp/linux-3.7
cp -a include ../tmp/linux-3.7
cp -a Documentation ../tmp/linux-3.7
rm ../tmp/linux-3.7/include/uapi/linux/Kbuild
cd ../tmp
diff -Naur null linux-3.6 | filterdiff | \
sed -e 's|null\(/include/linux/Kbuild\)|linux-3.6-old\1|;s|^--- null.*|--- /dev/null|;\|linux-3.6/include/linux/Kbuild|,${\|@@ -0,0 +1 @@|,$d}' \
| bzip2 > aufs$(sed -ne 's|#define.*AUFS_VERSION.*"\(.*\)"|\1|p' linux-3.6/include/linux/aufs_type.h).patch.bz2
diff -Naur null linux-3.7 | filterdiff | \
sed -e 's|null\(/include/uapi/linux/Kbuild\)|linux-3.7-old\1|;s|^--- null.*|--- /dev/null|;\|linux-3.7/include/uapi/linux/Kbuild|,${\|@@ -0,0 +1 @@|,$d}' \
| bzip2 > aufs$(sed -ne 's|#define.*AUFS_VERSION.*"\(.*\)"|\1|p' linux-3.7/include/linux/aufs_type.h).patch.bz2
mv *.bz2 $OLDPWD
cd $OLDPWD
mv *patch* ..

View File

@ -0,0 +1,153 @@
From 9ff0ab9881bd47f7d8a95c07a2fa61f594a91d0a Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sun, 16 Dec 2012 16:15:00 +0000
Subject: [PATCH] drm: Only evict the blocks required to create the requested
hole
Avoid clobbering adjacent blocks if they happen to expire earlier and
amalgamate together to form the requested hole.
In passing this fixes a regression from
commit ea7b1dd44867e9cd6bac67e7c9fc3f128b5b255c
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Fri Feb 18 17:59:12 2011 +0100
drm: mm: track free areas implicitly
which swaps the end address for size (with a potential overflow) and
effectively causes the eviction code to clobber almost all earlier
buffers above the evictee.
v2: Check the original hole not the adjusted as the coloring may confuse
us when later searching for the overlapping nodes. Also make sure that
we do apply the range restriction and color adjustment in the same
order for both scanning, searching and insertion.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/drm_mm.c | 45 +++++++++++++++++----------------------------
include/drm/drm_mm.h | 2 +-
2 files changed, 18 insertions(+), 29 deletions(-)
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 0761a03..665553c 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -213,11 +213,13 @@ static void drm_mm_insert_helper_range(struct drm_mm_node *hole_node,
BUG_ON(!hole_node->hole_follows || node->allocated);
- if (mm->color_adjust)
- mm->color_adjust(hole_node, color, &adj_start, &adj_end);
-
if (adj_start < start)
adj_start = start;
+ if (adj_end > end)
+ adj_end = end;
+
+ if (mm->color_adjust)
+ mm->color_adjust(hole_node, color, &adj_start, &adj_end);
if (alignment) {
unsigned tmp = adj_start % alignment;
@@ -489,7 +491,7 @@ void drm_mm_init_scan(struct drm_mm *mm,
mm->scan_size = size;
mm->scanned_blocks = 0;
mm->scan_hit_start = 0;
- mm->scan_hit_size = 0;
+ mm->scan_hit_end = 0;
mm->scan_check_range = 0;
mm->prev_scanned_node = NULL;
}
@@ -516,7 +518,7 @@ void drm_mm_init_scan_with_range(struct drm_mm *mm,
mm->scan_size = size;
mm->scanned_blocks = 0;
mm->scan_hit_start = 0;
- mm->scan_hit_size = 0;
+ mm->scan_hit_end = 0;
mm->scan_start = start;
mm->scan_end = end;
mm->scan_check_range = 1;
@@ -535,8 +537,7 @@ int drm_mm_scan_add_block(struct drm_mm_node *node)
struct drm_mm *mm = node->mm;
struct drm_mm_node *prev_node;
unsigned long hole_start, hole_end;
- unsigned long adj_start;
- unsigned long adj_end;
+ unsigned long adj_start, adj_end;
mm->scanned_blocks++;
@@ -553,14 +554,8 @@ int drm_mm_scan_add_block(struct drm_mm_node *node)
node->node_list.next = &mm->prev_scanned_node->node_list;
mm->prev_scanned_node = node;
- hole_start = drm_mm_hole_node_start(prev_node);
- hole_end = drm_mm_hole_node_end(prev_node);
-
- adj_start = hole_start;
- adj_end = hole_end;
-
- if (mm->color_adjust)
- mm->color_adjust(prev_node, mm->scan_color, &adj_start, &adj_end);
+ adj_start = hole_start = drm_mm_hole_node_start(prev_node);
+ adj_end = hole_end = drm_mm_hole_node_end(prev_node);
if (mm->scan_check_range) {
if (adj_start < mm->scan_start)
@@ -569,11 +564,14 @@ int drm_mm_scan_add_block(struct drm_mm_node *node)
adj_end = mm->scan_end;
}
+ if (mm->color_adjust)
+ mm->color_adjust(prev_node, mm->scan_color,
+ &adj_start, &adj_end);
+
if (check_free_hole(adj_start, adj_end,
mm->scan_size, mm->scan_alignment)) {
mm->scan_hit_start = hole_start;
- mm->scan_hit_size = hole_end;
-
+ mm->scan_hit_end = hole_end;
return 1;
}
@@ -609,19 +607,10 @@ int drm_mm_scan_remove_block(struct drm_mm_node *node)
node_list);
prev_node->hole_follows = node->scanned_preceeds_hole;
- INIT_LIST_HEAD(&node->node_list);
list_add(&node->node_list, &prev_node->node_list);
- /* Only need to check for containement because start&size for the
- * complete resulting free block (not just the desired part) is
- * stored. */
- if (node->start >= mm->scan_hit_start &&
- node->start + node->size
- <= mm->scan_hit_start + mm->scan_hit_size) {
- return 1;
- }
-
- return 0;
+ return (drm_mm_hole_node_end(node) > mm->scan_hit_start &&
+ node->start < mm->scan_hit_end);
}
EXPORT_SYMBOL(drm_mm_scan_remove_block);
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
index 06d7f79..a1b66b7 100644
--- a/include/drm/drm_mm.h
+++ b/include/drm/drm_mm.h
@@ -70,7 +70,7 @@ struct drm_mm {
unsigned long scan_color;
unsigned long scan_size;
unsigned long scan_hit_start;
- unsigned scan_hit_size;
+ unsigned long scan_hit_end;
unsigned scanned_blocks;
unsigned long scan_start;
unsigned long scan_end;
--
1.7.10.4

33
linux/fat-3.6.x.patch Normal file
View File

@ -0,0 +1,33 @@
From: Dave Reisner <dreisner@archlinux.org>
Date: Thu, 29 Nov 2012 03:18:52 +0000 (+1100)
Subject: fs/fat: strip "cp" prefix from codepage in display
X-Git-Tag: next-20121130~1^2~97
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnext%2Flinux-next.git;a=commitdiff_plain;h=f15914873184cc3f2a8d590fa4f7e32ab0a8a405
fs/fat: strip "cp" prefix from codepage in display
Option parsing code expects an unsigned integer for the codepage option,
but prefixes and stores this option with "cp" before passing to
load_nls(). This makes the displayed option in /proc an invalid one.
Strip the prefix when printing so that the displayed option is valid for
reuse.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 3b733a7..3580681 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -726,7 +726,8 @@ static int fat_show_options(struct seq_file *m, struct dentry *root)
if (opts->allow_utime)
seq_printf(m, ",allow_utime=%04o", opts->allow_utime);
if (sbi->nls_disk)
- seq_printf(m, ",codepage=%s", sbi->nls_disk->charset);
+ /* strip "cp" prefix from displayed option */
+ seq_printf(m, ",codepage=%s", &sbi->nls_disk->charset[2]);
if (isvfat) {
if (sbi->nls_io)
seq_printf(m, ",iocharset=%s", sbi->nls_io->charset);

View File

@ -0,0 +1,38 @@
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git;a=blobdiff_plain;f=kernel%2Fwatchdog.c;h=75a2ab3d0b0208dfa51e40339ffd00206622732e;hp=997c6a16ec2278969a10f251f63f237e7559d42e;hb=3935e89505a1c3ab3f3b0c7ef0eae54124f48905;hpb=74779e22261172ea728b989310f6ecc991b57d62
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 997c6a1..75a2ab3 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -344,6 +344,10 @@ static void watchdog_enable(unsigned int cpu)
{
struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer);
+ /* kick off the timer for the hardlockup detector */
+ hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
+ hrtimer->function = watchdog_timer_fn;
+
if (!watchdog_enabled) {
kthread_park(current);
return;
@@ -352,10 +356,6 @@ static void watchdog_enable(unsigned int cpu)
/* Enable the perf event */
watchdog_nmi_enable(cpu);
- /* kick off the timer for the hardlockup detector */
- hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- hrtimer->function = watchdog_timer_fn;
-
/* done here because hrtimer_start can only pin to smp_processor_id() */
hrtimer_start(hrtimer, ns_to_ktime(sample_period),
HRTIMER_MODE_REL_PINNED);
@@ -369,9 +369,6 @@ static void watchdog_disable(unsigned int cpu)
{
struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer);
- if (!watchdog_enabled)
- return;
-
watchdog_set_prio(SCHED_NORMAL, 0);
hrtimer_cancel(hrtimer);
/* disable the perf event */

View File

@ -2,7 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=
KERNEL_VERSION=3.6.6-1-CHAKRA
KERNEL_VERSION=3.7.2-1-CHAKRA
# set a sane PATH to ensure that critical utils like depmod will be found
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'