[Kernel-packages] [Bug 1831751] Re: rtlwifi: aggresive memory leak

2019-06-27 Thread TJ
Upstream commit:

commit 8cfa272b0d321160ebb5b45073e39ef0a6ad73f2
Author: Larry Finger 
Date:   Sat Nov 17 20:55:03 2018 -0600

rtlwifi: Fix leak of skb when processing C2H_BT_INFO

With commit 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing
C2H_BT_INFO"), calling rtl_c2hcmd_enqueue() with rtl_c2h_fast_cmd() true,
the routine returns without freeing that skb, thereby leaking it.

This issue has been discussed at 
https://github.com/lwfinger/rtlwifi_new/issues/401
and the fix tested there.

Fixes: 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing 
C2H_BT_INFO")
Reported-and-tested-by: Francisco Machado Magalhães Neto 



** Summary changed:

- rtlwifi: aggresive memory leak
+ rtlwifi: aggressive memory leak

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1831751

Title:
  rtlwifi: aggressive memory leak

Status in Linux:
  Unknown
Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Hey, i got a memory leak on Ubuntu 18.04.2 even in console mode (no X/GUI) 
the memory usage grows slowly to take all the available RAM when i let the 
computer running over the night (with just top and irssi), and i have to reboot 
to get things back to normal. I didn't have this problem on Ubuntu 17.10 but i 
was still flooded with message about pci aer taking lots of disk space in the 
logs, but pci=noaer fixed this problem and i had no memory leak.
  The computer is a common laptop: HP Pavilion.

  ---
  Kernel log gets spammed with AERs so owner uses "pci=noaer"; that was briefly 
disabled to capture the AERs.

  Memory seems to be consumed (~6 GB of 8GB) just by leaving PC
  overnight booted just to console (systemd.unit=multi-user.target).

  The memory leak doesn't affect Windows but owner is going to check
  Windows Event Log for signs of AERs being logged.

  ---

  Original suspect of AER is not guilty.

  This turns out to be a bug in the rtlwifi driver where in some rare
  circumstances it fails to free an sk_buf.

  Reporter has been testing a DKMS build of rtlwfi with the fix applied
  and confirms it solves the issue.

  Upstream has the commit. Can we get this cherry-picked into all
  releases?

  commit 8cfa272b0d321160ebb5b45073e39ef0a6ad73f2
  Author: Larry Finger 
  Date:   Sat Nov 17 20:55:03 2018 -0600

  rtlwifi: Fix leak of skb when processing C2H_BT_INFO
  
  With commit 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing
  C2H_BT_INFO"), calling rtl_c2hcmd_enqueue() with rtl_c2h_fast_cmd() true,
  the routine returns without freeing that skb, thereby leaking it.
  
  This issue has been discussed at 
https://github.com/lwfinger/rtlwifi_new/issues/401
  and the fix tested there.
  
  Fixes: 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing 
C2H_BT_INFO")
  Reported-and-tested-by: Francisco Machado Magalhães Neto 

  Cc: Francisco Machado Magalhães Neto 
  Cc: Ping-Ke Shih 
  Cc: Stable  # 4.18+
  Signed-off-by: Larry Finger 
  Signed-off-by: Kalle Valo 

  diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c 
b/drivers/net/wireless/realtek/rtlwifi/base.c
  index f4122c8fdd97..ef9b502ce576 100644
  --- a/drivers/net/wireless/realtek/rtlwifi/base.c
  +++ b/drivers/net/wireless/realtek/rtlwifi/base.c
  @@ -2289,6 +2289,7 @@ void rtl_c2hcmd_enqueue(struct ieee80211_hw *hw, struct 
sk_buff *skb)
   
  if (rtl_c2h_fast_cmd(hw, skb)) {
  rtl_c2h_content_parsing(hw, skb);
  +   kfree_skb(skb);
  return;
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1831751/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1831751] Re: rtlwifi: aggresive memory leak

