[rt] fix conflict between the security restrictions on links and rt

Instead of fixing aufs I disabled it for the rt feature set as it's only
needed for the installer.

svn path=/dists/sid/linux-2.6/; revision=18814
This commit is contained in:
Uwe Kleine-König 2012-03-11 16:36:05 +00:00
parent ac448e8f2f
commit 7b15bcc41a
5 changed files with 84 additions and 1 deletions

4
debian/changelog vendored
View File

@ -2,7 +2,9 @@ linux-2.6 (3.2.9-2) UNRELEASED; urgency=low
[ Uwe Kleine-König ]
* [rt] bump rt patch to version 3.2.9-rt17
* [rt] fix conflict between the security restrictions on links introduced in
3.2.9-1 and rt (Closes: #663269)
[ Aurelien Jarno ]
* [mips,mipsel] Mark ext4-modules as provided by the kernel-image udeb.

View File

@ -3,3 +3,6 @@ CONFIG_PREEMPT_RT_FULL=y
CONFIG_SCHED_TRACER=y
CONFIG_MISSED_TIMER_OFFSETS_HIST=y
CONFIG_WAKEUP_LATENCY_HIST=y
## disable aufs as it's not needed on rt and conflicts with fs-dentry-use-seqlock.patch
# CONFIG_AUFS_FS is not set

View File

@ -0,0 +1,22 @@
---
fs/namei.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -679,13 +679,13 @@
return 0;
/* Check parent directory mode and owner. */
- spin_lock(&dentry->d_lock);
+ seq_spin_lock(&dentry->d_lock);
parent = dentry->d_parent->d_inode;
if ((parent->i_mode & (S_ISVTX|S_IWOTH)) == (S_ISVTX|S_IWOTH) &&
parent->i_uid != inode->i_uid) {
error = -EACCES;
}
- spin_unlock(&dentry->d_lock);
+ seq_spin_unlock(&dentry->d_lock);
if (error)
audit_log_link_denied("follow_link", link);

View File

@ -0,0 +1,54 @@
From 0bf0d69e1a358e93e5c9b256bb18cab4041e7d8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
Date: Sun, 11 Mar 2012 17:14:22 +0100
Subject: [PATCH RT] staging/pohmelfs: convert struct fs->lock usage to seq_spin_{,un}lock
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This fixes:
drivers/staging/pohmelfs/path_entry.c:47:2: warning: passing argument 1 of rt_spin_lock from incompatible pointer type [enabled by default]
include/linux/spinlock_rt.h:19:56: note: expected struct spinlock_t * but argument is of type struct seqlock_t *
drivers/staging/pohmelfs/path_entry.c:49:2: warning: passing argument 1 of rt_spin_unlock from incompatible pointer type [enabled by default]
include/linux/spinlock_rt.h:22:56: note: expected struct spinlock_t * but argument is of type struct seqlock_t *
drivers/staging/pohmelfs/path_entry.c:95:2: warning: passing argument 1 of rt_spin_lock from incompatible pointer type [enabled by default]
include/linux/spinlock_rt.h:19:56: note: expected struct spinlock_t * but argument is of type struct seqlock_t *
drivers/staging/pohmelfs/path_entry.c:97:2: warning: passing argument 1 of rt_spin_unlock from incompatible pointer type [enabled by default]
include/linux/spinlock_rt.h:22:56: note: expected struct spinlock_t * but argument is of type struct seqlock_t *
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Forwarded: http://mid.gmane.org/1331482999-32252-1-git-send-email-u.kleine-koenig@pengutronix.de
---
drivers/staging/pohmelfs/path_entry.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/pohmelfs/path_entry.c b/drivers/staging/pohmelfs/path_entry.c
index 400a9fc..fc0c3fe 100644
--- a/drivers/staging/pohmelfs/path_entry.c
+++ b/drivers/staging/pohmelfs/path_entry.c
@@ -44,9 +44,9 @@ int pohmelfs_construct_path_string(struct pohmelfs_inode *pi, void *data, int le
return -ENOENT;
}
- spin_lock(&current->fs->lock);
+ seq_spin_lock(&current->fs->lock);
path.mnt = mntget(current->fs->root.mnt);
- spin_unlock(&current->fs->lock);
+ seq_spin_unlock(&current->fs->lock);
path.dentry = d;
@@ -92,9 +92,9 @@ int pohmelfs_path_length(struct pohmelfs_inode *pi)
return -ENOENT;
}
- spin_lock(&current->fs->lock);
+ seq_spin_lock(&current->fs->lock);
root = dget(current->fs->root.dentry);
- spin_unlock(&current->fs->lock);
+ seq_spin_unlock(&current->fs->lock);
rename_retry:
len = 1; /* Root slash */

View File

@ -268,3 +268,5 @@
+ features/all/rt/net-use-cpu-chill.patch featureset=rt
+ features/all/rt/kconfig-disable-a-few-options-rt.patch featureset=rt
+ features/all/rt/kconfig-preempt-rt-full.patch featureset=rt
+ features/all/rt/fix-rt+link-creation-restrictions featureset=rt
+ features/all/rt/staging-pohmelfs-convert-struct-fs-lock-usage-to-.patch featureset=rt