View | Details | Raw Unified | Return to bug 13941 | Differences between
and this patch

Collapse All | Expand All

(-)a/debian.master/changelog (-1 / +1 lines)
Lines 1-4 Link Here
1
linux (2.6.31-14.48) karmic; urgency=low
1
linux (2.6.31-14.48+bug396286v2) karmic; urgency=low
2
2
3
  [ Colin Watson ]
3
  [ Colin Watson ]
4
4
(-)a/fs/inode.c (-3 / +57 lines)
Lines 191-196 int inode_init_always(struct super_block *sb, struct inode *inode) Link Here
191
	inode->i_mapping = mapping;
191
	inode->i_mapping = mapping;
192
#ifdef CONFIG_FS_POSIX_ACL
192
#ifdef CONFIG_FS_POSIX_ACL
193
	inode->i_acl = inode->i_default_acl = ACL_NOT_CACHED;
193
	inode->i_acl = inode->i_default_acl = ACL_NOT_CACHED;
194
//	inode->i_dbg1 = inode->i_dbg2 = ACL_NOT_CACHED;
194
#endif
195
#endif
195
196
196
#ifdef CONFIG_FSNOTIFY
197
#ifdef CONFIG_FSNOTIFY
Lines 229-245 static struct inode *alloc_inode(struct super_block *sb) Link Here
229
	return inode;
230
	return inode;
230
}
231
}
231
232
233
static void inode_print_path(struct inode *inode)
234
{
235
	struct dentry *dp;
236
237
	dp = d_find_alias(inode);
238
	if (dp) {
239
		char buf[80];
240
		char *path;
241
242
		path = dentry_path(dp, buf, sizeof(buf));
243
244
		printk(KERN_ERR "ipath %s\n", IS_ERR(path)?"toolong":path);
245
	}
246
}
247
248
static int inode_check_acl(struct inode *inode)
249
{
250
	int rc = 0;
251
252
#ifdef CONFIG_FS_POSIX_ACL
253
	if (bad_acl_pointer(inode->i_acl)) {
254
		 printk(KERN_ERR "bad i_acl pointer = %p\n", inode->i_acl);
255
		inode_print_path(inode);
256
		rc |= 1;
257
	}
258
	if (bad_acl_pointer(inode->i_default_acl)) {
259
		printk(KERN_ERR "bad i_default_acl pointer = %p\n",
260
			inode->i_default_acl);
261
		inode_print_path(inode);
262
		rc |=2;
263
	}
264
//	if (inode->i_dbg1 != ACL_NOT_CACHED) {
265
//		printk(KERN_ERR "bad ptr before = %p\n", inode->i_dbg1);
266
//		rc |= 4;
267
//	}
268
//	if (inode->i_dbg2 != ACL_NOT_CACHED) {
269
//		printk(KERN_ERR "bad ptr after = %p\n", inode->i_dbg2);
270
//		rc |= 8;
271
//	}
272
	if (rc) {
273
		printk(KERN_ERR "inode(%p) ino(%lu) dev(%x)\n",
274
			inode, inode->i_ino, inode->i_rdev);
275
	}
276
#endif
277
	return(rc);
278
}
279
232
void __destroy_inode(struct inode *inode)
280
void __destroy_inode(struct inode *inode)
233
{
281
{
282
	int r = 0;
283
234
	BUG_ON(inode_has_buffers(inode));
284
	BUG_ON(inode_has_buffers(inode));
235
	ima_inode_free(inode);
285
	ima_inode_free(inode);
236
	security_inode_free(inode);
286
	security_inode_free(inode);
237
	fsnotify_inode_delete(inode);
287
	fsnotify_inode_delete(inode);
238
#ifdef CONFIG_FS_POSIX_ACL
288
#ifdef CONFIG_FS_POSIX_ACL
239
	if (inode->i_acl && inode->i_acl != ACL_NOT_CACHED)
289
	r = inode_check_acl(inode);
290
	if (!(r & 1) && inode->i_acl && inode->i_acl != ACL_NOT_CACHED)
240
		posix_acl_release(inode->i_acl);
291
		posix_acl_release(inode->i_acl);
241
	if (inode->i_default_acl && inode->i_default_acl != ACL_NOT_CACHED)
292
	if (!(r & 2) && inode->i_default_acl) {
242
		posix_acl_release(inode->i_default_acl);
293
		if (inode->i_default_acl != ACL_NOT_CACHED)
294
			posix_acl_release(inode->i_default_acl);
295
	}
243
#endif
296
#endif
244
}
297
}
245
EXPORT_SYMBOL(__destroy_inode);
298
EXPORT_SYMBOL(__destroy_inode);
Lines 294-299 static void init_once(void *foo) Link Here
294
 */
