mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 22:42:10 +00:00
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [PKT_SCHED] netem: Orphan SKB when adding to queue. [NET]: kernel-doc fix for sock.h [NET]: Reduce sizeof(struct flowi) by 20 bytes. [IPv6] fib: initialize tb6_lock in common place to give lockdep a key [ATM] nicstar: Fix a bogus casting warning [ATM] firestream: handle thrown error [ATM]: No need to return void [ATM]: handle sysfs errors [DCCP] ipv6: Fix opt_skb leak. [DCCP]: Fix Oops in DCCPv6
This commit is contained in:
commit
d5a92dd437
13 changed files with 45 additions and 28 deletions
|
@ -2453,7 +2453,7 @@ static void __exit amb_module_exit (void)
|
||||||
{
|
{
|
||||||
PRINTD (DBG_FLOW|DBG_INIT, "cleanup_module");
|
PRINTD (DBG_FLOW|DBG_INIT, "cleanup_module");
|
||||||
|
|
||||||
return pci_unregister_driver(&amb_driver);
|
pci_unregister_driver(&amb_driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(amb_module_init);
|
module_init(amb_module_init);
|
||||||
|
|
|
@ -1002,6 +1002,10 @@ static int fs_open(struct atm_vcc *atm_vcc)
|
||||||
r = ROUND_UP;
|
r = ROUND_UP;
|
||||||
}
|
}
|
||||||
error = make_rate (pcr, r, &tmc0, NULL);
|
error = make_rate (pcr, r, &tmc0, NULL);
|
||||||
|
if (error) {
|
||||||
|
kfree(tc);
|
||||||
|
return error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fs_dprintk (FS_DEBUG_OPEN, "pcr = %d.\n", pcr);
|
fs_dprintk (FS_DEBUG_OPEN, "pcr = %d.\n", pcr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2933,7 +2933,7 @@ static int __init hrz_module_init (void) {
|
||||||
static void __exit hrz_module_exit (void) {
|
static void __exit hrz_module_exit (void) {
|
||||||
PRINTD (DBG_FLOW, "cleanup_module");
|
PRINTD (DBG_FLOW, "cleanup_module");
|
||||||
|
|
||||||
return pci_unregister_driver(&hrz_driver);
|
pci_unregister_driver(&hrz_driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(hrz_module_init);
|
module_init(hrz_module_init);
|
||||||
|
|
|
@ -2759,7 +2759,7 @@ static int ns_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg)
|
||||||
{
|
{
|
||||||
ns_dev *card;
|
ns_dev *card;
|
||||||
pool_levels pl;
|
pool_levels pl;
|
||||||
int btype;
|
long btype;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
card = dev->dev_data;
|
card = dev->dev_data;
|
||||||
|
@ -2859,7 +2859,7 @@ static int ns_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg)
|
||||||
case NS_ADJBUFLEV:
|
case NS_ADJBUFLEV:
|
||||||
if (!capable(CAP_NET_ADMIN))
|
if (!capable(CAP_NET_ADMIN))
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
btype = (int) arg; /* an int is the same size as a pointer */
|
btype = (long) arg; /* a long is the same size as a pointer or bigger */
|
||||||
switch (btype)
|
switch (btype)
|
||||||
{
|
{
|
||||||
case NS_BUFTYPE_SMALL:
|
case NS_BUFTYPE_SMALL:
|
||||||
|
|
|
@ -1634,7 +1634,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1
|
||||||
* is marked here since the boot video device will be the only enabled
|
* is marked here since the boot video device will be the only enabled
|
||||||
* video device at this point.
|
* video device at this point.
|
||||||
*/
|
*/
|
||||||
|
#if 0
|
||||||
static void __devinit fixup_video(struct pci_dev *pdev)
|
static void __devinit fixup_video(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
struct pci_dev *bridge;
|
struct pci_dev *bridge;
|
||||||
|
@ -1663,7 +1663,7 @@ static void __devinit fixup_video(struct pci_dev *pdev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, fixup_video);
|
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, fixup_video);
|
||||||
|
#endif
|
||||||
|
|
||||||
static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end)
|
static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end)
|
||||||
{
|
{
|
||||||
|
|
|
@ -199,11 +199,6 @@ static inline void dn_sk_ports_copy(struct flowi *fl, struct dn_scp *scp)
|
||||||
{
|
{
|
||||||
fl->uli_u.dnports.sport = scp->addrloc;
|
fl->uli_u.dnports.sport = scp->addrloc;
|
||||||
fl->uli_u.dnports.dport = scp->addrrem;
|
fl->uli_u.dnports.dport = scp->addrrem;
|
||||||
fl->uli_u.dnports.objnum = scp->addr.sdn_objnum;
|
|
||||||
if (fl->uli_u.dnports.objnum == 0) {
|
|
||||||
fl->uli_u.dnports.objnamel = (__u8)dn_ntohs(scp->addr.sdn_objnamel);
|
|
||||||
memcpy(fl->uli_u.dnports.objname, scp->addr.sdn_objname, 16);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern unsigned dn_mss_from_pmtu(struct net_device *dev, int mtu);
|
extern unsigned dn_mss_from_pmtu(struct net_device *dev, int mtu);
|
||||||
|
|
|
@ -68,9 +68,6 @@ struct flowi {
|
||||||
struct {
|
struct {
|
||||||
__le16 sport;
|
__le16 sport;
|
||||||
__le16 dport;
|
__le16 dport;
|
||||||
__u8 objnum;
|
|
||||||
__u8 objnamel; /* Not 16 bits since max val is 16 */
|
|
||||||
__u8 objname[16]; /* Not zero terminated */
|
|
||||||
} dnports;
|
} dnports;
|
||||||
|
|
||||||
__be32 spi;
|
__be32 spi;
|
||||||
|
|
|
@ -884,8 +884,7 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sk_filter_release: Release a socket filter
|
* sk_filter_release: Release a socket filter
|
||||||
* @sk: socket
|
* @rcu: rcu_head that contains the sk_filter info to remove
|
||||||
* @fp: filter to remove
|
|
||||||
*
|
*
|
||||||
* Remove a filter from a socket and release its resources.
|
* Remove a filter from a socket and release its resources.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -141,7 +141,7 @@ static struct class atm_class = {
|
||||||
int atm_register_sysfs(struct atm_dev *adev)
|
int atm_register_sysfs(struct atm_dev *adev)
|
||||||
{
|
{
|
||||||
struct class_device *cdev = &adev->class_dev;
|
struct class_device *cdev = &adev->class_dev;
|
||||||
int i, err;
|
int i, j, err;
|
||||||
|
|
||||||
cdev->class = &atm_class;
|
cdev->class = &atm_class;
|
||||||
class_set_devdata(cdev, adev);
|
class_set_devdata(cdev, adev);
|
||||||
|
@ -151,10 +151,19 @@ int atm_register_sysfs(struct atm_dev *adev)
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
for (i = 0; atm_attrs[i]; i++)
|
for (i = 0; atm_attrs[i]; i++) {
|
||||||
class_device_create_file(cdev, atm_attrs[i]);
|
err = class_device_create_file(cdev, atm_attrs[i]);
|
||||||
|
if (err)
|
||||||
|
goto err_out;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err_out:
|
||||||
|
for (j = 0; j < i; j++)
|
||||||
|
class_device_remove_file(cdev, atm_attrs[j]);
|
||||||
|
class_device_del(cdev);
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
void atm_unregister_sysfs(struct atm_dev *adev)
|
void atm_unregister_sysfs(struct atm_dev *adev)
|
||||||
|
|
|
@ -449,6 +449,8 @@ static inline u64 dccp_v4_init_sequence(const struct sock *sk,
|
||||||
dccp_hdr(skb)->dccph_sport);
|
dccp_hdr(skb)->dccph_sport);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct request_sock_ops dccp_request_sock_ops;
|
||||||
|
|
||||||
int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
|
int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
struct inet_request_sock *ireq;
|
struct inet_request_sock *ireq;
|
||||||
|
@ -489,7 +491,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
|
||||||
if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
|
if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
|
||||||
goto drop;
|
goto drop;
|
||||||
|
|
||||||
req = reqsk_alloc(sk->sk_prot->rsk_prot);
|
req = reqsk_alloc(&dccp_request_sock_ops);
|
||||||
if (req == NULL)
|
if (req == NULL)
|
||||||
goto drop;
|
goto drop;
|
||||||
|
|
||||||
|
|
|
@ -672,7 +672,6 @@ static struct sock *dccp_v6_hnd_req(struct sock *sk,struct sk_buff *skb)
|
||||||
|
|
||||||
static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
|
static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
struct inet_request_sock *ireq;
|
|
||||||
struct dccp_sock dp;
|
struct dccp_sock dp;
|
||||||
struct request_sock *req;
|
struct request_sock *req;
|
||||||
struct dccp_request_sock *dreq;
|
struct dccp_request_sock *dreq;
|
||||||
|
@ -701,7 +700,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
|
||||||
if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
|
if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
|
||||||
goto drop;
|
goto drop;
|
||||||
|
|
||||||
req = inet6_reqsk_alloc(sk->sk_prot->rsk_prot);
|
req = inet6_reqsk_alloc(&dccp6_request_sock_ops);
|
||||||
if (req == NULL)
|
if (req == NULL)
|
||||||
goto drop;
|
goto drop;
|
||||||
|
|
||||||
|
@ -713,7 +712,6 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
|
||||||
goto drop_and_free;
|
goto drop_and_free;
|
||||||
|
|
||||||
ireq6 = inet6_rsk(req);
|
ireq6 = inet6_rsk(req);
|
||||||
ireq = inet_rsk(req);
|
|
||||||
ipv6_addr_copy(&ireq6->rmt_addr, &skb->nh.ipv6h->saddr);
|
ipv6_addr_copy(&ireq6->rmt_addr, &skb->nh.ipv6h->saddr);
|
||||||
ipv6_addr_copy(&ireq6->loc_addr, &skb->nh.ipv6h->daddr);
|
ipv6_addr_copy(&ireq6->loc_addr, &skb->nh.ipv6h->daddr);
|
||||||
req->rcv_wnd = dccp_feat_default_sequence_window;
|
req->rcv_wnd = dccp_feat_default_sequence_window;
|
||||||
|
@ -997,6 +995,10 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
|
||||||
if (sk->sk_state == DCCP_OPEN) { /* Fast path */
|
if (sk->sk_state == DCCP_OPEN) { /* Fast path */
|
||||||
if (dccp_rcv_established(sk, skb, dccp_hdr(skb), skb->len))
|
if (dccp_rcv_established(sk, skb, dccp_hdr(skb), skb->len))
|
||||||
goto reset;
|
goto reset;
|
||||||
|
if (opt_skb) {
|
||||||
|
/* This is where we would goto ipv6_pktoptions. */
|
||||||
|
__kfree_skb(opt_skb);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1021,6 +1023,10 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
|
||||||
|
|
||||||
if (dccp_rcv_state_process(sk, skb, dccp_hdr(skb), skb->len))
|
if (dccp_rcv_state_process(sk, skb, dccp_hdr(skb), skb->len))
|
||||||
goto reset;
|
goto reset;
|
||||||
|
if (opt_skb) {
|
||||||
|
/* This is where we would goto ipv6_pktoptions. */
|
||||||
|
__kfree_skb(opt_skb);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
reset:
|
reset:
|
||||||
|
|
|
@ -169,7 +169,6 @@ static __inline__ void rt6_release(struct rt6_info *rt)
|
||||||
|
|
||||||
static struct fib6_table fib6_main_tbl = {
|
static struct fib6_table fib6_main_tbl = {
|
||||||
.tb6_id = RT6_TABLE_MAIN,
|
.tb6_id = RT6_TABLE_MAIN,
|
||||||
.tb6_lock = RW_LOCK_UNLOCKED,
|
|
||||||
.tb6_root = {
|
.tb6_root = {
|
||||||
.leaf = &ip6_null_entry,
|
.leaf = &ip6_null_entry,
|
||||||
.fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO,
|
.fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO,
|
||||||
|
@ -187,6 +186,12 @@ static void fib6_link_table(struct fib6_table *tb)
|
||||||
{
|
{
|
||||||
unsigned int h;
|
unsigned int h;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize table lock at a single place to give lockdep a key,
|
||||||
|
* tables aren't visible prior to being linked to the list.
|
||||||
|
*/
|
||||||
|
rwlock_init(&tb->tb6_lock);
|
||||||
|
|
||||||
h = tb->tb6_id & (FIB_TABLE_HASHSZ - 1);
|
h = tb->tb6_id & (FIB_TABLE_HASHSZ - 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -199,7 +204,6 @@ static void fib6_link_table(struct fib6_table *tb)
|
||||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||||
static struct fib6_table fib6_local_tbl = {
|
static struct fib6_table fib6_local_tbl = {
|
||||||
.tb6_id = RT6_TABLE_LOCAL,
|
.tb6_id = RT6_TABLE_LOCAL,
|
||||||
.tb6_lock = RW_LOCK_UNLOCKED,
|
|
||||||
.tb6_root = {
|
.tb6_root = {
|
||||||
.leaf = &ip6_null_entry,
|
.leaf = &ip6_null_entry,
|
||||||
.fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO,
|
.fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO,
|
||||||
|
@ -213,7 +217,6 @@ static struct fib6_table *fib6_alloc_table(u32 id)
|
||||||
table = kzalloc(sizeof(*table), GFP_ATOMIC);
|
table = kzalloc(sizeof(*table), GFP_ATOMIC);
|
||||||
if (table != NULL) {
|
if (table != NULL) {
|
||||||
table->tb6_id = id;
|
table->tb6_id = id;
|
||||||
table->tb6_lock = RW_LOCK_UNLOCKED;
|
|
||||||
table->tb6_root.leaf = &ip6_null_entry;
|
table->tb6_root.leaf = &ip6_null_entry;
|
||||||
table->tb6_root.fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO;
|
table->tb6_root.fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO;
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,6 +170,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
|
||||||
return NET_XMIT_BYPASS;
|
return NET_XMIT_BYPASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skb_orphan(skb);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we need to duplicate packet, then re-insert at top of the
|
* If we need to duplicate packet, then re-insert at top of the
|
||||||
* qdisc tree, since parent queuer expects that only one
|
* qdisc tree, since parent queuer expects that only one
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue