Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753095AbdHUJ3h (ORCPT ); Mon, 21 Aug 2017 05:29:37 -0400 Received: from mail-wr0-f178.google.com ([209.85.128.178]:38351 "EHLO mail-wr0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751811AbdHUJ33 (ORCPT ); Mon, 21 Aug 2017 05:29:29 -0400 Date: Mon, 21 Aug 2017 11:29:25 +0200 From: Corentin Labbe To: peppe.cavallaro@st.com, alexandre.torgue@st.com, davem@davemloft.net, netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [WARNING] stmmac: refcount_t: saturated; leaking memory Message-ID: <20170821092925.GB9458@Red> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7646 Lines: 111 Hello I got on all my stmmac boards the following warning: [12605.062840] ------------[ cut here ]------------ [12605.062956] WARNING: CPU: 0 PID: 15637 at /linux-next/lib/refcount.c:77 refcount_add_not_zero+0xa8/0xb8 [12605.062972] refcount_t: saturated; leaking memory. [12605.062987] Modules linked in: iptable_filter ip_tables x_tables nfnetlink_log nfnetlink sun8i_ce crypto_engine [12605.063122] CPU: 0 PID: 15637 Comm: kworker/0:1 Not tainted 4.13.0-rc5-next-20170817+ #403 [12605.063136] Hardware name: Allwinner sun8i Family [12605.063161] Workqueue: rpciod rpc_async_schedule [12605.063186] Backtrace: [12605.063222] [] (dump_backtrace) from [] (show_stack+0x18/0x1c) [12605.063241] r7:c0c51700 r6:00000000 r5:600d0013 r4:c0c51700 [12605.063262] [] (show_stack) from [] (dump_stack+0xac/0xd8) [12605.063283] [] (dump_stack) from [] (__warn+0xec/0x104) [12605.063304] r10:c064c3c8 r9:c0400ea8 r8:0000004d r7:00000009 r6:c0987468 r5:00000000 [12605.063319] r4:ed8cd7b0 r3:00040d00 [12605.063339] [] (__warn) from [] (warn_slowpath_fmt+0x40/0x48) [12605.063359] r9:ee2c5bb8 r8:ebf8e6c0 r7:c064c3c8 r6:ebf8ee40 r5:0a028725 r4:c0987440 [12605.063379] [] (warn_slowpath_fmt) from [] (refcount_add_not_zero+0xa8/0xb8) [12605.063395] r3:c0c5262c r2:c0987440 [12605.063408] r4:00000001 [12605.063427] [] (refcount_add_not_zero) from [] (refcount_add+0x10/0x50) [12605.063443] r5:0a028725 r4:ee5f4e80 [12605.063465] [] (refcount_add) from [] (tcp_gso_segment+0x448/0x47c) [12605.063486] [] (tcp_gso_segment) from [] (tcp4_gso_segment+0x4c/0xac) [12605.063506] r10:c08744bc r9:0000005e r8:00000000 r7:00000020 r6:00004833 r5:0000006c [12605.063520] r4:ee2c5bb8 [12605.063541] [] (tcp4_gso_segment) from [] (inet_gso_segment+0x1a0/0x330) [12605.063559] r7:00000000 r6:0000184e r5:0000006c r4:ee2c5bb8 [12605.063582] [] (inet_gso_segment) from [] (skb_mac_gso_segment+0xe8/0x1f4) [12605.063602] r10:ee842850 r9:ee9e8000 r8:c0671e8c r7:ee2c5bb8 r6:00000008 r5:00000020 [12605.063616] r4:00004833 [12605.063638] [] (skb_mac_gso_segment) from [] (__skb_gso_segment+0xd0/0x198) [12605.063657] r8:00000000 r7:00000020 r6:00004833 r5:00000001 r4:ee2c5bb8 [12605.063679] [] (__skb_gso_segment) from [] (validate_xmit_skb+0x124/0x2e4) [12605.063698] r9:ee9e8000 r8:00000000 r7:00000020 r6:00004833 r5:00000000 r4:ee2c5bb8 [12605.063720] [] (validate_xmit_skb) from [] (validate_xmit_skb_list+0x38/0x68) [12605.063740] r10:ee842850 r9:00000000 r8:00000000 r7:ee9e8000 r6:00000000 r5:ee2c5bb8 [12605.063754] r4:00000000 [12605.063777] [] (validate_xmit_skb_list) from [] (sch_direct_xmit+0x154/0x19c) [12605.063797] r9:00000000 r8:00000001 r7:ee9e8000 r6:ee91d800 r5:ee2c5bb8 r4:ee842800 [12605.063817] [] (sch_direct_xmit) from [] (__dev_queue_xmit+0x614/0x7ec) [12605.063836] r8:013ba711 r7:00000000 r6:00000bd4 r5:ee842800 r4:00000001 [12605.063858] [] (__dev_queue_xmit) from [] (dev_queue_xmit+0x14/0x18) [12605.063877] r10:00000000 r9:0000000e r8:ee2c5bb8 r7:ee84210c r6:00000000 r5:ee842144 [12605.063891] r4:ee842000 [12605.063913] [] (dev_queue_xmit) from [] (ip_finish_output2+0x2e8/0x758) [12605.063933] [] (ip_finish_output2) from [] (ip_finish_output+0x238/0x348) [12605.063953] r10:ee9e8000 r9:00000001 r8:000005dc r7:00000000 r6:c0c4a580 r5:ee336580 [12605.063966] r4:ee2c5bb8 [12605.063985] [] (ip_finish_output) from [] (ip_output+0x10c/0x30c) [12605.064005] r10:ee9e8000 r9:00000000 r8:00003eb6 r7:00000000 r6:00291fb3 r5:ee2c5bb8 [12605.064018] r4:ef7b1288 [12605.064037] [] (ip_output) from [] (ip_local_out+0x48/0x84) [12605.064057] r10:ee27f900 r9:00026900 r8:00026900 r7:00000000 r6:ee336580 r5:c0c4a580 [12605.064070] r4:ee2c5bb8 [12605.064089] [] (ip_local_out) from [] (ip_queue_xmit+0x1e8/0x634) [12605.064107] r7:00000000 r6:ee3368b0 r5:ee336580 r4:ee2c5bb8 [12605.064129] [] (ip_queue_xmit) from [] (tcp_transmit_skb+0x444/0x8e4) [12605.064149] r10:00000000 r9:00026900 r8:00026900 r7:00000000 r6:00000000 r5:ee2c5bb8 [12605.064163] r4:ee336580 [12605.064184] [] (tcp_transmit_skb) from [] (tcp_write_xmit+0x21c/0xfe0) [12605.064204] r9:000005a8 r8:0a02817d r7:00000000 r6:ee2c5b00 r5:00000b50 r4:ee336580 [12605.064225] [] (tcp_write_xmit) from [] (__tcp_push_pending_frames+0x3c/0xa4) [12605.064245] r10:000005a8 r9:00000000 r8:00000f03 r7:0a02817d r6:00008000 r5:ee2c5b00 [12605.064259] r4:ee336580 [12605.064280] [] (__tcp_push_pending_frames) from [] (tcp_push+0xcc/0x138) [12605.064294] r4:ee336580 [12605.064314] [] (tcp_push) from [] (do_tcp_sendpages+0x568/0x5b0) [12605.064331] r7:0000c040 r6:00000f03 r5:ee2c5b00 r4:ee336580 [12605.064351] [] (do_tcp_sendpages) from [] (tcp_sendpage_locked+0xac/0xc8) [12605.064371] r10:ed8cddf4 r9:00000f03 r8:00000f03 r7:00000000 r6:00000008 r5:eff47880 [12605.064385] r4:ee336580 [12605.064405] [] (tcp_sendpage_locked) from [] (tcp_sendpage+0x44/0x5c) [12605.064423] r7:00000000 r6:eff47880 r5:0000c040 r4:ee336580 [12605.064443] [] (tcp_sendpage) from [] (inet_sendpage+0x6c/0x244) [12605.064461] r8:00000000 r7:eff47880 r6:eec5b980 r5:c06400dc r4:ee336580 [12605.064482] [] (inet_sendpage) from [] (xs_sendpages+0x1e4/0x230) [12605.064502] r10:ed8cddf4 r9:00001000 r8:ee1893bc r7:eec5b980 r6:ee11d304 r5:00000000 [12605.064515] r4:00000f03 [12605.064535] [] (xs_sendpages) from [] (xs_tcp_send_request+0xa0/0x198) [12605.064555] r10:c09c77c4 r9:ee189200 r8:c0c52990 r7:ed807000 r6:ee11d304 r5:00000000 [12605.064568] r4:ee11d300 [12605.064588] [] (xs_tcp_send_request) from [] (xprt_transmit+0x4c/0x22c) [12605.064607] r10:00000001 r9:00000000 r8:ed8073a4 r7:ee11d374 r6:ee189200 r5:ee11d300 [12605.064621] r4:ed807000 [12605.064643] [] (xprt_transmit) from [] (call_transmit+0x168/0x200) [12605.064662] r9:00000000 r8:1462b931 r7:ee11d300 r6:00004001 r5:ee11d300 r4:ee189200 [12605.064683] [] (call_transmit) from [] (__rpc_execute+0x60/0x27c) [12605.064702] r8:c06c5d28 r7:c06c5994 r6:00000001 r5:00000000 r4:ee189200 [12605.064722] [] (__rpc_execute) from [] (rpc_async_schedule+0x14/0x18) [12605.064742] r10:00000001 r9:00000000 r8:00000000 r7:ef7b1700 r6:ef7ac0c0 r5:ee694700 [12605.064756] r4:ee189224 [12605.064777] [] (rpc_async_schedule) from [] (process_one_work+0x25c/0x524) [12605.064796] [] (process_one_work) from [] (worker_thread+0x58/0x588) [12605.064816] r10:ee694700 r9:ed8cc000 r8:ef7ac0f8 r7:c0c04d00 r6:00000008 r5:ee694718 [12605.064830] r4:ef7ac0c0 [12605.064850] [] (worker_thread) from [] (kthread+0x174/0x1b0) [12605.064870] r10:ee694700 r9:ee627da8 r8:ee510480 r7:ed8cc000 r6:ef3e5480 r5:00000000 [12605.064884] r4:ee510400 [12605.064906] [] (kthread) from [] (ret_from_fork+0x14/0x3c) [12605.064925] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c01483a0 [12605.064939] r4:ef3e5480 [12605.064954] ---[ end trace c8c0d6caaf57fa10 ]--- So basicly it means that stmmac leaks skb ? Thanks Regards