diff options
| author | Paul Mackerras <paulus@samba.org> | 2006-08-08 03:09:11 -0400 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2006-08-08 03:09:11 -0400 |
| commit | 32bc6e095d75233e7c87cc6fa0e07942b124d194 (patch) | |
| tree | 8f83ef9a23d52d1305878b65dd98fc22b09b7f3e /include/linux | |
| parent | 5cf13911b1e72707b6f0eb39b2d819ec6e343d76 (diff) | |
| parent | 81b73dd92b97423b8f5324a59044da478c04f4c4 (diff) | |
Merge branch 'merge'
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/audit.h | 43 | ||||
| -rw-r--r-- | include/linux/debug_locks.h | 2 | ||||
| -rw-r--r-- | include/linux/fsnotify.h | 6 | ||||
| -rw-r--r-- | include/linux/input.h | 24 | ||||
| -rw-r--r-- | include/linux/kobject.h | 2 | ||||
| -rw-r--r-- | include/linux/lockd/lockd.h | 1 | ||||
| -rw-r--r-- | include/linux/netfilter_bridge.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 6 | ||||
| -rw-r--r-- | include/linux/pci_ids.h | 1 | ||||
| -rw-r--r-- | include/linux/sched.h | 8 | ||||
| -rw-r--r-- | include/linux/security.h | 40 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 33 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 2 | ||||
| -rw-r--r-- | include/linux/usb.h | 7 | ||||
| -rw-r--r-- | include/linux/usb_usual.h | 4 | ||||
| -rw-r--r-- | include/linux/videodev.h | 7 | ||||
| -rw-r--r-- | include/linux/videodev2.h | 2 | ||||
| -rw-r--r-- | include/linux/vmstat.h | 8 |
18 files changed, 148 insertions, 49 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index b27d7debc5a1..64f9f9e56ac5 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -327,21 +327,31 @@ extern void __audit_getname(const char *name); | |||
| 327 | extern void audit_putname(const char *name); | 327 | extern void audit_putname(const char *name); |
| 328 | extern void __audit_inode(const char *name, const struct inode *inode); | 328 | extern void __audit_inode(const char *name, const struct inode *inode); |
| 329 | extern void __audit_inode_child(const char *dname, const struct inode *inode, | 329 | extern void __audit_inode_child(const char *dname, const struct inode *inode, |
| 330 | unsigned long pino); | 330 | const struct inode *parent); |
| 331 | extern void __audit_inode_update(const struct inode *inode); | ||
| 332 | static inline int audit_dummy_context(void) | ||
| 333 | { | ||
| 334 | void *p = current->audit_context; | ||
| 335 | return !p || *(int *)p; | ||
| 336 | } | ||
| 331 | static inline void audit_getname(const char *name) | 337 | static inline void audit_getname(const char *name) |
| 332 | { | 338 | { |
| 333 | if (unlikely(current->audit_context)) | 339 | if (unlikely(!audit_dummy_context())) |
| 334 | __audit_getname(name); | 340 | __audit_getname(name); |
| 335 | } | 341 | } |
| 336 | static inline void audit_inode(const char *name, const struct inode *inode) { | 342 | static inline void audit_inode(const char *name, const struct inode *inode) { |
| 337 | if (unlikely(current->audit_context)) | 343 | if (unlikely(!audit_dummy_context())) |
| 338 | __audit_inode(name, inode); | 344 | __audit_inode(name, inode); |
| 339 | } | 345 | } |
| 340 | static inline void audit_inode_child(const char *dname, | 346 | static inline void audit_inode_child(const char *dname, |
| 341 | const struct inode *inode, | 347 | const struct inode *inode, |
| 342 | unsigned long pino) { | 348 | const struct inode *parent) { |
| 343 | if (unlikely(current->audit_context)) | 349 | if (unlikely(!audit_dummy_context())) |
| 344 | __audit_inode_child(dname, inode, pino); | 350 | __audit_inode_child(dname, inode, parent); |
| 351 | } | ||
| 352 | static inline void audit_inode_update(const struct inode *inode) { | ||
| 353 | if (unlikely(!audit_dummy_context())) | ||
| 354 | __audit_inode_update(inode); | ||
| 345 | } | 355 | } |
| 346 | 356 | ||
| 347 | /* Private API (for audit.c only) */ | 357 | /* Private API (for audit.c only) */ |
| @@ -365,57 +375,61 @@ extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); | |||
| 365 | 375 | ||
| 366 | static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) | 376 | static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) |
| 367 | { | 377 | { |
| 368 | if (unlikely(current->audit_context)) | 378 | if (unlikely(!audit_dummy_context())) |
| 369 | return __audit_ipc_obj(ipcp); | 379 | return __audit_ipc_obj(ipcp); |
| 370 | return 0; | 380 | return 0; |
| 371 | } | 381 | } |
| 372 | static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) | 382 | static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) |
| 373 | { | 383 | { |
| 374 | if (unlikely(current->audit_context)) | 384 | if (unlikely(!audit_dummy_context())) |
| 375 | return __audit_ipc_set_perm(qbytes, uid, gid, mode); | 385 | return __audit_ipc_set_perm(qbytes, uid, gid, mode); |
| 376 | return 0; | 386 | return 0; |
| 377 | } | 387 | } |
| 378 | static inline int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr) | 388 | static inline int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr) |
| 379 | { | 389 | { |
| 380 | if (unlikely(current->audit_context)) | 390 | if (unlikely(!audit_dummy_context())) |
| 381 | return __audit_mq_open(oflag, mode, u_attr); | 391 | return __audit_mq_open(oflag, mode, u_attr); |
| 382 | return 0; | 392 | return 0; |
| 383 | } | 393 | } |
| 384 | static inline int audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout) | 394 | static inline int audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout) |
| 385 | { | 395 | { |
| 386 | if (unlikely(current->audit_context)) | 396 | if (unlikely(!audit_dummy_context())) |
| 387 | return __audit_mq_timedsend(mqdes, msg_len, msg_prio, u_abs_timeout); | 397 | return __audit_mq_timedsend(mqdes, msg_len, msg_prio, u_abs_timeout); |
| 388 | return 0; | 398 | return 0; |
| 389 | } | 399 | } |
| 390 | static inline int audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout) | 400 | static inline int audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout) |
| 391 | { | 401 | { |
| 392 | if (unlikely(current->audit_context)) | 402 | if (unlikely(!audit_dummy_context())) |
| 393 | return __audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout); | 403 | return __audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout); |
| 394 | return 0; | 404 | return 0; |
| 395 | } | 405 | } |
| 396 | static inline int audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) | 406 | static inline int audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) |
| 397 | { | 407 | { |
| 398 | if (unlikely(current->audit_context)) | 408 | if (unlikely(!audit_dummy_context())) |
| 399 | return __audit_mq_notify(mqdes, u_notification); | 409 | return __audit_mq_notify(mqdes, u_notification); |
| 400 | return 0; | 410 | return 0; |
| 401 | } | 411 | } |
| 402 | static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) | 412 | static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) |
| 403 | { | 413 | { |
| 404 | if (unlikely(current->audit_context)) | 414 | if (unlikely(!audit_dummy_context())) |
| 405 | return __audit_mq_getsetattr(mqdes, mqstat); | 415 | return __audit_mq_getsetattr(mqdes, mqstat); |
| 406 | return 0; | 416 | return 0; |
| 407 | } | 417 | } |
| 418 | extern int audit_n_rules; | ||
| 408 | #else | 419 | #else |
| 409 | #define audit_alloc(t) ({ 0; }) | 420 | #define audit_alloc(t) ({ 0; }) |
| 410 | #define audit_free(t) do { ; } while (0) | 421 | #define audit_free(t) do { ; } while (0) |
| 411 | #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) | 422 | #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) |
| 412 | #define audit_syscall_exit(f,r) do { ; } while (0) | 423 | #define audit_syscall_exit(f,r) do { ; } while (0) |
| 424 | #define audit_dummy_context() 1 | ||
| 413 | #define audit_getname(n) do { ; } while (0) | 425 | #define audit_getname(n) do { ; } while (0) |
| 414 | #define audit_putname(n) do { ; } while (0) | 426 | #define audit_putname(n) do { ; } while (0) |
| 415 | #define __audit_inode(n,i) do { ; } while (0) | 427 | #define __audit_inode(n,i) do { ; } while (0) |
| 416 | #define __audit_inode_child(d,i,p) do { ; } while (0) | 428 | #define __audit_inode_child(d,i,p) do { ; } while (0) |
| 429 | #define __audit_inode_update(i) do { ; } while (0) | ||
| 417 | #define audit_inode(n,i) do { ; } while (0) | 430 | #define audit_inode(n,i) do { ; } while (0) |
| 418 | #define audit_inode_child(d,i,p) do { ; } while (0) | 431 | #define audit_inode_child(d,i,p) do { ; } while (0) |
| 432 | #define audit_inode_update(i) do { ; } while (0) | ||
| 419 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) | 433 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) |
| 420 | #define audit_get_loginuid(c) ({ -1; }) | 434 | #define audit_get_loginuid(c) ({ -1; }) |
| 421 | #define audit_ipc_obj(i) ({ 0; }) | 435 | #define audit_ipc_obj(i) ({ 0; }) |
| @@ -430,6 +444,7 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) | |||
| 430 | #define audit_mq_timedreceive(d,l,p,t) ({ 0; }) | 444 | #define audit_mq_timedreceive(d,l,p,t) ({ 0; }) |
| 431 | #define audit_mq_notify(d,n) ({ 0; }) | 445 | #define audit_mq_notify(d,n) ({ 0; }) |
| 432 | #define audit_mq_getsetattr(d,s) ({ 0; }) | 446 | #define audit_mq_getsetattr(d,s) ({ 0; }) |
| 447 | #define audit_n_rules 0 | ||
| 433 | #endif | 448 | #endif |
| 434 | 449 | ||
| 435 | #ifdef CONFIG_AUDIT | 450 | #ifdef CONFIG_AUDIT |
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index 6a7047851e48..88dafa246d87 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef __LINUX_DEBUG_LOCKING_H | 1 | #ifndef __LINUX_DEBUG_LOCKING_H |
| 2 | #define __LINUX_DEBUG_LOCKING_H | 2 | #define __LINUX_DEBUG_LOCKING_H |
| 3 | 3 | ||
| 4 | struct task_struct; | ||
| 5 | |||
| 4 | extern int debug_locks; | 6 | extern int debug_locks; |
| 5 | extern int debug_locks_silent; | 7 | extern int debug_locks_silent; |
| 6 | 8 | ||
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index cc5dec70c32c..d4f219ffaa5d 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
| @@ -67,7 +67,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
| 67 | if (source) { | 67 | if (source) { |
| 68 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); | 68 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); |
| 69 | } | 69 | } |
| 70 | audit_inode_child(new_name, source, new_dir->i_ino); | 70 | audit_inode_child(new_name, source, new_dir); |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | /* | 73 | /* |
| @@ -98,7 +98,7 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | |||
| 98 | inode_dir_notify(inode, DN_CREATE); | 98 | inode_dir_notify(inode, DN_CREATE); |
| 99 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, | 99 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, |
| 100 | dentry->d_inode); | 100 | dentry->d_inode); |
| 101 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); | 101 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | /* | 104 | /* |
| @@ -109,7 +109,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | |||
| 109 | inode_dir_notify(inode, DN_CREATE); | 109 | inode_dir_notify(inode, DN_CREATE); |
| 110 | inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, | 110 | inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, |
| 111 | dentry->d_name.name, dentry->d_inode); | 111 | dentry->d_name.name, dentry->d_inode); |
| 112 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); | 112 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | /* | 115 | /* |
diff --git a/include/linux/input.h b/include/linux/input.h index 56f1e0e1e598..b3253ab72ff7 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -893,7 +893,6 @@ struct input_dev { | |||
| 893 | 893 | ||
| 894 | int (*open)(struct input_dev *dev); | 894 | int (*open)(struct input_dev *dev); |
| 895 | void (*close)(struct input_dev *dev); | 895 | void (*close)(struct input_dev *dev); |
| 896 | int (*accept)(struct input_dev *dev, struct file *file); | ||
| 897 | int (*flush)(struct input_dev *dev, struct file *file); | 896 | int (*flush)(struct input_dev *dev, struct file *file); |
| 898 | int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); | 897 | int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); |
| 899 | int (*upload_effect)(struct input_dev *dev, struct ff_effect *effect); | 898 | int (*upload_effect)(struct input_dev *dev, struct ff_effect *effect); |
| @@ -961,6 +960,26 @@ struct input_dev { | |||
| 961 | 960 | ||
| 962 | struct input_handle; | 961 | struct input_handle; |
| 963 | 962 | ||
| 963 | /** | ||
| 964 | * struct input_handler - implements one of interfaces for input devices | ||
| 965 | * @private: driver-specific data | ||
| 966 | * @event: event handler | ||
| 967 | * @connect: called when attaching a handler to an input device | ||
| 968 | * @disconnect: disconnects a handler from input device | ||
| 969 | * @start: starts handler for given handle. This function is called by | ||
| 970 | * input core right after connect() method and also when a process | ||
| 971 | * that "grabbed" a device releases it | ||
| 972 | * @fops: file operations this driver implements | ||
| 973 | * @minor: beginning of range of 32 minors for devices this driver | ||
| 974 | * can provide | ||
| 975 | * @name: name of the handler, to be shown in /proc/bus/input/handlers | ||
| 976 | * @id_table: pointer to a table of input_device_ids this driver can | ||
| 977 | * handle | ||
| 978 | * @blacklist: prointer to a table of input_device_ids this driver should | ||
| 979 | * ignore even if they match @id_table | ||
| 980 | * @h_list: list of input handles associated with the handler | ||
| 981 | * @node: for placing the driver onto input_handler_list | ||
| 982 | */ | ||
| 964 | struct input_handler { | 983 | struct input_handler { |
| 965 | 984 | ||
| 966 | void *private; | 985 | void *private; |
| @@ -968,6 +987,7 @@ struct input_handler { | |||
| 968 | void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); | 987 | void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); |
| 969 | struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id); | 988 | struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id); |
| 970 | void (*disconnect)(struct input_handle *handle); | 989 | void (*disconnect)(struct input_handle *handle); |
| 990 | void (*start)(struct input_handle *handle); | ||
| 971 | 991 | ||
| 972 | const struct file_operations *fops; | 992 | const struct file_operations *fops; |
| 973 | int minor; | 993 | int minor; |
| @@ -1030,10 +1050,10 @@ void input_release_device(struct input_handle *); | |||
| 1030 | int input_open_device(struct input_handle *); | 1050 | int input_open_device(struct input_handle *); |
| 1031 | void input_close_device(struct input_handle *); | 1051 | void input_close_device(struct input_handle *); |
| 1032 | 1052 | ||
| 1033 | int input_accept_process(struct input_handle *handle, struct file *file); | ||
| 1034 | int input_flush_device(struct input_handle* handle, struct file* file); | 1053 | int input_flush_device(struct input_handle* handle, struct file* file); |
| 1035 | 1054 | ||
| 1036 | void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); | 1055 | void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); |
| 1056 | void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value); | ||
| 1037 | 1057 | ||
| 1038 | static inline void input_report_key(struct input_dev *dev, unsigned int code, int value) | 1058 | static inline void input_report_key(struct input_dev *dev, unsigned int code, int value) |
| 1039 | { | 1059 | { |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 0503b2ed8bae..2d229327959e 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -46,8 +46,6 @@ enum kobject_action { | |||
| 46 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ | 46 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ |
| 47 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ | 47 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ |
| 48 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ | 48 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ |
| 49 | KOBJ_UNDOCK = (__force kobject_action_t) 0x08, /* undocking */ | ||
| 50 | KOBJ_DOCK = (__force kobject_action_t) 0x09, /* dock */ | ||
| 51 | }; | 49 | }; |
| 52 | 50 | ||
| 53 | struct kobject { | 51 | struct kobject { |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index aa4fe905bb4d..0d92c468d55a 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
| @@ -123,7 +123,6 @@ struct nlm_block { | |||
| 123 | unsigned int b_id; /* block id */ | 123 | unsigned int b_id; /* block id */ |
| 124 | unsigned char b_queued; /* re-queued */ | 124 | unsigned char b_queued; /* re-queued */ |
| 125 | unsigned char b_granted; /* VFS granted lock */ | 125 | unsigned char b_granted; /* VFS granted lock */ |
| 126 | unsigned char b_done; /* callback complete */ | ||
| 127 | struct nlm_file * b_file; /* file in question */ | 126 | struct nlm_file * b_file; /* file in question */ |
| 128 | }; | 127 | }; |
| 129 | 128 | ||
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 31f02ba036ce..10c13dc4665b 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/netfilter.h> | 7 | #include <linux/netfilter.h> |
| 8 | #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER) | 8 | #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER) |
| 9 | #include <asm/atomic.h> | ||
| 10 | #include <linux/if_ether.h> | 9 | #include <linux/if_ether.h> |
| 11 | #endif | 10 | #endif |
| 12 | 11 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 55ea853d57bc..247434553ae8 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -476,10 +476,9 @@ static inline int nfs_wb_page(struct inode *inode, struct page* page) | |||
| 476 | } | 476 | } |
| 477 | 477 | ||
| 478 | /* | 478 | /* |
| 479 | * Allocate and free nfs_write_data structures | 479 | * Allocate nfs_write_data structures |
| 480 | */ | 480 | */ |
| 481 | extern struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount); | 481 | extern struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount); |
| 482 | extern void nfs_writedata_free(struct nfs_write_data *p); | ||
| 483 | 482 | ||
| 484 | /* | 483 | /* |
| 485 | * linux/fs/nfs/read.c | 484 | * linux/fs/nfs/read.c |
| @@ -491,10 +490,9 @@ extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *); | |||
| 491 | extern void nfs_readdata_release(void *data); | 490 | extern void nfs_readdata_release(void *data); |
| 492 | 491 | ||
| 493 | /* | 492 | /* |
| 494 | * Allocate and free nfs_read_data structures | 493 | * Allocate nfs_read_data structures |
| 495 | */ | 494 | */ |
| 496 | extern struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount); | 495 | extern struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount); |
| 497 | extern void nfs_readdata_free(struct nfs_read_data *p); | ||
| 498 | 496 | ||
| 499 | /* | 497 | /* |
| 500 | * linux/fs/nfs3proc.c | 498 | * linux/fs/nfs3proc.c |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c09396d2c77b..4eae06b08cf2 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2142,6 +2142,7 @@ | |||
| 2142 | #define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501 | 2142 | #define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501 |
| 2143 | #define PCI_DEVICE_ID_INTEL_82850_HB 0x2530 | 2143 | #define PCI_DEVICE_ID_INTEL_82850_HB 0x2530 |
| 2144 | #define PCI_DEVICE_ID_INTEL_82860_HB 0x2531 | 2144 | #define PCI_DEVICE_ID_INTEL_82860_HB 0x2531 |
| 2145 | #define PCI_DEVICE_ID_INTEL_E7501_MCH 0x254c | ||
| 2145 | #define PCI_DEVICE_ID_INTEL_82845G_HB 0x2560 | 2146 | #define PCI_DEVICE_ID_INTEL_82845G_HB 0x2560 |
| 2146 | #define PCI_DEVICE_ID_INTEL_82845G_IG 0x2562 | 2147 | #define PCI_DEVICE_ID_INTEL_82845G_IG 0x2562 |
| 2147 | #define PCI_DEVICE_ID_INTEL_82865_HB 0x2570 | 2148 | #define PCI_DEVICE_ID_INTEL_82865_HB 0x2570 |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6afa72e080cb..6674fc1e51bf 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1558,6 +1558,14 @@ static inline void freeze(struct task_struct *p) | |||
| 1558 | } | 1558 | } |
| 1559 | 1559 | ||
| 1560 | /* | 1560 | /* |
| 1561 | * Sometimes we may need to cancel the previous 'freeze' request | ||
| 1562 | */ | ||
| 1563 | static inline void do_not_freeze(struct task_struct *p) | ||
| 1564 | { | ||
| 1565 | p->flags &= ~PF_FREEZE; | ||
| 1566 | } | ||
| 1567 | |||
| 1568 | /* | ||
| 1561 | * Wake up a frozen process | 1569 | * Wake up a frozen process |
| 1562 | */ | 1570 | */ |
| 1563 | static inline int thaw_process(struct task_struct *p) | 1571 | static inline int thaw_process(struct task_struct *p) |
diff --git a/include/linux/security.h b/include/linux/security.h index f75303831d09..6bc2aad494ff 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -1109,6 +1109,16 @@ struct swap_info_struct; | |||
| 1109 | * @name contains the name of the security module being unstacked. | 1109 | * @name contains the name of the security module being unstacked. |
| 1110 | * @ops contains a pointer to the struct security_operations of the module to unstack. | 1110 | * @ops contains a pointer to the struct security_operations of the module to unstack. |
| 1111 | * | 1111 | * |
| 1112 | * @secid_to_secctx: | ||
| 1113 | * Convert secid to security context. | ||
| 1114 | * @secid contains the security ID. | ||
| 1115 | * @secdata contains the pointer that stores the converted security context. | ||
| 1116 | * | ||
| 1117 | * @release_secctx: | ||
| 1118 | * Release the security context. | ||
| 1119 | * @secdata contains the security context. | ||
| 1120 | * @seclen contains the length of the security context. | ||
| 1121 | * | ||
| 1112 | * This is the main security structure. | 1122 | * This is the main security structure. |
| 1113 | */ | 1123 | */ |
| 1114 | struct security_operations { | 1124 | struct security_operations { |
| @@ -1289,6 +1299,8 @@ struct security_operations { | |||
| 1289 | 1299 | ||
| 1290 | int (*getprocattr)(struct task_struct *p, char *name, void *value, size_t size); | 1300 | int (*getprocattr)(struct task_struct *p, char *name, void *value, size_t size); |
| 1291 | int (*setprocattr)(struct task_struct *p, char *name, void *value, size_t size); | 1301 | int (*setprocattr)(struct task_struct *p, char *name, void *value, size_t size); |
| 1302 | int (*secid_to_secctx)(u32 secid, char **secdata, u32 *seclen); | ||
| 1303 | void (*release_secctx)(char *secdata, u32 seclen); | ||
| 1292 | 1304 | ||
| 1293 | #ifdef CONFIG_SECURITY_NETWORK | 1305 | #ifdef CONFIG_SECURITY_NETWORK |
| 1294 | int (*unix_stream_connect) (struct socket * sock, | 1306 | int (*unix_stream_connect) (struct socket * sock, |
| @@ -1317,7 +1329,7 @@ struct security_operations { | |||
| 1317 | int (*socket_shutdown) (struct socket * sock, int how); | 1329 | int (*socket_shutdown) (struct socket * sock, int how); |
| 1318 | int (*socket_sock_rcv_skb) (struct sock * sk, struct sk_buff * skb); | 1330 | int (*socket_sock_rcv_skb) (struct sock * sk, struct sk_buff * skb); |
| 1319 | int (*socket_getpeersec_stream) (struct socket *sock, char __user *optval, int __user *optlen, unsigned len); | 1331 | int (*socket_getpeersec_stream) (struct socket *sock, char __user *optval, int __user *optlen, unsigned len); |
| 1320 | int (*socket_getpeersec_dgram) (struct sk_buff *skb, char **secdata, u32 *seclen); | 1332 | int (*socket_getpeersec_dgram) (struct socket *sock, struct sk_buff *skb, u32 *secid); |
| 1321 | int (*sk_alloc_security) (struct sock *sk, int family, gfp_t priority); | 1333 | int (*sk_alloc_security) (struct sock *sk, int family, gfp_t priority); |
| 1322 | void (*sk_free_security) (struct sock *sk); | 1334 | void (*sk_free_security) (struct sock *sk); |
| 1323 | unsigned int (*sk_getsid) (struct sock *sk, struct flowi *fl, u8 dir); | 1335 | unsigned int (*sk_getsid) (struct sock *sk, struct flowi *fl, u8 dir); |
| @@ -2059,6 +2071,16 @@ static inline int security_netlink_recv(struct sk_buff * skb, int cap) | |||
| 2059 | return security_ops->netlink_recv(skb, cap); | 2071 | return security_ops->netlink_recv(skb, cap); |
| 2060 | } | 2072 | } |
| 2061 | 2073 | ||
| 2074 | static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | ||
| 2075 | { | ||
| 2076 | return security_ops->secid_to_secctx(secid, secdata, seclen); | ||
| 2077 | } | ||
| 2078 | |||
| 2079 | static inline void security_release_secctx(char *secdata, u32 seclen) | ||
| 2080 | { | ||
| 2081 | return security_ops->release_secctx(secdata, seclen); | ||
| 2082 | } | ||
| 2083 | |||
| 2062 | /* prototypes */ | 2084 | /* prototypes */ |
| 2063 | extern int security_init (void); | 2085 | extern int security_init (void); |
| 2064 | extern int register_security (struct security_operations *ops); | 2086 | extern int register_security (struct security_operations *ops); |
| @@ -2725,6 +2747,14 @@ static inline void securityfs_remove(struct dentry *dentry) | |||
| 2725 | { | 2747 | { |
| 2726 | } | 2748 | } |
| 2727 | 2749 | ||
| 2750 | static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | ||
| 2751 | { | ||
| 2752 | return -EOPNOTSUPP; | ||
| 2753 | } | ||
| 2754 | |||
| 2755 | static inline void security_release_secctx(char *secdata, u32 seclen) | ||
| 2756 | { | ||
| 2757 | } | ||
| 2728 | #endif /* CONFIG_SECURITY */ | 2758 | #endif /* CONFIG_SECURITY */ |
| 2729 | 2759 | ||
| 2730 | #ifdef CONFIG_SECURITY_NETWORK | 2760 | #ifdef CONFIG_SECURITY_NETWORK |
| @@ -2840,10 +2870,9 @@ static inline int security_socket_getpeersec_stream(struct socket *sock, char __ | |||
| 2840 | return security_ops->socket_getpeersec_stream(sock, optval, optlen, len); | 2870 | return security_ops->socket_getpeersec_stream(sock, optval, optlen, len); |
| 2841 | } | 2871 | } |
| 2842 | 2872 | ||
| 2843 | static inline int security_socket_getpeersec_dgram(struct sk_buff *skb, char **secdata, | 2873 | static inline int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) |
| 2844 | u32 *seclen) | ||
| 2845 | { | 2874 | { |
| 2846 | return security_ops->socket_getpeersec_dgram(skb, secdata, seclen); | 2875 | return security_ops->socket_getpeersec_dgram(sock, skb, secid); |
| 2847 | } | 2876 | } |
| 2848 | 2877 | ||
| 2849 | static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority) | 2878 | static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority) |
| @@ -2968,8 +2997,7 @@ static inline int security_socket_getpeersec_stream(struct socket *sock, char __ | |||
| 2968 | return -ENOPROTOOPT; | 2997 | return -ENOPROTOOPT; |
| 2969 | } | 2998 | } |
| 2970 | 2999 | ||
| 2971 | static inline int security_socket_getpeersec_dgram(struct sk_buff *skb, char **secdata, | 3000 | static inline int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) |
| 2972 | u32 *seclen) | ||
| 2973 | { | 3001 | { |
| 2974 | return -ENOPROTOOPT; | 3002 | return -ENOPROTOOPT; |
| 2975 | } | 3003 | } |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 4307e764ef0a..19c96d498e20 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -604,12 +604,17 @@ static inline __u32 skb_queue_len(const struct sk_buff_head *list_) | |||
| 604 | return list_->qlen; | 604 | return list_->qlen; |
| 605 | } | 605 | } |
| 606 | 606 | ||
| 607 | extern struct lock_class_key skb_queue_lock_key; | 607 | /* |
| 608 | 608 | * This function creates a split out lock class for each invocation; | |
| 609 | * this is needed for now since a whole lot of users of the skb-queue | ||
| 610 | * infrastructure in drivers have different locking usage (in hardirq) | ||
| 611 | * than the networking core (in softirq only). In the long run either the | ||
| 612 | * network layer or drivers should need annotation to consolidate the | ||
| 613 | * main types of usage into 3 classes. | ||
| 614 | */ | ||
| 609 | static inline void skb_queue_head_init(struct sk_buff_head *list) | 615 | static inline void skb_queue_head_init(struct sk_buff_head *list) |
| 610 | { | 616 | { |
| 611 | spin_lock_init(&list->lock); | 617 | spin_lock_init(&list->lock); |
| 612 | lockdep_set_class(&list->lock, &skb_queue_lock_key); | ||
| 613 | list->prev = list->next = (struct sk_buff *)list; | 618 | list->prev = list->next = (struct sk_buff *)list; |
| 614 | list->qlen = 0; | 619 | list->qlen = 0; |
| 615 | } | 620 | } |
| @@ -1104,6 +1109,28 @@ static inline struct sk_buff *dev_alloc_skb(unsigned int length) | |||
| 1104 | return __dev_alloc_skb(length, GFP_ATOMIC); | 1109 | return __dev_alloc_skb(length, GFP_ATOMIC); |
| 1105 | } | 1110 | } |
| 1106 | 1111 | ||
| 1112 | extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev, | ||
| 1113 | unsigned int length, gfp_t gfp_mask); | ||
| 1114 | |||
| 1115 | /** | ||
| 1116 | * netdev_alloc_skb - allocate an skbuff for rx on a specific device | ||
| 1117 | * @dev: network device to receive on | ||
| 1118 | * @length: length to allocate | ||
| 1119 | * | ||
| 1120 | * Allocate a new &sk_buff and assign it a usage count of one. The | ||
| 1121 | * buffer has unspecified headroom built in. Users should allocate | ||
| 1122 | * the headroom they think they need without accounting for the | ||
| 1123 | * built in space. The built in space is used for optimisations. | ||
| 1124 | * | ||
| 1125 | * %NULL is returned if there is no free memory. Although this function | ||
| 1126 | * allocates memory it can be called from an interrupt. | ||
| 1127 | */ | ||
| 1128 | static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev, | ||
| 1129 | unsigned int length) | ||
| 1130 | { | ||
| 1131 | return __netdev_alloc_skb(dev, length, GFP_ATOMIC); | ||
| 1132 | } | ||
| 1133 | |||
| 1107 | /** | 1134 | /** |
| 1108 | * skb_cow - copy header of skb when it is required | 1135 | * skb_cow - copy header of skb when it is required |
| 1109 | * @skb: buffer to cow | 1136 | * @skb: buffer to cow |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index e8bbe8118de8..840e47a4ccc5 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -229,7 +229,7 @@ int xprt_reserve_xprt(struct rpc_task *task); | |||
| 229 | int xprt_reserve_xprt_cong(struct rpc_task *task); | 229 | int xprt_reserve_xprt_cong(struct rpc_task *task); |
| 230 | int xprt_prepare_transmit(struct rpc_task *task); | 230 | int xprt_prepare_transmit(struct rpc_task *task); |
| 231 | void xprt_transmit(struct rpc_task *task); | 231 | void xprt_transmit(struct rpc_task *task); |
| 232 | void xprt_abort_transmit(struct rpc_task *task); | 232 | void xprt_end_transmit(struct rpc_task *task); |
| 233 | int xprt_adjust_timeout(struct rpc_rqst *req); | 233 | int xprt_adjust_timeout(struct rpc_rqst *req); |
| 234 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); | 234 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
| 235 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | 235 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
diff --git a/include/linux/usb.h b/include/linux/usb.h index c944e8f06a4a..d2bd0c8e0154 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -103,8 +103,7 @@ enum usb_interface_condition { | |||
| 103 | * @condition: binding state of the interface: not bound, binding | 103 | * @condition: binding state of the interface: not bound, binding |
| 104 | * (in probe()), bound to a driver, or unbinding (in disconnect()) | 104 | * (in probe()), bound to a driver, or unbinding (in disconnect()) |
| 105 | * @dev: driver model's view of this device | 105 | * @dev: driver model's view of this device |
| 106 | * @usb_dev: if an interface is bound to the USB major, this will point | 106 | * @class_dev: driver model's class view of this device. |
| 107 | * to the sysfs representation for that device. | ||
| 108 | * | 107 | * |
| 109 | * USB device drivers attach to interfaces on a physical device. Each | 108 | * USB device drivers attach to interfaces on a physical device. Each |
| 110 | * interface encapsulates a single high level function, such as feeding | 109 | * interface encapsulates a single high level function, such as feeding |
| @@ -144,7 +143,7 @@ struct usb_interface { | |||
| 144 | * bound to */ | 143 | * bound to */ |
| 145 | enum usb_interface_condition condition; /* state of binding */ | 144 | enum usb_interface_condition condition; /* state of binding */ |
| 146 | struct device dev; /* interface specific device info */ | 145 | struct device dev; /* interface specific device info */ |
| 147 | struct device *usb_dev; /* pointer to the usb class's device, if any */ | 146 | struct class_device *class_dev; |
| 148 | }; | 147 | }; |
| 149 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) | 148 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) |
| 150 | #define interface_to_usbdev(intf) \ | 149 | #define interface_to_usbdev(intf) \ |
| @@ -361,7 +360,7 @@ struct usb_device { | |||
| 361 | char *serial; /* iSerialNumber string, if present */ | 360 | char *serial; /* iSerialNumber string, if present */ |
| 362 | 361 | ||
| 363 | struct list_head filelist; | 362 | struct list_head filelist; |
| 364 | struct device *usbfs_dev; | 363 | struct class_device *class_dev; |
| 365 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ | 364 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ |
| 366 | 365 | ||
| 367 | /* | 366 | /* |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index f38f43f20fae..e7fc5fed5b98 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
| @@ -44,7 +44,9 @@ | |||
| 44 | US_FLAG(NO_WP_DETECT, 0x00000200) \ | 44 | US_FLAG(NO_WP_DETECT, 0x00000200) \ |
| 45 | /* Don't check for write-protect */ \ | 45 | /* Don't check for write-protect */ \ |
| 46 | US_FLAG(MAX_SECTORS_64, 0x00000400) \ | 46 | US_FLAG(MAX_SECTORS_64, 0x00000400) \ |
| 47 | /* Sets max_sectors to 64 */ | 47 | /* Sets max_sectors to 64 */ \ |
| 48 | US_FLAG(IGNORE_DEVICE, 0x00000800) \ | ||
| 49 | /* Don't claim device */ | ||
| 48 | 50 | ||
| 49 | #define US_FLAG(name, value) US_FL_##name = value , | 51 | #define US_FLAG(name, value) US_FL_##name = value , |
| 50 | enum { US_DO_ALL_FLAGS }; | 52 | enum { US_DO_ALL_FLAGS }; |
diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 41bc7e9603cd..518c7a32175e 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h | |||
| @@ -12,10 +12,11 @@ | |||
| 12 | #ifndef __LINUX_VIDEODEV_H | 12 | #ifndef __LINUX_VIDEODEV_H |
| 13 | #define __LINUX_VIDEODEV_H | 13 | #define __LINUX_VIDEODEV_H |
| 14 | 14 | ||
| 15 | #define HAVE_V4L1 1 | ||
| 16 | |||
| 17 | #include <linux/videodev2.h> | 15 | #include <linux/videodev2.h> |
| 18 | 16 | ||
| 17 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
| 18 | #define HAVE_V4L1 1 | ||
| 19 | |||
| 19 | struct video_capability | 20 | struct video_capability |
| 20 | { | 21 | { |
| 21 | char name[32]; | 22 | char name[32]; |
| @@ -336,6 +337,8 @@ struct video_code | |||
| 336 | #define VID_HARDWARE_SN9C102 38 | 337 | #define VID_HARDWARE_SN9C102 38 |
| 337 | #define VID_HARDWARE_ARV 39 | 338 | #define VID_HARDWARE_ARV 39 |
| 338 | 339 | ||
| 340 | #endif /* CONFIG_VIDEO_V4L1_COMPAT */ | ||
| 341 | |||
| 339 | #endif /* __LINUX_VIDEODEV_H */ | 342 | #endif /* __LINUX_VIDEODEV_H */ |
| 340 | 343 | ||
| 341 | /* | 344 | /* |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index a62673dad76e..b7146956a929 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -716,7 +716,7 @@ struct v4l2_ext_control | |||
| 716 | __s64 value64; | 716 | __s64 value64; |
| 717 | void *reserved; | 717 | void *reserved; |
| 718 | }; | 718 | }; |
| 719 | }; | 719 | } __attribute__ ((packed)); |
| 720 | 720 | ||
| 721 | struct v4l2_ext_controls | 721 | struct v4l2_ext_controls |
| 722 | { | 722 | { |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 1ab806c47514..2d9b1b60798a 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
| @@ -41,23 +41,23 @@ DECLARE_PER_CPU(struct vm_event_state, vm_event_states); | |||
| 41 | 41 | ||
| 42 | static inline void __count_vm_event(enum vm_event_item item) | 42 | static inline void __count_vm_event(enum vm_event_item item) |
| 43 | { | 43 | { |
| 44 | __get_cpu_var(vm_event_states.event[item])++; | 44 | __get_cpu_var(vm_event_states).event[item]++; |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | static inline void count_vm_event(enum vm_event_item item) | 47 | static inline void count_vm_event(enum vm_event_item item) |
| 48 | { | 48 | { |
| 49 | get_cpu_var(vm_event_states.event[item])++; | 49 | get_cpu_var(vm_event_states).event[item]++; |
| 50 | put_cpu(); | 50 | put_cpu(); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | static inline void __count_vm_events(enum vm_event_item item, long delta) | 53 | static inline void __count_vm_events(enum vm_event_item item, long delta) |
| 54 | { | 54 | { |
| 55 | __get_cpu_var(vm_event_states.event[item]) += delta; | 55 | __get_cpu_var(vm_event_states).event[item] += delta; |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | static inline void count_vm_events(enum vm_event_item item, long delta) | 58 | static inline void count_vm_events(enum vm_event_item item, long delta) |
| 59 | { | 59 | { |
| 60 | get_cpu_var(vm_event_states.event[item]) += delta; | 60 | get_cpu_var(vm_event_states).event[item] += delta; |
| 61 | put_cpu(); | 61 | put_cpu(); |
| 62 | } | 62 | } |
| 63 | 63 | ||
