Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262665
b: refs/heads/master
c: 4d81897
h: refs/heads/master
i:
  262663: d8e75b2
v: v3
  • Loading branch information
Tetsuo Handa authored and James Morris committed Aug 8, 2011
1 parent 783cbaf commit 78216da
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c723ba5b7886909b2e430f2eae454c33f7fe5c6
refs/heads/master: 4d81897139ffb738ee14b6f84f63f93ecda1136b
26 changes: 18 additions & 8 deletions trunk/fs/autofs4/autofs_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,27 @@

/* #define DEBUG */

#define DPRINTK(fmt, ...) \
pr_debug("pid %d: %s: " fmt "\n", \
current->pid, __func__, ##__VA_ARGS__)

#define AUTOFS_WARN(fmt, ...) \
#ifdef DEBUG
#define DPRINTK(fmt, args...) \
do { \
printk(KERN_DEBUG "pid %d: %s: " fmt "\n", \
current->pid, __func__, ##args); \
} while (0)
#else
#define DPRINTK(fmt, args...) do {} while (0)
#endif

#define AUTOFS_WARN(fmt, args...) \
do { \
printk(KERN_WARNING "pid %d: %s: " fmt "\n", \
current->pid, __func__, ##__VA_ARGS__)
current->pid, __func__, ##args); \
} while (0)

#define AUTOFS_ERROR(fmt, ...) \
#define AUTOFS_ERROR(fmt, args...) \
do { \
printk(KERN_ERR "pid %d: %s: " fmt "\n", \
current->pid, __func__, ##__VA_ARGS__)
current->pid, __func__, ##args); \
} while (0)

/* Unified info structure. This is pointed to by both the dentry and
inode structures. Each file in the filesystem has an instance of this
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/autofs4/waitq.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
size_t pktsz;

DPRINTK("wait id = 0x%08lx, name = %.*s, type=%d",
(unsigned long) wq->wait_queue_token, wq->name.len, wq->name.name, type);
wq->wait_queue_token, wq->name.len, wq->name.name, type);

memset(&pkt,0,sizeof pkt); /* For security reasons */

Expand Down
6 changes: 3 additions & 3 deletions trunk/include/linux/cred.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static inline void put_cred(const struct cred *_cred)
* since nobody else can modify it.
*/
#define current_cred() \
rcu_dereference_protected(current->cred, 1)
(*(__force struct cred **)&current->cred)

/**
* __task_cred - Access a task's objective credentials
Expand Down Expand Up @@ -307,7 +307,7 @@ static inline void put_cred(const struct cred *_cred)
#define get_current_user() \
({ \
struct user_struct *__u; \
const struct cred *__cred; \
struct cred *__cred; \
__cred = current_cred(); \
__u = get_uid(__cred->user); \
__u; \
Expand All @@ -322,7 +322,7 @@ static inline void put_cred(const struct cred *_cred)
#define get_current_groups() \
({ \
struct group_info *__groups; \
const struct cred *__cred; \
struct cred *__cred; \
__cred = current_cred(); \
__groups = get_group_info(__cred->group_info); \
__groups; \
Expand Down
12 changes: 2 additions & 10 deletions trunk/include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,6 @@ int invalidate_inode_page(struct page *page);
#ifdef CONFIG_MMU
extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, unsigned int flags);
extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
unsigned long address, unsigned int fault_flags);
#else
static inline int handle_mm_fault(struct mm_struct *mm,
struct vm_area_struct *vma, unsigned long address,
Expand All @@ -973,14 +971,6 @@ static inline int handle_mm_fault(struct mm_struct *mm,
BUG();
return VM_FAULT_SIGBUS;
}
static inline int fixup_user_fault(struct task_struct *tsk,
struct mm_struct *mm, unsigned long address,
unsigned int fault_flags)
{
/* should never happen if there's no MMU */
BUG();
return -EFAULT;
}
#endif

extern int make_pages_present(unsigned long addr, unsigned long end);
Expand All @@ -998,6 +988,8 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
int get_user_pages_fast(unsigned long start, int nr_pages, int write,
struct page **pages);
struct page *get_dump_page(unsigned long addr);
extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
unsigned long address, unsigned int fault_flags);

extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
extern void do_invalidatepage(struct page *page, unsigned long offset);
Expand Down
5 changes: 4 additions & 1 deletion trunk/security/tomoyo/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,10 @@ static void tomoyo_read_profile(struct tomoyo_io_buffer *head)
head->r.index++)
if (ns->profile_ptr[head->r.index])
break;
if (head->r.index == TOMOYO_MAX_PROFILES)
if (head->r.index == TOMOYO_MAX_PROFILES) {
head->r.eof = true;
return;
}
head->r.step++;
break;
case 2:
Expand All @@ -723,6 +725,7 @@ static void tomoyo_read_profile(struct tomoyo_io_buffer *head)
tomoyo_io_printf(head, "%u-COMMENT=", index);
tomoyo_set_string(head, comment ? comment->name : "");
tomoyo_set_lf(head);
tomoyo_print_namespace(head);
tomoyo_io_printf(head, "%u-PREFERENCE={ ", index);
for (i = 0; i < TOMOYO_MAX_PREF; i++)
tomoyo_io_printf(head, "%s=%u ",
Expand Down

0 comments on commit 78216da

Please sign in to comment.