2019-06-13 Thread Kai-Heng Feng
TJ,

Will you send the patch to kernel-team mailing list?

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1831751

Title:
  rtlwifi: aggresive memory leak

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Hey, i got a memory leak on Ubuntu 18.04.2 even in console mode (no X/GUI) 
the memory usage grows slowly to take all the available RAM when i let the 
computer running over the night (with just top and irssi), and i have to reboot 
to get things back to normal. I didn't have this problem on Ubuntu 17.10 but i 
was still flooded with message about pci aer taking lots of disk space in the 
logs, but pci=noaer fixed this problem and i had no memory leak.
  The computer is a common laptop: HP Pavilion.

  ---
  Kernel log gets spammed with AERs so owner uses "pci=noaer"; that was briefly 
disabled to capture the AERs.

  Memory seems to be consumed (~6 GB of 8GB) just by leaving PC
  overnight booted just to console (systemd.unit=multi-user.target).

  The memory leak doesn't affect Windows but owner is going to check
  Windows Event Log for signs of AERs being logged.

  ---

  Original suspect of AER is not guilty.

  This turns out to be a bug in the rtlwifi driver where in some rare
  circumstances it fails to free an sk_buf.

  Reporter has been testing a DKMS build of rtlwfi with the fix applied
  and confirms it solves the issue.

  Upstream has the commit. Can we get this cherry-picked into all
  releases?

  commit 8cfa272b0d321160ebb5b45073e39ef0a6ad73f2
  Author: Larry Finger 
  Date:   Sat Nov 17 20:55:03 2018 -0600

  rtlwifi: Fix leak of skb when processing C2H_BT_INFO
  
  With commit 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing
  C2H_BT_INFO"), calling rtl_c2hcmd_enqueue() with rtl_c2h_fast_cmd() true,
  the routine returns without freeing that skb, thereby leaking it.
  
  This issue has been discussed at 
https://github.com/lwfinger/rtlwifi_new/issues/401
  and the fix tested there.
  
  Fixes: 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing 
C2H_BT_INFO")
  Reported-and-tested-by: Francisco Machado Magalhães Neto 

  Cc: Francisco Machado Magalhães Neto 
  Cc: Ping-Ke Shih 
  Cc: Stable  # 4.18+
  Signed-off-by: Larry Finger 
  Signed-off-by: Kalle Valo 

  diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c 
b/drivers/net/wireless/realtek/rtlwifi/base.c
  index f4122c8fdd97..ef9b502ce576 100644
  --- a/drivers/net/wireless/realtek/rtlwifi/base.c
  +++ b/drivers/net/wireless/realtek/rtlwifi/base.c
  @@ -2289,6 +2289,7 @@ void rtl_c2hcmd_enqueue(struct ieee80211_hw *hw, struct 
sk_buff *skb)
   
  if (rtl_c2h_fast_cmd(hw, skb)) {
  rtl_c2h_content_parsing(hw, skb);
  +   kfree_skb(skb);
  return;
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1831751/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1831751] Re: rtlwifi: aggresive memory leak

2019-06-13 Thread TJ
** Changed in: linux (Ubuntu)
 Assignee: TJ (tj) => (unassigned)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1831751

Title:
  rtlwifi: aggresive memory leak

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Hey, i got a memory leak on Ubuntu 18.04.2 even in console mode (no X/GUI) 
the memory usage grows slowly to take all the available RAM when i let the 
computer running over the night (with just top and irssi), and i have to reboot 
to get things back to normal. I didn't have this problem on Ubuntu 17.10 but i 
was still flooded with message about pci aer taking lots of disk space in the 
logs, but pci=noaer fixed this problem and i had no memory leak.
  The computer is a common laptop: HP Pavilion.

  ---
  Kernel log gets spammed with AERs so owner uses "pci=noaer"; that was briefly 