347
 */
295
void __iget(struct inode *inode)
348
void __iget(struct inode *inode)
296
{
349
{
350
	inode_check_acl(inode);
297
	if (atomic_read(&inode->i_count)) {
351
	if (atomic_read(&inode->i_count)) {
298
		atomic_inc(&inode->i_count);
352
		atomic_inc(&inode->i_count);
299
		return;
353
		return;
(-)a/include/linux/fs.h (+11 lines)
Lines 713-718 static inline int mapping_writably_mapped(struct address_space *mapping) Link Here
713
struct posix_acl;
713
struct posix_acl;
714
#define ACL_NOT_CACHED ((void *)(-1))
714
#define ACL_NOT_CACHED ((void *)(-1))
715
715
716
#define bad_acl_pointer(x)	( \
717
					( \
718
						(\
719
							((long) x) & \
720
							((long) 0xffff0000) \
721
						) == ((long) 0xffff0000) \
722
					) && x != ACL_NOT_CACHED \
723
				)
724
716
struct inode {
725
struct inode {
717
	struct hlist_node	i_hash;
726
	struct hlist_node	i_hash;
718
	struct list_head	i_list;
727
	struct list_head	i_list;
Lines 777-784 struct inode { Link Here
777
	void			*i_security;
786
	void			*i_security;
778
#endif
787
#endif
779
#ifdef CONFIG_FS_POSIX_ACL
788
#ifdef CONFIG_FS_POSIX_ACL
789
//	void			*i_dbg1;
780
	struct posix_acl	*i_acl;
790
	struct posix_acl	*i_acl;
781
	struct posix_acl	*i_default_acl;
791
	struct posix_acl	*i_default_acl;
792
//	void			*i_dbg2;
782
#endif
793
#endif
783
	void			*i_private; /* fs or device private pointer */
794
	void			*i_private; /* fs or device private pointer */
784
};
795
};
(-)a/include/linux/posix_acl.h (+2 lines)
Lines 113-118 static inline void set_cached_acl(struct inode *inode, Link Here
113
				  struct posix_acl *acl)
113
				  struct posix_acl *acl)
114
{
114
{
115
	struct posix_acl *old = NULL;
115
	struct posix_acl *old = NULL;
116
117
	WARN_ON(bad_acl_pointer(acl));
116
	spin_lock(&inode->i_lock);
118
	spin_lock(&inode->i_lock);
117
	switch (type) {
119
	switch (type) {
118
	case ACL_TYPE_ACCESS:
120
	case ACL_TYPE_ACCESS:
(-)a/mm/shmem_acl.c (+2 lines)
Lines 42-47 shmem_set_acl(struct inode *inode, int type, struct posix_acl *acl) Link Here
42
{
42
{
43
	struct posix_acl *free = NULL;
43
	struct posix_acl *free = NULL;
44
44
45
	WARN_ON(bad_acl_pointer(acl));
46
45
	spin_lock(&inode->i_lock);
47
	spin_lock(&inode->i_lock);
46
	switch(type) {
48
	switch(type) {
47
		case ACL_TYPE_ACCESS:
49
		case ACL_TYPE_ACCESS:

Return to bug 13941