diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-02 18:22:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-02 18:22:20 -0400 |
commit | 856fc004b82ae31846b3037558ec1b2a6286e629 (patch) | |
tree | 189bc08337771f9318b3b789f44949c84bd9ed7e | |
parent | 5c0efdbc1b1891857659594741a4cb6405b63126 (diff) | |
parent | 84565070e442583ec67fb08a5962c80203e491c3 (diff) |
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:
[TCP]: Do receiver-side SWS avoidance for rcvbuf < MSS.
[BNX2]: Fix nvram write logic.
[IPv6]: Fix incorrect length check in rawv6_sendmsg()
[NET_SCHED]: cls_basic: fix memory leak in basic_destroy
[NET]: Change "not found" return value for rule lookup
-rw-r--r-- | drivers/net/bnx2.c | 34 | ||||
-rw-r--r-- | net/core/fib_rules.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 3 | ||||
-rw-r--r-- | net/ipv6/raw.c | 4 | ||||
-rw-r--r-- | net/ipv6/udp.c | 2 | ||||
-rw-r--r-- | net/sched/cls_basic.c | 1 |
6 files changed, 24 insertions, 22 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index d43fe2863095..0b7aded8dcfd 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -54,8 +54,8 @@ | |||
54 | 54 | ||
55 | #define DRV_MODULE_NAME "bnx2" | 55 | #define DRV_MODULE_NAME "bnx2" |
56 | #define PFX DRV_MODULE_NAME ": " | 56 | #define PFX DRV_MODULE_NAME ": " |
57 | #define DRV_MODULE_VERSION "1.5.6" | 57 | #define DRV_MODULE_VERSION "1.5.7" |
58 | #define DRV_MODULE_RELDATE "March 28, 2007" | 58 | #define DRV_MODULE_RELDATE "March 29, 2007" |
59 | 59 | ||
60 | #define RUN_AT(x) (jiffies + (x)) | 60 | #define RUN_AT(x) (jiffies + (x)) |
61 | 61 | ||
@@ -3099,20 +3099,18 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
3099 | 3099 | ||
3100 | if ((align_start = (offset32 & 3))) { | 3100 | if ((align_start = (offset32 & 3))) { |
3101 | offset32 &= ~3; | 3101 | offset32 &= ~3; |
3102 | len32 += (4 - align_start); | 3102 | len32 += align_start; |
3103 | if (len32 < 4) | ||
3104 | len32 = 4; | ||
3103 | if ((rc = bnx2_nvram_read(bp, offset32, start, 4))) | 3105 | if ((rc = bnx2_nvram_read(bp, offset32, start, 4))) |
3104 | return rc; | 3106 | return rc; |
3105 | } | 3107 | } |
3106 | 3108 | ||
3107 | if (len32 & 3) { | 3109 | if (len32 & 3) { |
3108 | if ((len32 > 4) || !align_start) { | 3110 | align_end = 4 - (len32 & 3); |
3109 | align_end = 4 - (len32 & 3); | 3111 | len32 += align_end; |
3110 | len32 += align_end; | 3112 | if ((rc = bnx2_nvram_read(bp, offset32 + len32 - 4, end, 4))) |
3111 | if ((rc = bnx2_nvram_read(bp, offset32 + len32 - 4, | 3113 | return rc; |
3112 | end, 4))) { | ||
3113 | return rc; | ||
3114 | } | ||
3115 | } | ||
3116 | } | 3114 | } |
3117 | 3115 | ||
3118 | if (align_start || align_end) { | 3116 | if (align_start || align_end) { |
@@ -3187,17 +3185,17 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
3187 | if ((rc = bnx2_enable_nvram_write(bp)) != 0) | 3185 | if ((rc = bnx2_enable_nvram_write(bp)) != 0) |
3188 | goto nvram_write_end; | 3186 | goto nvram_write_end; |
3189 | 3187 | ||
3190 | /* Erase the page */ | ||
3191 | if ((rc = bnx2_nvram_erase_page(bp, page_start)) != 0) | ||
3192 | goto nvram_write_end; | ||
3193 | |||
3194 | /* Re-enable the write again for the actual write */ | ||
3195 | bnx2_enable_nvram_write(bp); | ||
3196 | |||
3197 | /* Loop to write back the buffer data from page_start to | 3188 | /* Loop to write back the buffer data from page_start to |
3198 | * data_start */ | 3189 | * data_start */ |
3199 | i = 0; | 3190 | i = 0; |
3200 | if (bp->flash_info->buffered == 0) { | 3191 | if (bp->flash_info->buffered == 0) { |
3192 | /* Erase the page */ | ||
3193 | if ((rc = bnx2_nvram_erase_page(bp, page_start)) != 0) | ||
3194 | goto nvram_write_end; | ||
3195 | |||
3196 | /* Re-enable the write again for the actual write */ | ||
3197 | bnx2_enable_nvram_write(bp); | ||
3198 | |||
3201 | for (addr = page_start; addr < data_start; | 3199 | for (addr = page_start; addr < data_start; |
3202 | addr += 4, i += 4) { | 3200 | addr += 4, i += 4) { |
3203 | 3201 | ||
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index d011819a8058..7174ced75efc 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c | |||
@@ -143,7 +143,7 @@ int fib_rules_lookup(struct fib_rules_ops *ops, struct flowi *fl, | |||
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | ||
146 | err = -ENETUNREACH; | 146 | err = -ESRCH; |
147 | out: | 147 | out: |
148 | rcu_read_unlock(); | 148 | rcu_read_unlock(); |
149 | 149 | ||
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index dc151139b5af..688b95594f2e 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1607,6 +1607,9 @@ u32 __tcp_select_window(struct sock *sk) | |||
1607 | */ | 1607 | */ |
1608 | if (window <= free_space - mss || window > free_space) | 1608 | if (window <= free_space - mss || window > free_space) |
1609 | window = (free_space/mss)*mss; | 1609 | window = (free_space/mss)*mss; |
1610 | else if (mss == full_space && | ||
1611 | free_space > window + full_space/2) | ||
1612 | window = free_space; | ||
1610 | } | 1613 | } |
1611 | 1614 | ||
1612 | return window; | 1615 | return window; |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 306d5d83c068..203e069e7fe9 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -687,9 +687,9 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
687 | int err; | 687 | int err; |
688 | 688 | ||
689 | /* Rough check on arithmetic overflow, | 689 | /* Rough check on arithmetic overflow, |
690 | better check is made in ip6_build_xmit | 690 | better check is made in ip6_append_data(). |
691 | */ | 691 | */ |
692 | if (len < 0) | 692 | if (len > INT_MAX) |
693 | return -EMSGSIZE; | 693 | return -EMSGSIZE; |
694 | 694 | ||
695 | /* Mirror BSD error message compatibility */ | 695 | /* Mirror BSD error message compatibility */ |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 0ad471909881..f590db57a7c9 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -615,7 +615,7 @@ do_udp_sendmsg: | |||
615 | return udp_sendmsg(iocb, sk, msg, len); | 615 | return udp_sendmsg(iocb, sk, msg, len); |
616 | 616 | ||
617 | /* Rough check on arithmetic overflow, | 617 | /* Rough check on arithmetic overflow, |
618 | better check is made in ip6_build_xmit | 618 | better check is made in ip6_append_data(). |
619 | */ | 619 | */ |
620 | if (len > INT_MAX - sizeof(struct udphdr)) | 620 | if (len > INT_MAX - sizeof(struct udphdr)) |
621 | return -EMSGSIZE; | 621 | return -EMSGSIZE; |
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c index 70fe36eb66a2..4a91f082a81d 100644 --- a/net/sched/cls_basic.c +++ b/net/sched/cls_basic.c | |||
@@ -109,6 +109,7 @@ static void basic_destroy(struct tcf_proto *tp) | |||
109 | list_del(&f->link); | 109 | list_del(&f->link); |
110 | basic_delete_filter(tp, f); | 110 | basic_delete_filter(tp, f); |
111 | } | 111 | } |
112 | kfree(head); | ||
112 | } | 113 | } |
113 | 114 | ||
114 | static int basic_delete(struct tcf_proto *tp, unsigned long arg) | 115 | static int basic_delete(struct tcf_proto *tp, unsigned long arg) |