disabled to capture the AERs.

  Memory seems to be consumed (~6 GB of 8GB) just by leaving PC
  overnight booted just to console (systemd.unit=multi-user.target).

  The memory leak doesn't affect Windows but owner is going to check
  Windows Event Log for signs of AERs being logged.

  ---

  Original suspect of AER is not guilty.

  This turns out to be a bug in the rtlwifi driver where in some rare
  circumstances it fails to free an sk_buf.

  Reporter has been testing a DKMS build of rtlwfi with the fix applied
  and confirms it solves the issue.

  Upstream has the commit. Can we get this cherry-picked into all
  releases?

  commit 8cfa272b0d321160ebb5b45073e39ef0a6ad73f2
  Author: Larry Finger 
  Date:   Sat Nov 17 20:55:03 2018 -0600

  rtlwifi: Fix leak of skb when processing C2H_BT_INFO
  
  With commit 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing
  C2H_BT_INFO"), calling rtl_c2hcmd_enqueue() with rtl_c2h_fast_cmd() true,
  the routine returns without freeing that skb, thereby leaking it.
  
  This issue has been discussed at 
https://github.com/lwfinger/rtlwifi_new/issues/401
  and the fix tested there.
  
  Fixes: 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing 
C2H_BT_INFO")
  Reported-and-tested-by: Francisco Machado Magalhães Neto 

  Cc: Francisco Machado Magalhães Neto 
  Cc: Ping-Ke Shih 
  Cc: Stable  # 4.18+
  Signed-off-by: Larry Finger 
  Signed-off-by: Kalle Valo 

  diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c 
b/drivers/net/wireless/realtek/rtlwifi/base.c
  index f4122c8fdd97..ef9b502ce576 100644
  --- a/drivers/net/wireless/realtek/rtlwifi/base.c
  +++ b/drivers/net/wireless/realtek/rtlwifi/base.c
  @@ -2289,6 +2289,7 @@ void rtl_c2hcmd_enqueue(struct ieee80211_hw *hw, struct 
sk_buff *skb)
   
  if (rtl_c2h_fast_cmd(hw, skb)) {
  rtl_c2h_content_parsing(hw, skb);
  +   kfree_skb(skb);
  return;
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1831751/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1831751] Re: rtlwifi: aggresive memory leak

2019-06-11 Thread Daniel van Vugt
** Tags added: bionic

