Merge /home/trondmy/scm/kernel/git/torvalds/linux-2.6
This commit is contained in:
commit
cff6bf9709
880 changed files with 28964 additions and 8978 deletions
|
|
@ -162,13 +162,13 @@ typedef struct acct acct_t;
|
|||
#ifdef __KERNEL__
|
||||
/*
|
||||
* Yet another set of HZ to *HZ helper functions.
|
||||
* See <linux/times.h> for the original.
|
||||
* See <linux/jiffies.h> for the original.
|
||||
*/
|
||||
|
||||
static inline u32 jiffies_to_AHZ(unsigned long x)
|
||||
{
|
||||
#if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0
|
||||
return x / (HZ / USER_HZ);
|
||||
return x / (HZ / AHZ);
|
||||
#else
|
||||
u64 tmp = (u64)x * TICK_NSEC;
|
||||
do_div(tmp, (NSEC_PER_SEC / AHZ));
|
||||
|
|
|
|||
|
|
@ -24,7 +24,12 @@ struct kioctx;
|
|||
#define KIOCB_SYNC_KEY (~0U)
|
||||
|
||||
/* ki_flags bits */
|
||||
#define KIF_LOCKED 0
|
||||
/*
|
||||
* This may be used for cancel/retry serialization in the future, but
|
||||
* for now it's unused and we probably don't want modules to even
|
||||
* think they can use it.
|
||||
*/
|
||||
/* #define KIF_LOCKED 0 */
|
||||
#define KIF_KICKED 1
|
||||
#define KIF_CANCELLED 2
|
||||
|
||||
|
|
@ -43,6 +48,40 @@ struct kioctx;
|
|||
#define kiocbIsKicked(iocb) test_bit(KIF_KICKED, &(iocb)->ki_flags)
|
||||
#define kiocbIsCancelled(iocb) test_bit(KIF_CANCELLED, &(iocb)->ki_flags)
|
||||
|
||||
/* is there a better place to document function pointer methods? */
|
||||
/**
|
||||
* ki_retry - iocb forward progress callback
|
||||
* @kiocb: The kiocb struct to advance by performing an operation.
|
||||
*
|
||||
* This callback is called when the AIO core wants a given AIO operation
|
||||
* to make forward progress. The kiocb argument describes the operation
|
||||
* that is to be performed. As the operation proceeds, perhaps partially,
|
||||
* ki_retry is expected to update the kiocb with progress made. Typically
|
||||
* ki_retry is set in the AIO core and it itself calls file_operations
|
||||
* helpers.
|
||||
*
|
||||
* ki_retry's return value determines when the AIO operation is completed
|
||||
* and an event is generated in the AIO event ring. Except the special
|
||||
* return values described below, the value that is returned from ki_retry
|
||||
* is transferred directly into the completion ring as the operation's
|
||||
* resulting status. Once this has happened ki_retry *MUST NOT* reference
|
||||
* the kiocb pointer again.
|
||||
*
|
||||
* If ki_retry returns -EIOCBQUEUED it has made a promise that aio_complete()
|
||||
* will be called on the kiocb pointer in the future. The AIO core will
|
||||
* not ask the method again -- ki_retry must ensure forward progress.
|
||||
* aio_complete() must be called once and only once in the future, multiple
|
||||
* calls may result in undefined behaviour.
|
||||
*
|
||||
* If ki_retry returns -EIOCBRETRY it has made a promise that kick_iocb()
|
||||
* will be called on the kiocb pointer in the future. This may happen
|
||||
* through generic helpers that associate kiocb->ki_wait with a wait
|
||||
* queue head that ki_retry uses via current->io_wait. It can also happen
|
||||
* with custom tracking and manual calls to kick_iocb(), though that is
|
||||
* discouraged. In either case, kick_iocb() must be called once and only
|
||||
* once. ki_retry must ensure forward progress, the AIO core will wait
|
||||
* indefinitely for kick_iocb() to be called.
|
||||
*/
|
||||
struct kiocb {
|
||||
struct list_head ki_run_list;
|
||||
long ki_flags;
|
||||
|
|
|
|||
|
|
@ -76,6 +76,13 @@ struct atm_dev_stats {
|
|||
/* set interface ESI */
|
||||
#define ATM_SETESIF _IOW('a',ATMIOC_ITF+13,struct atmif_sioc)
|
||||
/* force interface ESI */
|
||||
#define ATM_ADDLECSADDR _IOW('a', ATMIOC_ITF+14, struct atmif_sioc)
|
||||
/* register a LECS address */
|
||||
#define ATM_DELLECSADDR _IOW('a', ATMIOC_ITF+15, struct atmif_sioc)
|
||||
/* unregister a LECS address */
|
||||
#define ATM_GETLECSADDR _IOW('a', ATMIOC_ITF+16, struct atmif_sioc)
|
||||
/* retrieve LECS address(es) */
|
||||
|
||||
#define ATM_GETSTAT _IOW('a',ATMIOC_SARCOM+0,struct atmif_sioc)
|
||||
/* get AAL layer statistics */
|
||||
#define ATM_GETSTATZ _IOW('a',ATMIOC_SARCOM+1,struct atmif_sioc)
|
||||
|
|
@ -328,6 +335,8 @@ struct atm_dev_addr {
|
|||
struct list_head entry; /* next address */
|
||||
};
|
||||
|
||||
enum atm_addr_type_t { ATM_ADDR_LOCAL, ATM_ADDR_LECS };
|
||||
|
||||
struct atm_dev {
|
||||
const struct atmdev_ops *ops; /* device operations; NULL if unused */
|
||||
const struct atmphy_ops *phy; /* PHY operations, may be undefined */
|
||||
|
|
@ -338,6 +347,7 @@ struct atm_dev {
|
|||
void *phy_data; /* private PHY date */
|
||||
unsigned long flags; /* device flags (ATM_DF_*) */
|
||||
struct list_head local; /* local ATM addresses */
|
||||
struct list_head lecs; /* LECS ATM addresses learned via ILMI */
|
||||
unsigned char esi[ESI_LEN]; /* ESI ("MAC" addr) */
|
||||
struct atm_cirange ci_range; /* VPI/VCI range */
|
||||
struct k_atm_dev_stats stats; /* statistics */
|
||||
|
|
@ -457,7 +467,7 @@ static inline void atm_dev_put(struct atm_dev *dev)
|
|||
|
||||
int atm_charge(struct atm_vcc *vcc,int truesize);
|
||||
struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
|
||||
int gfp_flags);
|
||||
gfp_t gfp_flags);
|
||||
int atm_pcr_goal(struct atm_trafprm *tp);
|
||||
|
||||
void vcc_release_async(struct atm_vcc *vcc, int reply);
|
||||
|
|
|
|||
|
|
@ -20,19 +20,19 @@
|
|||
|
||||
/* BFS inode layout on disk */
|
||||
struct bfs_inode {
|
||||
__u16 i_ino;
|
||||
__le16 i_ino;
|
||||
__u16 i_unused;
|
||||
__u32 i_sblock;
|
||||
__u32 i_eblock;
|
||||
__u32 i_eoffset;
|
||||
__u32 i_vtype;
|
||||
__u32 i_mode;
|
||||
__s32 i_uid;
|
||||
__s32 i_gid;
|
||||
__u32 i_nlink;
|
||||
__u32 i_atime;
|
||||
__u32 i_mtime;
|
||||
__u32 i_ctime;
|
||||
__le32 i_sblock;
|
||||
__le32 i_eblock;
|
||||
__le32 i_eoffset;
|
||||
__le32 i_vtype;
|
||||
__le32 i_mode;
|
||||
__le32 i_uid;
|
||||
__le32 i_gid;
|
||||
__le32 i_nlink;
|
||||
__le32 i_atime;
|
||||
__le32 i_mtime;
|
||||
__le32 i_ctime;
|
||||
__u32 i_padding[4];
|
||||
};
|
||||
|
||||
|
|
@ -41,17 +41,17 @@ struct bfs_inode {
|
|||
#define BFS_DIRS_PER_BLOCK 32
|
||||
|
||||
struct bfs_dirent {
|
||||
__u16 ino;
|
||||
__le16 ino;
|
||||
char name[BFS_NAMELEN];
|
||||
};
|
||||
|
||||
/* BFS superblock layout on disk */
|
||||
struct bfs_super_block {
|
||||
__u32 s_magic;
|
||||
__u32 s_start;
|
||||
__u32 s_end;
|
||||
__s32 s_from;
|
||||
__s32 s_to;
|
||||
__le32 s_magic;
|
||||
__le32 s_start;
|
||||
__le32 s_end;
|
||||
__le32 s_from;
|
||||
__le32 s_to;
|
||||
__s32 s_bfrom;
|
||||
__s32 s_bto;
|
||||
char s_fsname[6];
|
||||
|
|
@ -66,15 +66,15 @@ struct bfs_super_block {
|
|||
#define BFS_INO2OFF(ino) \
|
||||
((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE)
|
||||
#define BFS_NZFILESIZE(ip) \
|
||||
((cpu_to_le32((ip)->i_eoffset) + 1) - cpu_to_le32((ip)->i_sblock) * BFS_BSIZE)
|
||||
((le32_to_cpu((ip)->i_eoffset) + 1) - le32_to_cpu((ip)->i_sblock) * BFS_BSIZE)
|
||||
|
||||
#define BFS_FILESIZE(ip) \
|
||||
((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip))
|
||||
|
||||
#define BFS_FILEBLOCKS(ip) \
|
||||
((ip)->i_sblock == 0 ? 0 : (cpu_to_le32((ip)->i_eblock) + 1) - cpu_to_le32((ip)->i_sblock))
|
||||
((ip)->i_sblock == 0 ? 0 : (le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu((ip)->i_sblock))
|
||||
#define BFS_UNCLEAN(bfs_sb, sb) \
|
||||
((cpu_to_le32(bfs_sb->s_from) != -1) && (cpu_to_le32(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY))
|
||||
((le32_to_cpu(bfs_sb->s_from) != -1) && (le32_to_cpu(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY))
|
||||
|
||||
|
||||
#endif /* _LINUX_BFS_FS_H */
|
||||
|
|
|
|||
|
|
@ -276,8 +276,8 @@ extern void bio_pair_release(struct bio_pair *dbio);
|
|||
extern struct bio_set *bioset_create(int, int, int);
|
||||
extern void bioset_free(struct bio_set *);
|
||||
|
||||
extern struct bio *bio_alloc(unsigned int __nocast, int);
|
||||
extern struct bio *bio_alloc_bioset(unsigned int __nocast, int, struct bio_set *);
|
||||
extern struct bio *bio_alloc(gfp_t, int);
|
||||
extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *);
|
||||
extern void bio_put(struct bio *);
|
||||
extern void bio_free(struct bio *, struct bio_set *);
|
||||
|
||||
|
|
@ -287,7 +287,7 @@ extern int bio_phys_segments(struct request_queue *, struct bio *);
|
|||
extern int bio_hw_segments(struct request_queue *, struct bio *);
|
||||
|
||||
extern void __bio_clone(struct bio *, struct bio *);
|
||||
extern struct bio *bio_clone(struct bio *, unsigned int __nocast);
|
||||
extern struct bio *bio_clone(struct bio *, gfp_t);
|
||||
|
||||
extern void bio_init(struct bio *);
|
||||
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ void __brelse(struct buffer_head *);
|
|||
void __bforget(struct buffer_head *);
|
||||
void __breadahead(struct block_device *, sector_t block, int size);
|
||||
struct buffer_head *__bread(struct block_device *, sector_t block, int size);
|
||||
struct buffer_head *alloc_buffer_head(unsigned int __nocast gfp_flags);
|
||||
struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
|
||||
void free_buffer_head(struct buffer_head * bh);
|
||||
void FASTCALL(unlock_buffer(struct buffer_head *bh));
|
||||
void FASTCALL(__lock_buffer(struct buffer_head *bh));
|
||||
|
|
|
|||
|
|
@ -104,12 +104,19 @@ struct cn_queue_dev {
|
|||
struct sock *nls;
|
||||
};
|
||||
|
||||
struct cn_callback {
|
||||
struct cn_callback_id {
|
||||
unsigned char name[CN_CBQ_NAMELEN];
|
||||
|
||||
struct cb_id id;
|
||||
};
|
||||
|
||||
struct cn_callback_data {
|
||||
void (*destruct_data) (void *);
|
||||
void *ddata;
|
||||
|
||||
void *callback_priv;
|
||||
void (*callback) (void *);
|
||||
void *priv;
|
||||
|
||||
void *free;
|
||||
};
|
||||
|
||||
struct cn_callback_entry {
|
||||
|
|
@ -118,8 +125,8 @@ struct cn_callback_entry {
|
|||
struct work_struct work;
|
||||
struct cn_queue_dev *pdev;
|
||||
|
||||
void (*destruct_data) (void *);
|
||||
void *ddata;
|
||||
struct cn_callback_id id;
|
||||
struct cn_callback_data data;
|
||||
|
||||
int seq, group;
|
||||
struct sock *nls;
|
||||
|
|
@ -142,9 +149,9 @@ struct cn_dev {
|
|||
|
||||
int cn_add_callback(struct cb_id *, char *, void (*callback) (void *));
|
||||
void cn_del_callback(struct cb_id *);
|
||||
int cn_netlink_send(struct cn_msg *, u32, int);
|
||||
int cn_netlink_send(struct cn_msg *, u32, gfp_t);
|
||||
|
||||
int cn_queue_add_callback(struct cn_queue_dev *dev, struct cn_callback *cb);
|
||||
int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *));
|
||||
void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id);
|
||||
|
||||
struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *);
|
||||
|
|
@ -152,6 +159,8 @@ void cn_queue_free_dev(struct cn_queue_dev *dev);
|
|||
|
||||
int cn_cb_equal(struct cb_id *, struct cb_id *);
|
||||
|
||||
void cn_queue_wrapper(void *data);
|
||||
|
||||
extern int cn_already_initialized;
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
|||
|
|
@ -392,4 +392,14 @@ extern cpumask_t cpu_present_map;
|
|||
#define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map)
|
||||
#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
|
||||
|
||||
/* Find the highest possible smp_processor_id() */
|
||||
#define highest_possible_processor_id() \
|
||||
({ \
|
||||
unsigned int cpu, highest = 0; \
|
||||
for_each_cpu_mask(cpu, cpu_possible_map) \
|
||||
highest = cpu; \
|
||||
highest; \
|
||||
})
|
||||
|
||||
|
||||
#endif /* __LINUX_CPUMASK_H */
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ void cpuset_init_current_mems_allowed(void);
|
|||
void cpuset_update_current_mems_allowed(void);
|
||||
void cpuset_restrict_to_mems_allowed(unsigned long *nodes);
|
||||
int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl);
|
||||
extern int cpuset_zone_allowed(struct zone *z, unsigned int __nocast gfp_mask);
|
||||
extern int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask);
|
||||
extern int cpuset_excl_nodes_overlap(const struct task_struct *p);
|
||||
extern struct file_operations proc_cpuset_operations;
|
||||
extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer);
|
||||
|
|
@ -49,8 +49,7 @@ static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static inline int cpuset_zone_allowed(struct zone *z,
|
||||
unsigned int __nocast gfp_mask)
|
||||
static inline int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev,
|
|||
|
||||
void dma_pool_destroy(struct dma_pool *pool);
|
||||
|
||||
void *dma_pool_alloc(struct dma_pool *pool, unsigned int __nocast mem_flags,
|
||||
void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags,
|
||||
dma_addr_t *handle);
|
||||
|
||||
void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr);
|
||||
|
|
|
|||
|
|
@ -85,9 +85,9 @@ static inline void arch_free_page(struct page *page, int order) { }
|
|||
#endif
|
||||
|
||||
extern struct page *
|
||||
FASTCALL(__alloc_pages(unsigned int, unsigned int, struct zonelist *));
|
||||
FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *));
|
||||
|
||||
static inline struct page *alloc_pages_node(int nid, unsigned int __nocast gfp_mask,
|
||||
static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
|
||||
unsigned int order)
|
||||
{
|
||||
if (unlikely(order >= MAX_ORDER))
|
||||
|
|
@ -98,17 +98,17 @@ static inline struct page *alloc_pages_node(int nid, unsigned int __nocast gfp_m
|
|||
}
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
extern struct page *alloc_pages_current(unsigned int __nocast gfp_mask, unsigned order);
|
||||
extern struct page *alloc_pages_current(gfp_t gfp_mask, unsigned order);
|
||||
|
||||
static inline struct page *
|
||||
alloc_pages(unsigned int __nocast gfp_mask, unsigned int order)
|
||||
alloc_pages(gfp_t gfp_mask, unsigned int order)
|
||||
{
|
||||
if (unlikely(order >= MAX_ORDER))
|
||||
return NULL;
|
||||
|
||||
return alloc_pages_current(gfp_mask, order);
|
||||
}
|
||||
extern struct page *alloc_page_vma(unsigned __nocast gfp_mask,
|
||||
extern struct page *alloc_page_vma(gfp_t gfp_mask,
|
||||
struct vm_area_struct *vma, unsigned long addr);
|
||||
#else
|
||||
#define alloc_pages(gfp_mask, order) \
|
||||
|
|
@ -117,8 +117,8 @@ extern struct page *alloc_page_vma(unsigned __nocast gfp_mask,
|
|||
#endif
|
||||
#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
|
||||
|
||||
extern unsigned long FASTCALL(__get_free_pages(unsigned int __nocast gfp_mask, unsigned int order));
|
||||
extern unsigned long FASTCALL(get_zeroed_page(unsigned int __nocast gfp_mask));
|
||||
extern unsigned long FASTCALL(__get_free_pages(gfp_t gfp_mask, unsigned int order));
|
||||
extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask));
|
||||
|
||||
#define __get_free_page(gfp_mask) \
|
||||
__get_free_pages((gfp_mask),0)
|
||||
|
|
|
|||
|
|
@ -111,7 +111,9 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb)
|
|||
return (struct ethhdr *)skb->mac.raw;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
extern struct ctl_table ether_table[];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_IF_ETHER_H */
|
||||
|
|
|
|||
|
|
@ -142,13 +142,21 @@ static __inline__ int bad_mask(u32 mask, u32 addr)
|
|||
|
||||
#define endfor_ifa(in_dev) }
|
||||
|
||||
static inline struct in_device *__in_dev_get_rcu(const struct net_device *dev)
|
||||
{
|
||||
struct in_device *in_dev = dev->ip_ptr;
|
||||
if (in_dev)
|
||||
in_dev = rcu_dereference(in_dev);
|
||||
return in_dev;
|
||||
}
|
||||
|
||||
static __inline__ struct in_device *
|
||||
in_dev_get(const struct net_device *dev)
|
||||
{
|
||||
struct in_device *in_dev;
|
||||
|
||||
rcu_read_lock();
|
||||
in_dev = dev->ip_ptr;
|
||||
in_dev = __in_dev_get_rcu(dev);
|
||||
if (in_dev)
|
||||
atomic_inc(&in_dev->refcnt);
|
||||
rcu_read_unlock();
|
||||
|
|
@ -156,7 +164,7 @@ in_dev_get(const struct net_device *dev)
|
|||
}
|
||||
|
||||
static __inline__ struct in_device *
|
||||
__in_dev_get(const struct net_device *dev)
|
||||
__in_dev_get_rtnl(const struct net_device *dev)
|
||||
{
|
||||
return (struct in_device*)dev->ip_ptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -372,8 +372,9 @@ static inline struct raw6_sock *raw6_sk(const struct sock *sk)
|
|||
#define inet_v6_ipv6only(__sk) 0
|
||||
#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */
|
||||
|
||||
#define INET6_MATCH(__sk, __saddr, __daddr, __ports, __dif) \
|
||||
(((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \
|
||||
#define INET6_MATCH(__sk, __hash, __saddr, __daddr, __ports, __dif)\
|
||||
(((__sk)->sk_hash == (__hash)) && \
|
||||
((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \
|
||||
((__sk)->sk_family == AF_INET6) && \
|
||||
ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \
|
||||
ipv6_addr_equal(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \
|
||||
|
|
|
|||
|
|
@ -935,7 +935,7 @@ void journal_put_journal_head(struct journal_head *jh);
|
|||
*/
|
||||
extern kmem_cache_t *jbd_handle_cache;
|
||||
|
||||
static inline handle_t *jbd_alloc_handle(unsigned int __nocast gfp_flags)
|
||||
static inline handle_t *jbd_alloc_handle(gfp_t gfp_flags)
|
||||
{
|
||||
return kmem_cache_alloc(jbd_handle_cache, gfp_flags);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,92 +38,21 @@ struct keyring_list {
|
|||
struct key *keys[0];
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* check to see whether permission is granted to use a key in the desired way
|
||||
*/
|
||||
static inline int key_permission(const struct key *key, key_perm_t perm)
|
||||
extern int key_task_permission(const key_ref_t key_ref,
|
||||
struct task_struct *context,
|
||||
key_perm_t perm);
|
||||
|
||||
static inline int key_permission(const key_ref_t key_ref, key_perm_t perm)
|
||||
{
|
||||
key_perm_t kperm;
|
||||
|
||||
if (key->uid == current->fsuid)
|
||||
kperm = key->perm >> 16;
|
||||
else if (key->gid != -1 &&
|
||||
key->perm & KEY_GRP_ALL &&
|
||||
in_group_p(key->gid)
|
||||
)
|
||||
kperm = key->perm >> 8;
|
||||
else
|
||||
kperm = key->perm;
|
||||
|
||||
kperm = kperm & perm & KEY_ALL;
|
||||
|
||||
return kperm == perm;
|
||||
return key_task_permission(key_ref, current, perm);
|
||||
}
|
||||
|
||||
/*
|
||||
* check to see whether permission is granted to use a key in at least one of
|
||||
* the desired ways
|
||||
*/
|
||||
static inline int key_any_permission(const struct key *key, key_perm_t perm)
|
||||
{
|
||||
key_perm_t kperm;
|
||||
|
||||
if (key->uid == current->fsuid)
|
||||
kperm = key->perm >> 16;
|
||||
else if (key->gid != -1 &&
|
||||
key->perm & KEY_GRP_ALL &&
|
||||
in_group_p(key->gid)
|
||||
)
|
||||
kperm = key->perm >> 8;
|
||||
else
|
||||
kperm = key->perm;
|
||||
|
||||
kperm = kperm & perm & KEY_ALL;
|
||||
|
||||
return kperm != 0;
|
||||
}
|
||||
|
||||
static inline int key_task_groups_search(struct task_struct *tsk, gid_t gid)
|
||||
{
|
||||
int ret;
|
||||
|
||||
task_lock(tsk);
|
||||
ret = groups_search(tsk->group_info, gid);
|
||||
task_unlock(tsk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int key_task_permission(const struct key *key,
|
||||
struct task_struct *context,
|
||||
key_perm_t perm)
|
||||
{
|
||||
key_perm_t kperm;
|
||||
|
||||
if (key->uid == context->fsuid) {
|
||||
kperm = key->perm >> 16;
|
||||
}
|
||||
else if (key->gid != -1 &&
|
||||
key->perm & KEY_GRP_ALL && (
|
||||
key->gid == context->fsgid ||
|
||||
key_task_groups_search(context, key->gid)
|
||||
)
|
||||
) {
|
||||
kperm = key->perm >> 8;
|
||||
}
|
||||
else {
|
||||
kperm = key->perm;
|
||||
}
|
||||
|
||||
kperm = kperm & perm & KEY_ALL;
|
||||
|
||||
return kperm == perm;
|
||||
|
||||
}
|
||||
|
||||
extern struct key *lookup_user_key(struct task_struct *context,
|
||||
key_serial_t id, int create, int partial,
|
||||
key_perm_t perm);
|
||||
extern key_ref_t lookup_user_key(struct task_struct *context,
|
||||
key_serial_t id, int create, int partial,
|
||||
key_perm_t perm);
|
||||
|
||||
extern long join_session_keyring(const char *name);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,11 +35,18 @@ struct key;
|
|||
|
||||
#undef KEY_DEBUGGING
|
||||
|
||||
#define KEY_USR_VIEW 0x00010000 /* user can view a key's attributes */
|
||||
#define KEY_USR_READ 0x00020000 /* user can read key payload / view keyring */
|
||||
#define KEY_USR_WRITE 0x00040000 /* user can update key payload / add link to keyring */
|
||||
#define KEY_USR_SEARCH 0x00080000 /* user can find a key in search / search a keyring */
|
||||
#define KEY_USR_LINK 0x00100000 /* user can create a link to a key/keyring */
|
||||
#define KEY_POS_VIEW 0x01000000 /* possessor can view a key's attributes */
|
||||
#define KEY_POS_READ 0x02000000 /* possessor can read key payload / view keyring */
|
||||
#define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */
|
||||
#define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */
|
||||
#define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */
|
||||
#define KEY_POS_ALL 0x1f000000
|
||||
|
||||
#define KEY_USR_VIEW 0x00010000 /* user permissions... */
|
||||
#define KEY_USR_READ 0x00020000
|
||||
#define KEY_USR_WRITE 0x00040000
|
||||
#define KEY_USR_SEARCH 0x00080000
|
||||
#define KEY_USR_LINK 0x00100000
|
||||
#define KEY_USR_ALL 0x001f0000
|
||||
|
||||
#define KEY_GRP_VIEW 0x00000100 /* group permissions... */
|
||||
|
|
@ -65,6 +72,38 @@ struct key_owner;
|
|||
struct keyring_list;
|
||||
struct keyring_name;
|
||||
|
||||
/*****************************************************************************/
|
||||
/*
|
||||
* key reference with possession attribute handling
|
||||
*
|
||||
* NOTE! key_ref_t is a typedef'd pointer to a type that is not actually
|
||||
* defined. This is because we abuse the bottom bit of the reference to carry a
|
||||
* flag to indicate whether the calling process possesses that key in one of
|
||||
* its keyrings.
|
||||
*
|
||||
* the key_ref_t has been made a separate type so that the compiler can reject
|
||||
* attempts to dereference it without proper conversion.
|
||||
*
|
||||
* the three functions are used to assemble and disassemble references
|
||||
*/
|
||||
typedef struct __key_reference_with_attributes *key_ref_t;
|
||||
|
||||
static inline key_ref_t make_key_ref(const struct key *key,
|
||||
unsigned long possession)
|
||||
{
|
||||
return (key_ref_t) ((unsigned long) key | possession);
|
||||
}
|
||||
|
||||
static inline struct key *key_ref_to_ptr(const key_ref_t key_ref)
|
||||
{
|
||||
return (struct key *) ((unsigned long) key_ref & ~1UL);
|
||||
}
|
||||
|
||||
static inline unsigned long is_key_possessed(const key_ref_t key_ref)
|
||||
{
|
||||
return (unsigned long) key_ref & 1UL;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*
|
||||
* authentication token / access credential / keyring
|
||||
|
|
@ -215,20 +254,25 @@ static inline struct key *key_get(struct key *key)
|
|||
return key;
|
||||
}
|
||||
|
||||
static inline void key_ref_put(key_ref_t key_ref)
|
||||
{
|
||||
key_put(key_ref_to_ptr(key_ref));
|
||||
}
|
||||
|
||||
extern struct key *request_key(struct key_type *type,
|
||||
const char *description,
|
||||
const char *callout_info);
|
||||
|
||||
extern int key_validate(struct key *key);
|
||||
|
||||
extern struct key *key_create_or_update(struct key *keyring,
|
||||
const char *type,
|
||||
const char *description,
|
||||
const void *payload,
|
||||
size_t plen,
|
||||
int not_in_quota);
|
||||
extern key_ref_t key_create_or_update(key_ref_t keyring,
|
||||
const char *type,
|
||||
const char *description,
|
||||
const void *payload,
|
||||
size_t plen,
|
||||
int not_in_quota);
|
||||
|
||||
extern int key_update(struct key *key,
|
||||
extern int key_update(key_ref_t key,
|
||||
const void *payload,
|
||||
size_t plen);
|
||||
|
||||
|
|
@ -243,9 +287,9 @@ extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid,
|
|||
|
||||
extern int keyring_clear(struct key *keyring);
|
||||
|
||||
extern struct key *keyring_search(struct key *keyring,
|
||||
struct key_type *type,
|
||||
const char *description);
|
||||
extern key_ref_t keyring_search(key_ref_t keyring,
|
||||
struct key_type *type,
|
||||
const char *description);
|
||||
|
||||
extern int keyring_add_key(struct key *keyring,
|
||||
struct key *key);
|
||||
|
|
@ -285,6 +329,10 @@ extern void key_init(void);
|
|||
#define key_serial(k) 0
|
||||
#define key_get(k) ({ NULL; })
|
||||
#define key_put(k) do { } while(0)
|
||||
#define key_ref_put(k) do { } while(0)
|
||||
#define make_key_ref(k) ({ NULL; })
|
||||
#define key_ref_to_ptr(k) ({ NULL; })
|
||||
#define is_key_possessed(k) 0
|
||||
#define alloc_uid_keyring(u) 0
|
||||
#define switch_uid_keyring(u) do { } while(0)
|
||||
#define __install_session_keyring(t, k) ({ NULL; })
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ struct kfifo {
|
|||
};
|
||||
|
||||
extern struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size,
|
||||
unsigned int __nocast gfp_mask, spinlock_t *lock);
|
||||
extern struct kfifo *kfifo_alloc(unsigned int size, unsigned int __nocast gfp_mask,
|
||||
gfp_t gfp_mask, spinlock_t *lock);
|
||||
extern struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask,
|
||||
spinlock_t *lock);
|
||||
extern void kfifo_free(struct kfifo *fifo);
|
||||
extern unsigned int __kfifo_put(struct kfifo *fifo,
|
||||
|
|
|
|||
|
|
@ -393,6 +393,7 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i
|
|||
extern void ata_pci_remove_one (struct pci_dev *pdev);
|
||||
#endif /* CONFIG_PCI */
|
||||
extern int ata_device_add(struct ata_probe_ent *ent);
|
||||
extern void ata_host_set_remove(struct ata_host_set *host_set);
|
||||
extern int ata_scsi_detect(Scsi_Host_Template *sht);
|
||||
extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
|
||||
extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
|
||||
|
|
|
|||
|
|
@ -442,12 +442,14 @@ static inline void list_splice_init(struct list_head *list,
|
|||
* as long as the traversal is guarded by rcu_read_lock().
|
||||
*/
|
||||
#define list_for_each_rcu(pos, head) \
|
||||
for (pos = (head)->next; prefetch(pos->next), pos != (head); \
|
||||
pos = rcu_dereference(pos->next))
|
||||
for (pos = (head)->next; \
|
||||
prefetch(rcu_dereference(pos)->next), pos != (head); \
|
||||
pos = pos->next)
|
||||
|
||||
#define __list_for_each_rcu(pos, head) \
|
||||
for (pos = (head)->next; pos != (head); \
|
||||
pos = rcu_dereference(pos->next))
|
||||
for (pos = (head)->next; \
|
||||
rcu_dereference(pos) != (head); \
|
||||
pos = pos->next)
|
||||
|
||||
/**
|
||||
* list_for_each_safe_rcu - iterate over an rcu-protected list safe
|
||||
|
|
@ -461,8 +463,9 @@ static inline void list_splice_init(struct list_head *list,
|
|||
* as long as the traversal is guarded by rcu_read_lock().
|
||||
*/
|
||||
#define list_for_each_safe_rcu(pos, n, head) \
|
||||
for (pos = (head)->next, n = pos->next; pos != (head); \
|
||||
pos = rcu_dereference(n), n = pos->next)
|
||||
for (pos = (head)->next; \
|
||||
n = rcu_dereference(pos)->next, pos != (head); \
|
||||
pos = n)
|
||||
|
||||
/**
|
||||
* list_for_each_entry_rcu - iterate over rcu list of given type
|
||||
|
|
@ -474,11 +477,11 @@ static inline void list_splice_init(struct list_head *list,
|
|||
* the _rcu list-mutation primitives such as list_add_rcu()
|
||||
* as long as the traversal is guarded by rcu_read_lock().
|
||||
*/
|
||||
#define list_for_each_entry_rcu(pos, head, member) \
|
||||
for (pos = list_entry((head)->next, typeof(*pos), member); \
|
||||
prefetch(pos->member.next), &pos->member != (head); \
|
||||
pos = rcu_dereference(list_entry(pos->member.next, \
|
||||
typeof(*pos), member)))
|
||||
#define list_for_each_entry_rcu(pos, head, member) \
|
||||
for (pos = list_entry((head)->next, typeof(*pos), member); \
|
||||
prefetch(rcu_dereference(pos)->member.next), \
|
||||
&pos->member != (head); \
|
||||
pos = list_entry(pos->member.next, typeof(*pos), member))
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -492,8 +495,9 @@ static inline void list_splice_init(struct list_head *list,
|
|||
* as long as the traversal is guarded by rcu_read_lock().
|
||||
*/
|
||||
#define list_for_each_continue_rcu(pos, head) \
|
||||
for ((pos) = (pos)->next; prefetch((pos)->next), (pos) != (head); \
|
||||
(pos) = rcu_dereference((pos)->next))
|
||||
for ((pos) = (pos)->next; \
|
||||
prefetch(rcu_dereference((pos))->next), (pos) != (head); \
|
||||
(pos) = (pos)->next)
|
||||
|
||||
/*
|
||||
* Double linked lists with a single pointer list head.
|
||||
|
|
@ -696,8 +700,9 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev,
|
|||
pos = n)
|
||||
|
||||
#define hlist_for_each_rcu(pos, head) \
|
||||
for ((pos) = (head)->first; pos && ({ prefetch((pos)->next); 1; }); \
|
||||
(pos) = rcu_dereference((pos)->next))
|
||||
for ((pos) = (head)->first; \
|
||||
rcu_dereference((pos)) && ({ prefetch((pos)->next); 1; }); \
|
||||
(pos) = (pos)->next)
|
||||
|
||||
/**
|
||||
* hlist_for_each_entry - iterate over list of given type
|
||||
|
|
@ -762,9 +767,9 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev,
|
|||
*/
|
||||
#define hlist_for_each_entry_rcu(tpos, pos, head, member) \
|
||||
for (pos = (head)->first; \
|
||||
pos && ({ prefetch(pos->next); 1;}) && \
|
||||
rcu_dereference(pos) && ({ prefetch(pos->next); 1;}) && \
|
||||
({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
|
||||
pos = rcu_dereference(pos->next))
|
||||
pos = pos->next)
|
||||
|
||||
#else
|
||||
#warning "don't include kernel headers in userspace"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <linux/wait.h>
|
||||
|
||||
typedef void * (mempool_alloc_t)(unsigned int __nocast gfp_mask, void *pool_data);
|
||||
typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data);
|
||||
typedef void (mempool_free_t)(void *element, void *pool_data);
|
||||
|
||||
typedef struct mempool_s {
|
||||
|
|
@ -26,17 +26,16 @@ extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
|
|||
extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
|
||||
mempool_free_t *free_fn, void *pool_data, int nid);
|
||||
|
||||
extern int mempool_resize(mempool_t *pool, int new_min_nr,
|
||||
unsigned int __nocast gfp_mask);
|
||||
extern int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask);
|
||||
extern void mempool_destroy(mempool_t *pool);
|
||||
extern void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask);
|
||||
extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask);
|
||||
extern void mempool_free(void *element, mempool_t *pool);
|
||||
|
||||
/*
|
||||
* A mempool_alloc_t and mempool_free_t that get the memory from
|
||||
* a slab that is passed in through pool_data.
|
||||
*/
|
||||
void *mempool_alloc_slab(unsigned int __nocast gfp_mask, void *pool_data);
|
||||
void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data);
|
||||
void mempool_free_slab(void *element, void *pool_data);
|
||||
|
||||
#endif /* _LINUX_MEMPOOL_H */
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ struct of_device_id
|
|||
char name[32];
|
||||
char type[32];
|
||||
char compatible[128];
|
||||
#if __KERNEL__
|
||||
#ifdef __KERNEL__
|
||||
void *data;
|
||||
#else
|
||||
kernel_ulong_t data;
|
||||
|
|
@ -209,10 +209,11 @@ struct pcmcia_device_id {
|
|||
/* for real multi-function devices */
|
||||
__u8 function;
|
||||
|
||||
/* for pseude multi-function devices */
|
||||
/* for pseudo multi-function devices */
|
||||
__u8 device_no;
|
||||
|
||||
__u32 prod_id_hash[4];
|
||||
__u32 prod_id_hash[4]
|
||||
__attribute__((aligned(sizeof(__u32))));
|
||||
|
||||
/* not matched against in kernelspace*/
|
||||
#ifdef __KERNEL__
|
||||
|
|
|
|||
|
|
@ -265,6 +265,8 @@ struct net_device
|
|||
* the interface.
|
||||
*/
|
||||
char name[IFNAMSIZ];
|
||||
/* device name hash chain */
|
||||
struct hlist_node name_hlist;
|
||||
|
||||
/*
|
||||
* I/O specific fields
|
||||
|
|
@ -292,6 +294,21 @@ struct net_device
|
|||
|
||||
/* ------- Fields preinitialized in Space.c finish here ------- */
|
||||
|
||||
/* Net device features */
|
||||
unsigned long features;
|
||||
#define NETIF_F_SG 1 /* Scatter/gather IO. */
|
||||
#define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */
|
||||
#define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */
|
||||
#define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */
|
||||
#define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */
|
||||
#define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */
|
||||
#define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */
|
||||
#define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */
|
||||
#define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */
|
||||
#define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */
|
||||
#define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */
|
||||
#define NETIF_F_LLTX 4096 /* LockLess TX */
|
||||
|
||||
struct net_device *next_sched;
|
||||
|
||||
/* Interface index. Unique device identifier */
|
||||
|
|
@ -316,9 +333,6 @@ struct net_device
|
|||
* will (read: may be cleaned up at will).
|
||||
*/
|
||||
|
||||
/* These may be needed for future network-power-down code. */
|
||||
unsigned long trans_start; /* Time (in jiffies) of last Tx */
|
||||
unsigned long last_rx; /* Time of last Rx */
|
||||
|
||||
unsigned short flags; /* interface flags (a la BSD) */
|
||||
unsigned short gflags;
|
||||
|
|
@ -328,15 +342,12 @@ struct net_device
|
|||
unsigned mtu; /* interface MTU value */
|
||||
unsigned short type; /* interface hardware type */
|
||||
unsigned short hard_header_len; /* hardware hdr length */
|
||||
void *priv; /* pointer to private data */
|
||||
|
||||
struct net_device *master; /* Pointer to master device of a group,
|
||||
* which this device is member of.
|
||||
*/
|
||||
|
||||
/* Interface address info. */
|
||||
unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */
|
||||
unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address */
|
||||
unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */
|
||||
unsigned char addr_len; /* hardware address length */
|
||||
unsigned short dev_id; /* for shared network cards */
|
||||
|
|
@ -346,8 +357,6 @@ struct net_device
|
|||
int promiscuity;
|
||||
int allmulti;
|
||||
|
||||
int watchdog_timeo;
|
||||
struct timer_list watchdog_timer;
|
||||
|
||||
/* Protocol specific pointers */
|
||||
|
||||
|
|
@ -358,32 +367,62 @@ struct net_device
|
|||
void *ec_ptr; /* Econet specific data */
|
||||
void *ax25_ptr; /* AX.25 specific data */
|
||||
|
||||
struct list_head poll_list; /* Link to poll list */
|
||||
/*
|
||||
* Cache line mostly used on receive path (including eth_type_trans())
|
||||
*/
|
||||
struct list_head poll_list ____cacheline_aligned_in_smp;
|
||||
/* Link to poll list */
|
||||
|
||||
int (*poll) (struct net_device *dev, int *quota);
|
||||
int quota;
|
||||
int weight;
|
||||
unsigned long last_rx; /* Time of last Rx */
|
||||
/* Interface address info used in eth_type_trans() */
|
||||
unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast
|
||||
because most packets are unicast) */
|
||||
|
||||
unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */
|
||||
|
||||
/*
|
||||
* Cache line mostly used on queue transmit path (qdisc)
|
||||
*/
|
||||
/* device queue lock */
|
||||
spinlock_t queue_lock ____cacheline_aligned_in_smp;
|
||||
struct Qdisc *qdisc;
|
||||
struct Qdisc *qdisc_sleeping;
|
||||
struct Qdisc *qdisc_ingress;
|
||||
struct list_head qdisc_list;
|
||||
unsigned long tx_queue_len; /* Max frames per queue allowed */
|
||||
|
||||
/* ingress path synchronizer */
|
||||
spinlock_t ingress_lock;
|
||||
struct Qdisc *qdisc_ingress;
|
||||
|
||||
/*
|
||||
* One part is mostly used on xmit path (device)
|
||||
*/
|
||||
/* hard_start_xmit synchronizer */
|
||||
spinlock_t xmit_lock;
|
||||
spinlock_t xmit_lock ____cacheline_aligned_in_smp;
|
||||
/* cpu id of processor entered to hard_start_xmit or -1,
|
||||
if nobody entered there.
|
||||
*/
|
||||
int xmit_lock_owner;
|
||||
/* device queue lock */
|
||||
spinlock_t queue_lock;
|
||||
void *priv; /* pointer to private data */
|
||||
int (*hard_start_xmit) (struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
/* These may be needed for future network-power-down code. */
|
||||
unsigned long trans_start; /* Time (in jiffies) of last Tx */
|
||||
|
||||
int watchdog_timeo; /* used by dev_watchdog() */
|
||||
struct timer_list watchdog_timer;
|
||||
|
||||
/*
|
||||
* refcnt is a very hot point, so align it on SMP
|
||||
*/
|
||||
/* Number of references to this device */
|
||||
atomic_t refcnt;
|
||||
atomic_t refcnt ____cacheline_aligned_in_smp;
|
||||
|
||||
/* delayed register/unregister */
|
||||
struct list_head todo_list;
|
||||
/* device name hash chain */
|
||||
struct hlist_node name_hlist;
|
||||
/* device index hash chain */
|
||||
struct hlist_node index_hlist;
|
||||
|
||||
|
|
@ -396,21 +435,6 @@ struct net_device
|
|||
NETREG_RELEASED, /* called free_netdev */
|
||||
} reg_state;
|
||||
|
||||
/* Net device features */
|
||||
unsigned long features;
|
||||
#define NETIF_F_SG 1 /* Scatter/gather IO. */
|
||||
#define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */
|
||||
#define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */
|
||||
#define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */
|
||||
#define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */
|
||||
#define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */
|
||||
#define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */
|
||||
#define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */
|
||||
#define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */
|
||||
#define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */
|
||||
#define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */
|
||||
#define NETIF_F_LLTX 4096 /* LockLess TX */
|
||||
|
||||
/* Called after device is detached from network. */
|
||||
void (*uninit)(struct net_device *dev);
|
||||
/* Called after last user reference disappears. */
|
||||
|
|
@ -419,10 +443,7 @@ struct net_device
|
|||
/* Pointers to interface service routines. */
|
||||
int (*open)(struct net_device *dev);
|
||||
int (*stop)(struct net_device *dev);
|
||||
int (*hard_start_xmit) (struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
#define HAVE_NETDEV_POLL
|
||||
int (*poll) (struct net_device *dev, int *quota);
|
||||
int (*hard_header) (struct sk_buff *skb,
|
||||
struct net_device *dev,
|
||||
unsigned short type,
|
||||
|
|
|
|||
|
|
@ -41,11 +41,15 @@ enum nfnetlink_groups {
|
|||
struct nfattr
|
||||
{
|
||||
u_int16_t nfa_len;
|
||||
u_int16_t nfa_type;
|
||||
u_int16_t nfa_type; /* we use 15 bits for the type, and the highest
|
||||
* bit to indicate whether the payload is nested */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* FIXME: Shamelessly copy and pasted from rtnetlink.h, it's time
|
||||
* to put this in a generic file */
|
||||
/* FIXME: Apart from NFNL_NFA_NESTED shamelessly copy and pasted from
|
||||
* rtnetlink.h, it's time to put this in a generic file */
|
||||
|
||||
#define NFNL_NFA_NEST 0x8000
|
||||
#define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff)
|
||||
|
||||
#define NFA_ALIGNTO 4
|
||||
#define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1))
|
||||
|
|
@ -59,7 +63,7 @@ struct nfattr
|
|||
#define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0))
|
||||
#define NFA_NEST(skb, type) \
|
||||
({ struct nfattr *__start = (struct nfattr *) (skb)->tail; \
|
||||
NFA_PUT(skb, type, 0, NULL); \
|
||||
NFA_PUT(skb, (NFNL_NFA_NEST | type), 0, NULL); \
|
||||
__start; })
|
||||
#define NFA_NEST_END(skb, start) \
|
||||
({ (start)->nfa_len = ((skb)->tail - (unsigned char *) (start)); \
|
||||
|
|
|
|||
|
|
@ -70,15 +70,24 @@ enum ctattr_l4proto {
|
|||
|
||||
enum ctattr_protoinfo {
|
||||
CTA_PROTOINFO_UNSPEC,
|
||||
CTA_PROTOINFO_TCP_STATE,
|
||||
CTA_PROTOINFO_TCP,
|
||||
__CTA_PROTOINFO_MAX
|
||||
};
|
||||
#define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1)
|
||||
|
||||
enum ctattr_protoinfo_tcp {
|
||||
CTA_PROTOINFO_TCP_UNSPEC,
|
||||
CTA_PROTOINFO_TCP_STATE,
|
||||
__CTA_PROTOINFO_TCP_MAX
|
||||
};
|
||||
#define CTA_PROTOINFO_TCP_MAX (__CTA_PROTOINFO_TCP_MAX - 1)
|
||||
|
||||
enum ctattr_counters {
|
||||
CTA_COUNTERS_UNSPEC,
|
||||
CTA_COUNTERS_PACKETS,
|
||||
CTA_COUNTERS_BYTES,
|
||||
CTA_COUNTERS_PACKETS, /* old 64bit counters */
|
||||
CTA_COUNTERS_BYTES, /* old 64bit counters */
|
||||
CTA_COUNTERS32_PACKETS,
|
||||
CTA_COUNTERS32_BYTES,
|
||||
__CTA_COUNTERS_MAX
|
||||
};
|
||||
#define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1)
|
||||
|
|
|
|||
|
|
@ -117,6 +117,10 @@ enum ip_conntrack_events
|
|||
/* NAT info */
|
||||
IPCT_NATINFO_BIT = 10,
|
||||
IPCT_NATINFO = (1 << IPCT_NATINFO_BIT),
|
||||
|
||||
/* Counter highest bit has been set */
|
||||
IPCT_COUNTER_FILLING_BIT = 11,
|
||||
IPCT_COUNTER_FILLING = (1 << IPCT_COUNTER_FILLING_BIT),
|
||||
};
|
||||
|
||||
enum ip_conntrack_expect_events {
|
||||
|
|
@ -192,8 +196,8 @@ do { \
|
|||
|
||||
struct ip_conntrack_counter
|
||||
{
|
||||
u_int64_t packets;
|
||||
u_int64_t bytes;
|
||||
u_int32_t packets;
|
||||
u_int32_t bytes;
|
||||
};
|
||||
|
||||
struct ip_conntrack_helper;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@ struct ip_conntrack_protocol
|
|||
int (*to_nfattr)(struct sk_buff *skb, struct nfattr *nfa,
|
||||
const struct ip_conntrack *ct);
|
||||
|
||||
/* convert nfnetlink attributes to protoinfo */
|
||||
int (*from_nfattr)(struct nfattr *tb[], struct ip_conntrack *ct);
|
||||
|
||||
int (*tuple_to_nfattr)(struct sk_buff *skb,
|
||||
const struct ip_conntrack_tuple *t);
|
||||
int (*nfattr_to_tuple)(struct nfattr *tb[],
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef _IP_CONNTRACK_TUPLE_H
|
||||
#define _IP_CONNTRACK_TUPLE_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* A `tuple' is a structure containing the information to uniquely
|
||||
identify a connection. ie. if two packets have the same tuple, they
|
||||
are in the same connection; if not, they are not.
|
||||
|
|
|
|||
|
|
@ -58,10 +58,6 @@ extern rwlock_t ip_nat_lock;
|
|||
struct ip_nat_info
|
||||
{
|
||||
struct list_head bysource;
|
||||
|
||||
/* Helper (NULL if none). */
|
||||
struct ip_nat_helper *helper;
|
||||
|
||||
struct ip_nat_seq seq[IP_CT_DIR_MAX];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,16 +5,14 @@
|
|||
|
||||
/* This header used to share core functionality between the standalone
|
||||
NAT module, and the compatibility layer's use of NAT for masquerading. */
|
||||
extern int ip_nat_init(void);
|
||||
extern void ip_nat_cleanup(void);
|
||||
|
||||
extern unsigned int nat_packet(struct ip_conntrack *ct,
|
||||
extern unsigned int ip_nat_packet(struct ip_conntrack *ct,
|
||||
enum ip_conntrack_info conntrackinfo,
|
||||
unsigned int hooknum,
|
||||
struct sk_buff **pskb);
|
||||
|
||||
extern int icmp_reply_translation(struct sk_buff **pskb,
|
||||
struct ip_conntrack *ct,
|
||||
enum ip_nat_manip_type manip,
|
||||
enum ip_conntrack_dir dir);
|
||||
extern int ip_nat_icmp_reply_translation(struct sk_buff **pskb,
|
||||
struct ip_conntrack *ct,
|
||||
enum ip_nat_manip_type manip,
|
||||
enum ip_conntrack_dir dir);
|
||||
#endif /* _IP_NAT_CORE_H */
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (*
|
|||
extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
|
||||
extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
|
||||
extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
|
||||
__u32 group, unsigned int __nocast allocation);
|
||||
__u32 group, gfp_t allocation);
|
||||
extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code);
|
||||
extern int netlink_register_notifier(struct notifier_block *nb);
|
||||
extern int netlink_unregister_notifier(struct notifier_block *nb);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ static inline void netpoll_poll_unlock(void *have)
|
|||
|
||||
#else
|
||||
#define netpoll_rx(a) 0
|
||||
#define netpoll_poll_lock(a) 0
|
||||
#define netpoll_poll_lock(a) NULL
|
||||
#define netpoll_poll_unlock(a)
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#define AS_EIO (__GFP_BITS_SHIFT + 0) /* IO error on async write */
|
||||
#define AS_ENOSPC (__GFP_BITS_SHIFT + 1) /* ENOSPC on async write */
|
||||
|
||||
static inline unsigned int __nocast mapping_gfp_mask(struct address_space * mapping)
|
||||
static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
|
||||
{
|
||||
return mapping->flags & __GFP_BITS_MASK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,6 +185,7 @@
|
|||
#define PCI_DEVICE_ID_LSI_61C102 0x0901
|
||||
#define PCI_DEVICE_ID_LSI_63C815 0x1000
|
||||
#define PCI_DEVICE_ID_LSI_SAS1064 0x0050
|
||||
#define PCI_DEVICE_ID_LSI_SAS1064R 0x0411
|
||||
#define PCI_DEVICE_ID_LSI_SAS1066 0x005E
|
||||
#define PCI_DEVICE_ID_LSI_SAS1068 0x0054
|
||||
#define PCI_DEVICE_ID_LSI_SAS1064A 0x005C
|
||||
|
|
@ -392,6 +393,7 @@
|
|||
#define PCI_DEVICE_ID_NS_87560_USB 0x0012
|
||||
#define PCI_DEVICE_ID_NS_83815 0x0020
|
||||
#define PCI_DEVICE_ID_NS_83820 0x0022
|
||||
#define PCI_DEVICE_ID_NS_SATURN 0x0035
|
||||
#define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500
|
||||
#define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501
|
||||
#define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502
|
||||
|
|
@ -559,6 +561,7 @@
|
|||
#define PCI_VENDOR_ID_DELL 0x1028
|
||||
#define PCI_DEVICE_ID_DELL_RACIII 0x0008
|
||||
#define PCI_DEVICE_ID_DELL_RAC4 0x0012
|
||||
#define PCI_DEVICE_ID_DELL_PERC5 0x0015
|
||||
|
||||
#define PCI_VENDOR_ID_MATROX 0x102B
|
||||
#define PCI_DEVICE_ID_MATROX_MGA_2 0x0518
|
||||
|
|
@ -769,6 +772,8 @@
|
|||
#define PCI_DEVICE_ID_TI_TVP4010 0x3d04
|
||||
#define PCI_DEVICE_ID_TI_TVP4020 0x3d07
|
||||
#define PCI_DEVICE_ID_TI_4450 0x8011
|
||||
#define PCI_DEVICE_ID_TI_XX21_XX11 0x8031
|
||||
#define PCI_DEVICE_ID_TI_X515 0x8036
|
||||
#define PCI_DEVICE_ID_TI_1130 0xac12
|
||||
#define PCI_DEVICE_ID_TI_1031 0xac13
|
||||
#define PCI_DEVICE_ID_TI_1131 0xac15
|
||||
|
|
@ -785,12 +790,17 @@
|
|||
#define PCI_DEVICE_ID_TI_4451 0xac42
|
||||
#define PCI_DEVICE_ID_TI_4510 0xac44
|
||||
#define PCI_DEVICE_ID_TI_4520 0xac46
|
||||
#define PCI_DEVICE_ID_TI_7510 0xac47
|
||||
#define PCI_DEVICE_ID_TI_7610 0xac48
|
||||
#define PCI_DEVICE_ID_TI_7410 0xac49
|
||||
#define PCI_DEVICE_ID_TI_1410 0xac50
|
||||
#define PCI_DEVICE_ID_TI_1420 0xac51
|
||||
#define PCI_DEVICE_ID_TI_1451A 0xac52
|
||||
#define PCI_DEVICE_ID_TI_1620 0xac54
|
||||
#define PCI_DEVICE_ID_TI_1520 0xac55
|
||||
#define PCI_DEVICE_ID_TI_1510 0xac56
|
||||
#define PCI_DEVICE_ID_TI_X620 0xac8d
|
||||
#define PCI_DEVICE_ID_TI_X420 0xac8e
|
||||
|
||||
#define PCI_VENDOR_ID_SONY 0x104d
|
||||
#define PCI_DEVICE_ID_SONY_CXD3222 0x8039
|
||||
|
|
@ -976,6 +986,7 @@
|
|||
#define PCI_DEVICE_ID_SUN_SABRE 0xa000
|
||||
#define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001
|
||||
#define PCI_DEVICE_ID_SUN_TOMATILLO 0xa801
|
||||
#define PCI_DEVICE_ID_SUN_CASSINI 0xabba
|
||||
|
||||
#define PCI_VENDOR_ID_CMD 0x1095
|
||||
#define PCI_DEVICE_ID_CMD_640 0x0640
|
||||
|
|
@ -1268,7 +1279,8 @@
|
|||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266
|
||||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267
|
||||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E
|
||||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x036F
|
||||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E
|
||||
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268
|
||||
#define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269
|
||||
#define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B
|
||||
|
|
@ -2186,7 +2198,12 @@
|
|||
#define PCI_DEVICE_ID_ENE_1211 0x1211
|
||||
#define PCI_DEVICE_ID_ENE_1225 0x1225
|
||||
#define PCI_DEVICE_ID_ENE_1410 0x1410
|
||||
#define PCI_DEVICE_ID_ENE_710 0x1411
|
||||
#define PCI_DEVICE_ID_ENE_712 0x1412
|
||||
#define PCI_DEVICE_ID_ENE_1420 0x1420
|
||||
#define PCI_DEVICE_ID_ENE_720 0x1421
|
||||
#define PCI_DEVICE_ID_ENE_722 0x1422
|
||||
|
||||
#define PCI_VENDOR_ID_CHELSIO 0x1425
|
||||
|
||||
#define PCI_VENDOR_ID_MIPS 0x153f
|
||||
|
|
|
|||
|
|
@ -71,11 +71,11 @@ posix_acl_release(struct posix_acl *acl)
|
|||
|
||||
/* posix_acl.c */
|
||||
|
||||
extern struct posix_acl *posix_acl_alloc(int, unsigned int __nocast);
|
||||
extern struct posix_acl *posix_acl_clone(const struct posix_acl *, unsigned int __nocast);
|
||||
extern struct posix_acl *posix_acl_alloc(int, gfp_t);
|
||||
extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t);
|
||||
extern int posix_acl_valid(const struct posix_acl *);
|
||||
extern int posix_acl_permission(struct inode *, const struct posix_acl *, int);
|
||||
extern struct posix_acl *posix_acl_from_mode(mode_t, unsigned int __nocast);
|
||||
extern struct posix_acl *posix_acl_from_mode(mode_t, gfp_t);
|
||||
extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *);
|
||||
extern int posix_acl_create_masq(struct posix_acl *, mode_t *);
|
||||
extern int posix_acl_chmod_masq(struct posix_acl *, mode_t);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ void *radix_tree_delete(struct radix_tree_root *, unsigned long);
|
|||
unsigned int
|
||||
radix_tree_gang_lookup(struct radix_tree_root *root, void **results,
|
||||
unsigned long first_index, unsigned int max_items);
|
||||
int radix_tree_preload(unsigned int __nocast gfp_mask);
|
||||
int radix_tree_preload(gfp_t gfp_mask);
|
||||
void radix_tree_init(void);
|
||||
void *radix_tree_tag_set(struct radix_tree_root *root,
|
||||
unsigned long index, int tag);
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ struct rcu_data {
|
|||
long batch; /* Batch # for current RCU batch */
|
||||
struct rcu_head *nxtlist;
|
||||
struct rcu_head **nxttail;
|
||||
long count; /* # of queued items */
|
||||
struct rcu_head *curlist;
|
||||
struct rcu_head **curtail;
|
||||
struct rcu_head *donelist;
|
||||
|
|
|
|||
|
|
@ -107,13 +107,25 @@ extern unsigned long nr_iowait(void);
|
|||
|
||||
#include <asm/processor.h>
|
||||
|
||||
/*
|
||||
* Task state bitmask. NOTE! These bits are also
|
||||
* encoded in fs/proc/array.c: get_task_state().
|
||||
*
|
||||
* We have two separate sets of flags: task->state
|
||||
* is about runnability, while task->exit_state are
|
||||
* about the task exiting. Confusing, but this way
|
||||
* modifying one set can't modify the other one by
|
||||
* mistake.
|
||||
*/
|
||||
#define TASK_RUNNING 0
|
||||
#define TASK_INTERRUPTIBLE 1
|
||||
#define TASK_UNINTERRUPTIBLE 2
|
||||
#define TASK_STOPPED 4
|
||||
#define TASK_TRACED 8
|
||||
/* in tsk->exit_state */
|
||||
#define EXIT_ZOMBIE 16
|
||||
#define EXIT_DEAD 32
|
||||
/* in tsk->state again */
|
||||
#define TASK_NONINTERACTIVE 64
|
||||
|
||||
#define __set_task_state(tsk, state_value) \
|
||||
|
|
@ -1006,6 +1018,7 @@ extern int force_sig_info(int, struct siginfo *, struct task_struct *);
|
|||
extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
|
||||
extern int kill_pg_info(int, struct siginfo *, pid_t);
|
||||
extern int kill_proc_info(int, struct siginfo *, pid_t);
|
||||
extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t);
|
||||
extern void do_notify_parent(struct task_struct *, int);
|
||||
extern void force_sig(int, struct task_struct *);
|
||||
extern void force_sig_specific(int, struct task_struct *);
|
||||
|
|
|
|||
|
|
@ -2634,8 +2634,7 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o
|
|||
return security_ops->socket_getpeersec(sock, optval, optlen, len);
|
||||
}
|
||||
|
||||
static inline int security_sk_alloc(struct sock *sk, int family,
|
||||
unsigned int __nocast priority)
|
||||
static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority)
|
||||
{
|
||||
return security_ops->sk_alloc_security(sk, family, priority);
|
||||
}
|
||||
|
|
@ -2752,8 +2751,7 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o
|
|||
return -ENOPROTOOPT;
|
||||
}
|
||||
|
||||
static inline int security_sk_alloc(struct sock *sk, int family,
|
||||
unsigned int __nocast priority)
|
||||
static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,8 +155,6 @@ struct skb_shared_info {
|
|||
#define SKB_DATAREF_SHIFT 16
|
||||
#define SKB_DATAREF_MASK ((1 << SKB_DATAREF_SHIFT) - 1)
|
||||
|
||||
extern struct timeval skb_tv_base;
|
||||
|
||||
struct skb_timeval {
|
||||
u32 off_sec;
|
||||
u32 off_usec;
|
||||
|
|
@ -175,7 +173,7 @@ enum {
|
|||
* @prev: Previous buffer in list
|
||||
* @list: List we are on
|
||||
* @sk: Socket we are owned by
|
||||
* @tstamp: Time we arrived stored as offset to skb_tv_base
|
||||
* @tstamp: Time we arrived
|
||||
* @dev: Device we arrived on/are leaving by
|
||||
* @input_dev: Device we arrived on
|
||||
* @h: Transport layer header
|
||||
|
|
@ -304,37 +302,37 @@ struct sk_buff {
|
|||
|
||||
extern void __kfree_skb(struct sk_buff *skb);
|
||||
extern struct sk_buff *__alloc_skb(unsigned int size,
|
||||
unsigned int __nocast priority, int fclone);
|
||||
gfp_t priority, int fclone);
|
||||
static inline struct sk_buff *alloc_skb(unsigned int size,
|
||||
unsigned int __nocast priority)
|
||||
gfp_t priority)
|
||||
{
|
||||
return __alloc_skb(size, priority, 0);
|
||||
}
|
||||
|
||||
static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
|
||||
unsigned int __nocast priority)
|
||||
gfp_t priority)
|
||||
{
|
||||
return __alloc_skb(size, priority, 1);
|
||||
}
|
||||
|
||||
extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
|
||||
unsigned int size,
|
||||
unsigned int __nocast priority);
|
||||
gfp_t priority);
|
||||
extern void kfree_skbmem(struct sk_buff *skb);
|
||||
extern struct sk_buff *skb_clone(struct sk_buff *skb,
|
||||
unsigned int __nocast priority);
|
||||
gfp_t priority);
|
||||
extern struct sk_buff *skb_copy(const struct sk_buff *skb,
|
||||
unsigned int __nocast priority);
|
||||
gfp_t priority);
|
||||
extern struct sk_buff *pskb_copy(struct sk_buff *skb,
|
||||
unsigned int __nocast gfp_mask);
|
||||
gfp_t gfp_mask);
|
||||
extern int pskb_expand_head(struct sk_buff *skb,
|
||||
int nhead, int ntail,
|
||||
unsigned int __nocast gfp_mask);
|
||||
gfp_t gfp_mask);
|
||||
extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb,
|
||||
unsigned int headroom);
|
||||
extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
|
||||
int newheadroom, int newtailroom,
|
||||
unsigned int __nocast priority);
|
||||
gfp_t priority);
|
||||
extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad);
|
||||
#define dev_kfree_skb(a) kfree_skb(a)
|
||||
extern void skb_over_panic(struct sk_buff *skb, int len,
|
||||
|
|
@ -486,7 +484,7 @@ static inline int skb_shared(const struct sk_buff *skb)
|
|||
* NULL is returned on a memory allocation failure.
|
||||
*/
|
||||
static inline struct sk_buff *skb_share_check(struct sk_buff *skb,
|
||||
unsigned int __nocast pri)
|
||||
gfp_t pri)
|
||||
{
|
||||
might_sleep_if(pri & __GFP_WAIT);
|
||||
if (skb_shared(skb)) {
|
||||
|
|
@ -518,7 +516,7 @@ static inline struct sk_buff *skb_share_check(struct sk_buff *skb,
|
|||
* %NULL is returned on a memory allocation failure.
|
||||
*/
|
||||
static inline struct sk_buff *skb_unshare(struct sk_buff *skb,
|
||||
unsigned int __nocast pri)
|
||||
gfp_t pri)
|
||||
{
|
||||
might_sleep_if(pri & __GFP_WAIT);
|
||||
if (skb_cloned(skb)) {
|
||||
|
|
@ -1019,7 +1017,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
|
|||
* %NULL is returned in there is no free memory.
|
||||
*/
|
||||
static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
|
||||
unsigned int __nocast gfp_mask)
|
||||
gfp_t gfp_mask)
|
||||
{
|
||||
struct sk_buff *skb = alloc_skb(length + 16, gfp_mask);
|
||||
if (likely(skb))
|
||||
|
|
@ -1132,8 +1130,8 @@ static inline int skb_can_coalesce(struct sk_buff *skb, int i,
|
|||
* If there is no free memory -ENOMEM is returned, otherwise zero
|
||||
* is returned and the old skb data released.
|
||||
*/
|
||||
extern int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp);
|
||||
static inline int skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp)
|
||||
extern int __skb_linearize(struct sk_buff *skb, gfp_t gfp);
|
||||
static inline int skb_linearize(struct sk_buff *skb, gfp_t gfp)
|
||||
{
|
||||
return __skb_linearize(skb, gfp);
|
||||
}
|
||||
|
|
@ -1255,10 +1253,6 @@ static inline void skb_get_timestamp(const struct sk_buff *skb, struct timeval *
|
|||
{
|
||||
stamp->tv_sec = skb->tstamp.off_sec;
|
||||
stamp->tv_usec = skb->tstamp.off_usec;
|
||||
if (skb->tstamp.off_sec) {
|
||||
stamp->tv_sec += skb_tv_base.tv_sec;
|
||||
stamp->tv_usec += skb_tv_base.tv_usec;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1272,8 +1266,8 @@ static inline void skb_get_timestamp(const struct sk_buff *skb, struct timeval *
|
|||
*/
|
||||
static inline void skb_set_timestamp(struct sk_buff *skb, const struct timeval *stamp)
|
||||
{
|
||||
skb->tstamp.off_sec = stamp->tv_sec - skb_tv_base.tv_sec;
|
||||
skb->tstamp.off_usec = stamp->tv_usec - skb_tv_base.tv_usec;
|
||||
skb->tstamp.off_sec = stamp->tv_sec;
|
||||
skb->tstamp.off_usec = stamp->tv_usec;
|
||||
}
|
||||
|
||||
extern void __net_timestamp(struct sk_buff *skb);
|
||||
|
|
|
|||
|
|
@ -61,11 +61,11 @@ extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned lo
|
|||
void (*)(void *, kmem_cache_t *, unsigned long));
|
||||
extern int kmem_cache_destroy(kmem_cache_t *);
|
||||
extern int kmem_cache_shrink(kmem_cache_t *);
|
||||
extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast);
|
||||
extern void *kmem_cache_alloc(kmem_cache_t *, gfp_t);
|
||||
extern void kmem_cache_free(kmem_cache_t *, void *);
|
||||
extern unsigned int kmem_cache_size(kmem_cache_t *);
|
||||
extern const char *kmem_cache_name(kmem_cache_t *);
|
||||
extern kmem_cache_t *kmem_find_general_cachep(size_t size, unsigned int __nocast gfpflags);
|
||||
extern kmem_cache_t *kmem_find_general_cachep(size_t size, gfp_t gfpflags);
|
||||
|
||||
/* Size description struct for general caches. */
|
||||
struct cache_sizes {
|
||||
|
|
@ -74,9 +74,9 @@ struct cache_sizes {
|
|||
kmem_cache_t *cs_dmacachep;
|
||||
};
|
||||
extern struct cache_sizes malloc_sizes[];
|
||||
extern void *__kmalloc(size_t, unsigned int __nocast);
|
||||
extern void *__kmalloc(size_t, gfp_t);
|
||||
|
||||
static inline void *kmalloc(size_t size, unsigned int __nocast flags)
|
||||
static inline void *kmalloc(size_t size, gfp_t flags)
|
||||
{
|
||||
if (__builtin_constant_p(size)) {
|
||||
int i = 0;
|
||||
|
|
@ -99,7 +99,7 @@ found:
|
|||
return __kmalloc(size, flags);
|
||||
}
|
||||
|
||||
extern void *kzalloc(size_t, unsigned int __nocast);
|
||||
extern void *kzalloc(size_t, gfp_t);
|
||||
|
||||
/**
|
||||
* kcalloc - allocate memory for an array. The memory is set to zero.
|
||||
|
|
@ -107,7 +107,7 @@ extern void *kzalloc(size_t, unsigned int __nocast);
|
|||
* @size: element size.
|
||||
* @flags: the type of memory to allocate.
|
||||
*/
|
||||
static inline void *kcalloc(size_t n, size_t size, unsigned int __nocast flags)
|
||||
static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
|
||||
{
|
||||
if (n != 0 && size > INT_MAX / n)
|
||||
return NULL;
|
||||
|
|
@ -118,15 +118,14 @@ extern void kfree(const void *);
|
|||
extern unsigned int ksize(const void *);
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
extern void *kmem_cache_alloc_node(kmem_cache_t *,
|
||||
unsigned int __nocast flags, int node);
|
||||
extern void *kmalloc_node(size_t size, unsigned int __nocast flags, int node);
|
||||
extern void *kmem_cache_alloc_node(kmem_cache_t *, gfp_t flags, int node);
|
||||
extern void *kmalloc_node(size_t size, gfp_t flags, int node);
|
||||
#else
|
||||
static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node)
|
||||
{
|
||||
return kmem_cache_alloc(cachep, flags);
|
||||
}
|
||||
static inline void *kmalloc_node(size_t size, unsigned int __nocast flags, int node)
|
||||
static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
|
||||
{
|
||||
return kmalloc(size, flags);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ extern int memcmp(const void *,const void *,__kernel_size_t);
|
|||
extern void * memchr(const void *,int,__kernel_size_t);
|
||||
#endif
|
||||
|
||||
extern char *kstrdup(const char *s, unsigned int __nocast gfp);
|
||||
extern char *kstrdup(const char *s, gfp_t gfp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,5 +71,7 @@ void restore_processor_state(void);
|
|||
struct saved_context;
|
||||
void __save_processor_state(struct saved_context *ctxt);
|
||||
void __restore_processor_state(struct saved_context *ctxt);
|
||||
extern unsigned long get_usable_page(unsigned gfp_mask);
|
||||
extern void free_eaten_memory(void);
|
||||
|
||||
#endif /* _LINUX_SWSUSP_H */
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ struct swap_list_t {
|
|||
#define vm_swap_full() (nr_swap_pages*2 < total_swap_pages)
|
||||
|
||||
/* linux/mm/oom_kill.c */
|
||||
extern void out_of_memory(unsigned int __nocast gfp_mask, int order);
|
||||
extern void out_of_memory(gfp_t gfp_mask, int order);
|
||||
|
||||
/* linux/mm/memory.c */
|
||||
extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *);
|
||||
|
|
|
|||
|
|
@ -202,7 +202,8 @@ enum
|
|||
NET_TR=14,
|
||||
NET_DECNET=15,
|
||||
NET_ECONET=16,
|
||||
NET_SCTP=17,
|
||||
NET_SCTP=17,
|
||||
NET_LLC=18,
|
||||
};
|
||||
|
||||
/* /proc/sys/kernel/random */
|
||||
|
|
@ -522,6 +523,29 @@ enum {
|
|||
NET_IPX_FORWARDING=2
|
||||
};
|
||||
|
||||
/* /proc/sys/net/llc */
|
||||
enum {
|
||||
NET_LLC2=1,
|
||||
NET_LLC_STATION=2,
|
||||
};
|
||||
|
||||
/* /proc/sys/net/llc/llc2 */
|
||||
enum {
|
||||
NET_LLC2_TIMEOUT=1,
|
||||
};
|
||||
|
||||
/* /proc/sys/net/llc/station */
|
||||
enum {
|
||||
NET_LLC_STATION_ACK_TIMEOUT=1,
|
||||
};
|
||||
|
||||
/* /proc/sys/net/llc/llc2/timeout */
|
||||
enum {
|
||||
NET_LLC2_ACK_TIMEOUT=1,
|
||||
NET_LLC2_P_TIMEOUT=2,
|
||||
NET_LLC2_REJ_TIMEOUT=3,
|
||||
NET_LLC2_BUSY_TIMEOUT=4,
|
||||
};
|
||||
|
||||
/* /proc/sys/net/appletalk */
|
||||
enum {
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ enum
|
|||
TCF_META_ID_SK_SNDBUF,
|
||||
TCF_META_ID_SK_ALLOCS,
|
||||
TCF_META_ID_SK_ROUTE_CAPS,
|
||||
TCF_META_ID_SK_HASHENT,
|
||||
TCF_META_ID_SK_HASH,
|
||||
TCF_META_ID_SK_LINGERTIME,
|
||||
TCF_META_ID_SK_ACK_BACKLOG,
|
||||
TCF_META_ID_SK_MAX_ACK_BACKLOG,
|
||||
|
|
|
|||
|
|
@ -158,7 +158,8 @@ extern unsigned int textsearch_find_continuous(struct ts_config *,
|
|||
#define TS_PRIV_ALIGNTO 8
|
||||
#define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1))
|
||||
|
||||
static inline struct ts_config *alloc_ts_config(size_t payload, int gfp_mask)
|
||||
static inline struct ts_config *alloc_ts_config(size_t payload,
|
||||
gfp_t gfp_mask)
|
||||
{
|
||||
struct ts_config *conf;
|
||||
|
||||
|
|
|
|||
|
|
@ -165,6 +165,10 @@ typedef __u64 __bitwise __le64;
|
|||
typedef __u64 __bitwise __be64;
|
||||
#endif
|
||||
|
||||
#ifdef __KERNEL__
|
||||
typedef unsigned __nocast gfp_t;
|
||||
#endif
|
||||
|
||||
struct ustat {
|
||||
__kernel_daddr_t f_tfree;
|
||||
__kernel_ino_t f_tinode;
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ struct vm_struct {
|
|||
extern void *vmalloc(unsigned long size);
|
||||
extern void *vmalloc_exec(unsigned long size);
|
||||
extern void *vmalloc_32(unsigned long size);
|
||||
extern void *__vmalloc(unsigned long size, unsigned int __nocast gfp_mask, pgprot_t prot);
|
||||
extern void *__vmalloc_area(struct vm_struct *area, unsigned int __nocast gfp_mask, pgprot_t prot);
|
||||
extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot);
|
||||
extern void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask, pgprot_t prot);
|
||||
extern void vfree(void *addr);
|
||||
|
||||
extern void *vmap(struct page **pages, unsigned int count,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue