summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorBlagovest Kolenichev <bkolenichev@codeaurora.org>2017-09-29 14:46:40 -0700
committerBlagovest Kolenichev <bkolenichev@codeaurora.org>2017-09-29 14:49:19 -0700
commitfda1654df897b537f5d33bda92ef7435b68c606f (patch)
tree0bf2b087d2e82b64bb360061f509195bdb0b5eef /net/ipv4
parent3e99b7f6eb0303ac4efec0ccff6e63e671ed8869 (diff)
parentd68ba9f11615ba0151440e3986ef6fb1991e88d4 (diff)
Merge android-4.4@d68ba9f (v4.4.89) into msm-4.4
* refs/heads/tmp-d68ba9f Linux 4.4.89 ftrace: Fix memleak when unregistering dynamic ops when tracing disabled bcache: fix bch_hprint crash and improve output bcache: fix for gc and write-back race bcache: Correct return value for sysfs attach errors bcache: correct cache_dirty_target in __update_writeback_rate() bcache: do not subtract sectors_to_gc for bypassed IO bcache: Fix leak of bdev reference bcache: initialize dirty stripes in flash_dev_run() media: uvcvideo: Prevent heap overflow when accessing mapped controls media: v4l2-compat-ioctl32: Fix timespec conversion PCI: shpchp: Enable bridge bus mastering if MSI is enabled ARC: Re-enable MMU upon Machine Check exception tracing: Apply trace_clock changes to instance max buffer ftrace: Fix selftest goto location on error scsi: qla2xxx: Fix an integer overflow in sysfs code scsi: sg: fixup infoleak when using SG_GET_REQUEST_TABLE scsi: sg: factor out sg_fill_request_table() scsi: sg: off by one in sg_ioctl() scsi: sg: use standard lists for sg_requests scsi: sg: remove 'save_scat_len' scsi: storvsc: fix memory leak on ring buffer busy scsi: megaraid_sas: Return pended IOCTLs with cmd_status MFI_STAT_WRONG_STATE in case adapter is dead scsi: megaraid_sas: Check valid aen class range to avoid kernel panic scsi: zfcp: trace high part of "new" 64 bit SCSI LUN scsi: zfcp: trace HBA FSF response by default on dismiss or timedout late response scsi: zfcp: fix payload with full FCP_RSP IU in SCSI trace records scsi: zfcp: fix missing trace records for early returns in TMF eh handlers scsi: zfcp: fix passing fsf_req to SCSI trace on TMF to correlate with HBA scsi: zfcp: fix capping of unsuccessful GPN_FT SAN response trace records scsi: zfcp: add handling for FCP_RESID_OVER to the fcp ingress path scsi: zfcp: fix queuecommand for scsi_eh commands when DIX enabled skd: Submit requests to firmware before triggering the doorbell skd: Avoid that module unloading triggers a use-after-free md/bitmap: disable bitmap_resize for file-backed bitmaps. block: Relax a check in blk_start_queue() powerpc: Fix DAR reporting when alignment handler faults ext4: fix quota inconsistency during orphan cleanup for read-only mounts ext4: fix incorrect quotaoff if the quota feature is enabled crypto: AF_ALG - remove SGL terminator indicator when chaining MIPS: math-emu: MINA.<D|S>: Fix some cases of infinity and zero inputs MIPS: math-emu: <MAXA|MINA>.<D|S>: Fix cases of both infinite inputs MIPS: math-emu: <MAXA|MINA>.<D|S>: Fix cases of input values with opposite signs MIPS: math-emu: <MAX|MIN>.<D|S>: Fix cases of both inputs negative MIPS: math-emu: <MAX|MAXA|MIN|MINA>.<D|S>: Fix cases of both inputs zero MIPS: math-emu: <MAX|MAXA|MIN|MINA>.<D|S>: Fix quiet NaN propagation Input: i8042 - add Gigabyte P57 to the keyboard reset table tty: fix __tty_insert_flip_char regression tty: improve tty_insert_flip_char() slow path tty: improve tty_insert_flip_char() fast path mm: prevent double decrease of nr_reserved_highatomic nfsd: Fix general protection fault in release_lock_stateid() md/raid5: release/flush io in raid5_do_work() x86/fsgsbase/64: Report FSBASE and GSBASE correctly in core dumps f2fs: check hot_data for roll-forward recovery ipv6: fix typo in fib6_net_exit() ipv6: fix memory leak with multiple tables during netns destruction gianfar: Fix Tx flow control deactivation Revert "net: fix percpu memory leaks" Revert "net: use lib/percpu_counter API for fragmentation mem accounting" tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0 Revert "net: phy: Correctly process PHY_HALTED in phy_stop_machine()" qlge: avoid memcpy buffer overflow ipv6: fix sparse warning on rt6i_node ipv6: add rcu grace period before freeing fib6_node ipv6: accept 64k - 1 packet length in ip6_find_1stfragopt() f2fs: fix a missing size change in f2fs_setattr f2fs: fix to access nullified flush_cmd_control pointer f2fs: free meta pages if sanity check for ckpt is failed f2fs: detect wrong layout f2fs: call sync_fs when f2fs is idle Revert "f2fs: use percpu_counter for # of dirty pages in inode" f2fs: return AOP_WRITEPAGE_ACTIVATE for writepage f2fs: do not activate auto_recovery for fallocated i_size f2fs: fix 32-bit build f2fs: fix incorrect free inode count in ->statfs f2fs: drop duplicate header timer.h f2fs: fix wrong AUTO_RECOVER condition f2fs: do not recover i_size if it's valid f2fs: fix fdatasync f2fs: fix to account total free nid correctly f2fs: fix an infinite loop when flush nodes in cp f2fs: don't wait writeback for datas during checkpoint f2fs: fix wrong written_valid_blocks counting f2fs: avoid BG_GC in f2fs_balance_fs f2fs: fix redundant block allocation f2fs: use err for f2fs_preallocate_blocks f2fs: support multiple devices f2fs: allow dio read for LFS mode f2fs: revert segment allocation for direct IO f2fs: return directly if block has been removed from the victim Revert "f2fs: do not recover from previous remained wrong dnodes" f2fs: remove checkpoint in f2fs_freeze f2fs: assign segments correctly for direct_io f2fs: fix wrong i_atime recovery f2fs: record inode updating status correctly f2fs: Trace reset zone events f2fs: Reset sequential zones on zoned block devices f2fs: Cache zoned block devices zone type f2fs: Do not allow adaptive mode for host-managed zoned block devices f2fs: Always enable discard for zoned blocks devices f2fs: Suppress discard warning message for zoned block devices f2fs: Check zoned block feature for host-managed zoned block devices f2fs: Use generic zoned block device terminology f2fs: Add missing break in switch-case f2fs: avoid infinite loop in the EIO case on recover_orphan_inodes f2fs: report error of f2fs_fill_dentries fs/crypto: catch up 4.9-rc6 f2fs: hide a maybe-uninitialized warning f2fs: remove percpu_count due to performance regression f2fs: make clean inodes when flushing inode page f2fs: keep dirty inodes selectively for checkpoint f2fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps f2fs: use BIO_MAX_PAGES for bio allocation f2fs: declare static function for __build_free_nids f2fs: call f2fs_balance_fs for setattr f2fs: count dirty inodes to flush node pages during checkpoint f2fs: avoid casted negative value as shrink count f2fs: don't interrupt free nids building during nid allocation f2fs: clean up free nid list operations f2fs: split free nid list f2fs: clear nlink if fail to add_link f2fs: fix sparse warnings f2fs: fix error handling in fsync_node_pages f2fs: fix to update largest extent under lock f2fs: be aware of extent beyond EOF in fiemap f2fs: don't miss any f2fs_balance_fs cases f2fs: add missing f2fs_balance_fs in f2fs_zero_range f2fs: give a chance to detach from dirty list f2fs: fix to release discard entries during checkpoint f2fs: exclude free nids building and allocation f2fs: fix to determine start_cp_addr by sbi->cur_cp_pack f2fs: fix overflow due to condition check order posix_acl: Clear SGID bit when setting file permissions f2fs: fix wrong sum_page pointer in f2fs_gc f2fs: backport from (4c1fad64 - Merge tag 'for-f2fs-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs) Revert "ANDROID: sched/tune: Initialize raw_spin_lock in boosted_groups" BACKPORT: partial: mm, oom_reaper: do not mmput synchronously from the oom reaper context FROMLIST: android: binder: Don't get mm from task FROMLIST: android: binder: Remove unused vma argument FROMLIST: android: binder: Drop lru lock in isolate callback ANDROID: configs: remove config fragments drivers: cpufreq_interactive: handle error for module load fail UPSTREAM: Fix build break in fork.c when THREAD_SIZE < PAGE_SIZE Conflicts: android/configs/android-base.cfg android/configs/android-recommended.cfg fs/f2fs/data.c fs/f2fs/f2fs.h fs/f2fs/super.c include/linux/mm_types.h include/linux/sched.h kernel/fork.c Change-Id: I21a427f17e8a1892a212df7c8707f74fb37ce400 Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/inet_fragment.c4
-rw-r--r--net/ipv4/ip_fragment.c12
-rw-r--r--net/ipv4/tcp.c4
3 files changed, 8 insertions, 12 deletions
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index fe144dae7372..c5fb2f694ed0 100644
--- a/net/ipv4/inet_fragment.c
+++ b/net/ipv4/inet_fragment.c
@@ -234,10 +234,8 @@ evict_again:
cond_resched();
if (read_seqretry(&f->rnd_seqlock, seq) ||
- percpu_counter_sum(&nf->mem))
+ sum_frag_mem_limit(nf))
goto evict_again;
-
- percpu_counter_destroy(&nf->mem);
}
EXPORT_SYMBOL(inet_frags_exit_net);
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index b8a0607dab96..e2e162432aa3 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -840,8 +840,6 @@ static void __init ip4_frags_ctl_register(void)
static int __net_init ipv4_frags_init_net(struct net *net)
{
- int res;
-
/* Fragment cache limits.
*
* The fragment memory accounting code, (tries to) account for
@@ -865,13 +863,9 @@ static int __net_init ipv4_frags_init_net(struct net *net)
*/
net->ipv4.frags.timeout = IP_FRAG_TIME;
- res = inet_frags_init_net(&net->ipv4.frags);
- if (res)
- return res;
- res = ip4_frags_ns_ctl_register(net);
- if (res)
- inet_frags_uninit_net(&net->ipv4.frags);
- return res;
+ inet_frags_init_net(&net->ipv4.frags);
+
+ return ip4_frags_ns_ctl_register(net);
}
static void __net_exit ipv4_frags_exit_net(struct net *net)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 9bdd7847ef3a..79203972bfc6 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2269,6 +2269,10 @@ int tcp_disconnect(struct sock *sk, int flags)
tcp_set_ca_state(sk, TCP_CA_Open);
tcp_clear_retrans(tp);
inet_csk_delack_init(sk);
+ /* Initialize rcv_mss to TCP_MIN_MSS to avoid division by 0
+ * issue in __tcp_select_window()
+ */
+ icsk->icsk_ack.rcv_mss = TCP_MIN_MSS;
tcp_init_send_head(sk);
memset(&tp->rx_opt, 0, sizeof(tp->rx_opt));
__sk_dst_reset(sk);