** Changed in: linux (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1831751

Title:
  rtlwifi: aggresive memory leak

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Hey, i got a memory leak on Ubuntu 18.04.2 even in console mode (no X/GUI) 
the memory usage grows slowly to take all the available RAM when i let the 
computer running over the night (with just top and irssi), and i have to reboot 
to get things back to normal. I didn't have this problem on Ubuntu 17.10 but i 
was still flooded with message about pci aer taking lots of disk space in the 
logs, but pci=noaer fixed this problem and i had no memory leak.
  The computer is a common laptop: HP Pavilion.

  ---
  Kernel log gets spammed with AERs so owner uses "pci=noaer"; that was briefly 
disabled to capture the AERs.

  Memory seems to be consumed (~6 GB of 8GB) just by leaving PC
  overnight booted just to console (systemd.unit=multi-user.target).

  The memory leak doesn't affect Windows but owner is going to check
  Windows Event Log for signs of AERs being logged.

  ---

  Original suspect of AER is not guilty.

  This turns out to be a bug in the rtlwifi driver where in some rare
  circumstances it fails to free an sk_buf.

  Reporter has been testing a DKMS build of rtlwfi with the fix applied
  and confirms it solves the issue.

  Upstream has the commit. Can we get this cherry-picked into all
  releases?

  commit 8cfa272b0d321160ebb5b45073e39ef0a6ad73f2
  Author: Larry Finger 
  Date:   Sat Nov 17 20:55:03 2018 -0600

  rtlwifi: Fix leak of skb when processing C2H_BT_INFO
  
  With commit 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing
  C2H_BT_INFO"), calling rtl_c2hcmd_enqueue() with rtl_c2h_fast_cmd() true,
  the routine returns without freeing that skb, thereby leaking it.
  
  This issue has been discussed at 
https://github.com/lwfinger/rtlwifi_new/issues/401
  and the fix tested there.
  
  Fixes: 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing 
C2H_BT_INFO")
  Reported-and-tested-by: Francisco Machado Magalhães Neto 

  Cc: Francisco Machado Magalhães Neto 
  Cc: Ping-Ke Shih 
  Cc: Stable  # 4.18+
  Signed-off-by: Larry Finger 
  Signed-off-by: Kalle Valo 

  diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c 
b/drivers/net/wireless/realtek/rtlwifi/base.c
  index f4122c8fdd97..ef9b502ce576 100644
  --- a/drivers/net/wireless/realtek/rtlwifi/base.c
  +++ b/drivers/net/wireless/realtek/rtlwifi/base.c
  @@ -2289,6 +2289,7 @@ void rtl_c2hcmd_enqueue(struct ieee80211_hw *hw, struct 
sk_buff *skb)
   
  if (rtl_c2h_fast_cmd(hw, skb)) {
  rtl_c2h_content_parsing(hw, skb);
  +   kfree_skb(skb);
  return;
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1831751/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1831751] Re: rtlwifi: aggresive memory leak

2019-06-07 Thread TJ
** Changed in: linux (Ubuntu)
   Status: In Progress => Confirmed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1831751

Title:
  rtlwifi: aggresive memory leak

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Hey, i got a memory leak on Ubuntu 18.04.2 even in console mode (no X/GUI) 
the memory usage grows slowly to take all the available RAM when i let the 
computer running over the night (with just top and irssi), and i have to reboot 
to get things back to normal. I didn't have this problem on Ubuntu 17.10 but i 
was still flooded with message about pci aer taking lots of disk space in the 
logs, but pci=noaer fixed this problem and i had no memory leak.
  The computer is a common laptop: HP Pavilion.

  ---
  Kernel log gets spammed with AERs so owner uses "pci=noaer"; that was briefly 
disabled to capture the AERs.

  Memory seems to be consumed (~6 GB of 8GB) just by leaving PC
  overnight booted just to console (systemd.unit=multi-user.target).

  The memory leak doesn't affect Windows but owner is going to check
  Windows Event Log for signs of AERs being logged.

  ---

  Original suspect of AER is not guilty.

  This turns out to be a bug in the rtlwifi driver where in some rare
  circumstances it fails to free an sk_buf.

  Reporter has been testing a DKMS build of rtlwfi with the fix applied
  and confirms it solves the issue.

  Upstream has the commit. Can we get this cherry-picked into all
  releases?

  commit 8cfa272b0d321160ebb5b45073e39ef0a6ad73f2
  Author: Larry Finger 
  Date:   Sat Nov 17 20:55:03 2018 -0600

  rtlwifi: Fix leak of skb when processing C2H_BT_INFO
  
  With commit 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing
  C2H_BT_INFO"), calling rtl_c2hcmd_enqueue() with rtl_c2h_fast_cmd() true,
  the routine returns without freeing that skb, thereby leaking it.
  
  This issue has been discussed at 
https://github.com/lwfinger/rtlwifi_new/issues/401
  and the fix tested there.
  
  Fixes: 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing 
C2H_BT_INFO")
  Reported-and-tested-by: Francisco Machado Magalhães Neto 

  Cc: Francisco Machado Magalhães Neto 
  Cc: Ping-Ke Shih 
  Cc: Stable  # 4.18+
  Signed-off-by: Larry Finger 
  Signed-off-by: Kalle Valo 

  diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c 
b/drivers/net/wireless/realtek/rtlwifi/base.c
  index f4122c8fdd97..ef9b502ce576 100644
  --- a/drivers/net/wireless/realtek/rtlwifi/base.c
  +++ b/drivers/net/wireless/realtek/rtlwifi/base.c
  @@ -2289,6 +2289,7 @@ void rtl_c2hcmd_enqueue(struct ieee80211_hw *hw, struct 
sk_buff *skb)
   
  if (rtl_c2h_fast_cmd(hw, skb)) {
  rtl_c2h_content_parsing(hw, skb);
  +   kfree_skb(skb);
  return;
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1831751/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1831751] Re: rtlwifi: aggresive memory leak

2019-06-07 Thread roussel geoffrey
Ok the bug is fixed, it was in fact the same issue as discussed here:

https://github.com/lwfinger/rtlwifi_new/issues/401

And the fix:

https://github.com/0day-
ci/linux/commit/3e10e17914a56b27007604880d6de7e7ff241e14

Rebuilding the rtlwifi module with the patch fixed the problem, memory is 
stable not leaking anymore!
Thanks a lot #ubuntu-discuss and especially TJ-!

** Bug watch added: github.com/lwfinger/rtlwifi_new/issues #401
   https://github.com/lwfinger/rtlwifi_new/issues/401

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1831751

Title:
  rtlwifi: aggresive memory leak

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Hey, i got a memory leak on Ubuntu 18.04.2 even in console mode (no X/GUI) 
the memory usage grows slowly to take all the available RAM when i let the 
computer running over the night (with just top and irssi), and i have to reboot 
to get things back to normal. I didn't have this problem on Ubuntu 17.10 but i 
was still flooded with message about pci aer taking lots of disk space in the 
logs, but pci=noaer fixed this problem and i had no memory leak.
  The computer is a common laptop: HP Pavilion.

  ---
  Kernel log gets spammed with AERs so owner uses "pci=noaer"; that was briefly 
disabled to capture the AERs.

  Memory seems to be consumed (~6 GB of 8GB) just by leaving PC
  overnight booted just to console (systemd.unit=multi-user.target).

  The memory leak doesn't affect Windows but owner is going to check
  Windows Event Log for signs of AERs being logged.

  ---

  Original suspect of AER is not guilty.

  This turns out to be a bug in the rtlwifi driver where in some rare
  circumstances it fails to free an sk_buf.

  Reporter has been testing a DKMS build of rtlwfi with the fix applied
  and confirms it solves the issue.

  Upstream has the commit. Can we get this cherry-picked into all
  releases?

  commit 8cfa272b0d321160ebb5b45073e39ef0a6ad73f2
  Author: Larry Finger 
  Date:   Sat Nov 17 20:55:03 2018 -0600

  rtlwifi: Fix leak of skb when processing C2H_BT_INFO
  
  With commit 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing
  C2H_BT_INFO"), calling rtl_c2hcmd_enqueue() with rtl_c2h_fast_cmd() true,
  the routine returns without freeing that skb, thereby leaking it.
  
  This issue has been discussed at 
https://github.com/lwfinger/rtlwifi_new/issues/401
  and the fix tested there.
  
  Fixes: 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing 
C2H_BT_INFO")
  Reported-and-tested-by: Francisco Machado Magalhães Neto 

  Cc: Francisco Machado Magalhães Neto 
  Cc: Ping-Ke Shih 
  Cc: Stable  # 4.18+
  Signed-off-by: Larry Finger 
  Signed-off-by: Kalle Valo 

  diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c 
b/drivers/net/wireless/realtek/rtlwifi/base.c
  index f4122c8fdd97..ef9b502ce576 100644
  --- a/drivers/net/wireless/realtek/rtlwifi/base.c
  +++ b/drivers/net/wireless/realtek/rtlwifi/base.c
  @@ -2289,6 +2289,7 @@ void rtl_c2hcmd_enqueue(struct ieee80211_hw *hw, struct 
sk_buff *skb)
   
  if (rtl_c2h_fast_cmd(hw, skb)) {
  rtl_c2h_content_parsing(hw, skb);
  +   kfree_skb(skb);
  return;
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1831751/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1831751] Re: rtlwifi: aggresive memory leak

2019-06-07 Thread TJ
** Description changed:

  Hey, i got a memory leak on Ubuntu 18.04.2 even in console mode (no X/GUI) 
the memory usage grows slowly to take all the available RAM when i let the 
computer running over the night (with just top and irssi), and i have to reboot 
to get things back to normal. I didn't have this problem on Ubuntu 17.10 but i 
was still flooded with message about pci aer taking lots of disk space in the 
logs, but pci=noaer fixed this problem and i had no memory leak.
  The computer is a common laptop: HP Pavilion.
  
  ---
  Kernel log gets spammed with AERs so owner uses "pci=noaer"; that was briefly 
disabled to capture the AERs.
  
  Memory seems to be consumed (~6 GB of 8GB) just by leaving PC overnight
  booted just to console (systemd.unit=multi-user.target).
  
  The memory leak doesn't affect Windows but owner is going to check
  Windows Event Log for signs of AERs being logged.
  
  ---
  
- ## AERs (repeated several times per second)
+ Original suspect of AER is not guilty.
  
- [   34.978011] pcieport :00:1d.0:   device [8086:9d1b] error 
status/mask=0001/2000
- [   34.978013] pcieport :00:1d.0:[ 0] Receiver Error (First)
- [   34.978038] pcieport :00:1d.0: AER: Corrected error received: 
:00:1d.0
- [   34.978042] pcieport :00:1d.0: PCIe Bus Error: severity=Corrected, 
type=Physical Layer, (Receiver ID)
+ This turns out to be a bug in the rtlwifi driver where in some rare
+ circumstances it fails to free an sk_buf.
  
- ## PCI device
+ Reporter has been testing a DKMS build of rtlwfi with the fix applied
+ and confirms it solves the issue.
  
-   +-1d.0-[04]00.0  Realtek Semiconductor Co., Ltd. RTL8723BE PCIe
- Wireless Network Adapter [10ec:b723]
+ Upstream has the commit. Can we get this cherry-picked into all
+ releases?
  
- 00:1d.0 PCI bridge [0604]: Intel Corporation Device [8086:9d1b] (rev f1) 
(prog-if 00 [Normal decode])
-   Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx+
-   Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B-
-   PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
-   Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
-   DevCap: MaxPayload 128 bytes, PhantFunc 0
-   ExtTag- RBE+
-   DevCtl: Report errors: Correctable- Non-Fatal- Fatal- 
Unsupported-
-   RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-   MaxPayload 128 bytes, MaxReadReq 128 bytes
-   DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr+ 
TransPend-
-   LnkCap: Port #12, Speed 8GT/s, Width x1, ASPM L0s L1, Exit 
Latency L0s <1us, L1 <16us
-   ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
-   LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
-   ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-   LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ 
DLActive+ BWMgmt+ ABWMgmt-
-   SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- 
Surprise-
-   Slot #11, PowerLimit 10.000W; Interlock- NoCompl+
-   SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- 
LinkChg-
-   Control: AttnInd Unknown, PwrInd Unknown, Power- 
Interlock-
-   SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ 
Interlock-
-   Changed: MRL- PresDet- LinkState+
-   RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ 
CRSVisible-
-   RootCap: CRSVisible-
-   RootSta: PME ReqID , PMEStatus- PMEPending-
-   DevCap2: Completion Timeout: Range ABC, TimeoutDis+, LTR+, OBFF 
Not Supported ARIFwd+
-   DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, 
OBFF Disabled ARIFwd-
-   LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
-Transmit Margin: Normal Operating Range, 
EnterModifiedCompliance- ComplianceSOS-
-Compliance De-emphasis: -6dB
-   LnkSta2: Current De-emphasis Level: -3.5dB, 
EqualizationComplete-, EqualizationPhase1-
-EqualizationPhase2-, EqualizationPhase3-, 
LinkEqualizationRequest-
-   Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
-   Address: fee002d8  Data: 
-   Capabilities: [90] Subsystem: Hewlett-Packard Company Device [103c:820a]
-   Capabilities: [a0] Power Management version 3
-   Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
PME(D0+,D1-,D2-,D3hot+,D3cold+)
-   Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
-   Capabilities: [100 v1] Advanced Error Reporting
-   UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- 
RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-  

[Kernel-packages] [Bug 1831751] Re: rtlwifi: aggresive memory leak

2019-06-06 Thread TJ
** Summary changed:

- Possible memory leak due to PCI AER faults even with pci=noaer
+ rtlwifi: aggresive memory leak

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1831751

Title:
  rtlwifi: aggresive memory leak

Status in linux package in Ubuntu:
  In Progress

Bug description:
  Hey, i got a memory leak on Ubuntu 18.04.2 even in console mode (no X/GUI) 
the memory usage grows slowly to take all the available RAM when i let the 
computer running over the night (with just top and irssi), and i have to reboot 
to get things back to normal. I didn't have this problem on Ubuntu 17.10 but i 
was still flooded with message about pci aer taking lots of disk space in the 
logs, but pci=noaer fixed this problem and i had no memory leak.
  The computer is a common laptop: HP Pavilion.

  ---
  Kernel log gets spammed with AERs so owner uses "pci=noaer"; that was briefly 
disabled to capture the AERs.

  Memory seems to be consumed (~6 GB of 8GB) just by leaving PC
  overnight booted just to console (systemd.unit=multi-user.target).

  The memory leak doesn't affect Windows but owner is going to check
  Windows Event Log for signs of AERs being logged.

  ---

  ## AERs (repeated several times per second)

  [   34.978011] pcieport :00:1d.0:   device [8086:9d1b] error 
status/mask=0001/2000
  [   34.978013] pcieport :00:1d.0:[ 0] Receiver Error (First)
  [   34.978038] pcieport :00:1d.0: AER: Corrected error received: 
:00:1d.0
  [   34.978042] pcieport :00:1d.0: PCIe Bus Error: severity=Corrected, 
type=Physical Layer, (Receiver ID)

  ## PCI device

+-1d.0-[04]00.0  Realtek Semiconductor Co., Ltd. RTL8723BE PCIe
  Wireless Network Adapter [10ec:b723]

  00:1d.0 PCI bridge [0604]: Intel Corporation Device [8086:9d1b] (rev f1) 
(prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0
ExtTag- RBE+
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- 
Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr+ 
TransPend-
LnkCap: Port #12, Speed 8GT/s, Width x1, ASPM L0s L1, Exit 
Latency L0s <1us, L1 <16us
ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ 
DLActive+ BWMgmt+ ABWMgmt-
SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- 
Surprise-
Slot #11, PowerLimit 10.000W; Interlock- NoCompl+
SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- 
LinkChg-
Control: AttnInd Unknown, PwrInd Unknown, Power- 
Interlock-
SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ 
Interlock-
Changed: MRL- PresDet- LinkState+
RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ 
CRSVisible-
RootCap: CRSVisible-
RootSta: PME ReqID , PMEStatus- PMEPending-
DevCap2: Completion Timeout: Range ABC, TimeoutDis+, LTR+, OBFF 
Not Supported ARIFwd+
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, 
OBFF Disabled ARIFwd-
LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
 Transmit Margin: Normal Operating Range, 
EnterModifiedCompliance- ComplianceSOS-
 Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB, 
EqualizationComplete-, EqualizationPhase1-
 EqualizationPhase2-, EqualizationPhase3-, 
LinkEqualizationRequest-
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Address: fee002d8  Data: 
Capabilities: [90] Subsystem: Hewlett-Packard Company Device [103c:820a]
Capabilities: [a0] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [100 v1] Advanced Error Reporting
UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- 
RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-