diff options
author | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
commit | 05e97a9eda72d58dba293857df6aac62584ef99a (patch) | |
tree | e86e692f26d4879ff2210c54722e2b7780210249 /net/ipv4/fib_frontend.c | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
parent | d4ed3b9015b5eebc90d629579d9e7944607cbae5 (diff) |
Merge tag 'nand/fixes-for-4.12-rc3' of git://git.infradead.org/linux-mtd into MTD
From Boris:
"""
This pull request contains several fixes to the core and the tango
driver.
tango fixes:
* Add missing MODULE_DEVICE_TABLE() in tango_nand.c
* Update the number of corrected bitflips
core fixes:
* Fix a long standing memory leak in nand_scan_tail()
* Fix several bugs introduced by the per-vendor init/detection
infrastructure (introduced in 4.12)
* Add a static specifier to nand_ooblayout_lp_hamming_ops definition
"""
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r-- | net/ipv4/fib_frontend.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 39bd1edee676..83e3ed258467 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -763,7 +763,7 @@ static int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb) | |||
763 | unsigned int e = 0, s_e; | 763 | unsigned int e = 0, s_e; |
764 | struct fib_table *tb; | 764 | struct fib_table *tb; |
765 | struct hlist_head *head; | 765 | struct hlist_head *head; |
766 | int dumped = 0; | 766 | int dumped = 0, err; |
767 | 767 | ||
768 | if (nlmsg_len(cb->nlh) >= sizeof(struct rtmsg) && | 768 | if (nlmsg_len(cb->nlh) >= sizeof(struct rtmsg) && |
769 | ((struct rtmsg *) nlmsg_data(cb->nlh))->rtm_flags & RTM_F_CLONED) | 769 | ((struct rtmsg *) nlmsg_data(cb->nlh))->rtm_flags & RTM_F_CLONED) |
@@ -783,20 +783,27 @@ static int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb) | |||
783 | if (dumped) | 783 | if (dumped) |
784 | memset(&cb->args[2], 0, sizeof(cb->args) - | 784 | memset(&cb->args[2], 0, sizeof(cb->args) - |
785 | 2 * sizeof(cb->args[0])); | 785 | 2 * sizeof(cb->args[0])); |
786 | if (fib_table_dump(tb, skb, cb) < 0) | 786 | err = fib_table_dump(tb, skb, cb); |
787 | goto out; | 787 | if (err < 0) { |
788 | if (likely(skb->len)) | ||
789 | goto out; | ||
790 | |||
791 | goto out_err; | ||
792 | } | ||
788 | dumped = 1; | 793 | dumped = 1; |
789 | next: | 794 | next: |
790 | e++; | 795 | e++; |
791 | } | 796 | } |
792 | } | 797 | } |
793 | out: | 798 | out: |
799 | err = skb->len; | ||
800 | out_err: | ||
794 | rcu_read_unlock(); | 801 | rcu_read_unlock(); |
795 | 802 | ||
796 | cb->args[1] = e; | 803 | cb->args[1] = e; |
797 | cb->args[0] = h; | 804 | cb->args[0] = h; |
798 | 805 | ||
799 | return skb->len; | 806 | return err; |
800 | } | 807 | } |
801 | 808 | ||
802 | /* Prepare and feed intra-kernel routing request. | 809 | /* Prepare and feed intra-kernel routing request. |