Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1430038 - Add missing hunk for upstream skbufhead-raw-lock RT patches
Add missing hunk for upstream skbufhead-raw-lock RT patches
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kernel-rt (Show other bugs)
7.4
Unspecified Unspecified
high Severity unspecified
: rc
: ---
Assigned To: Arnaldo Carvalho de Melo
Jiri Kastner
:
Depends On:
Blocks: 1353018 1410158
  Show dependency treegraph
 
Reported: 2017-03-07 12:38 EST by Arnaldo Carvalho de Melo
Modified: 2017-08-01 20:25 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 15:02:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2077 normal SHIPPED_LIVE Important: kernel-rt security, bug fix, and enhancement update 2017-08-01 14:13:37 EDT

  None (edit)
Description Arnaldo Carvalho de Melo 2017-03-07 12:38:15 EST
Description of problem:

The broken out patch tarball //www.kernel.org/pub/linux/kernel/projects/rt/4.8/patch-4.8.15-rt10.patch.xz comes with two patches: skbufhead-raw-lock.patch and skbufhead-raw-lock-free-skbs.patch, dealing with a patch management mishap by the 4.8.15-rt10 maintainer, that we have in our rhel-7.4/rt-master branch as just one patch, the original from 2011, by tglx: 85b9e707d00ab ("skbufhead-raw-lock.patch").

The problem is that something happened, a merge probably, and a hunk, the one that coincidentally is handled (slightly differently) in skbufhead-raw-lock-free-skbs.patch, disappeared, i.e. the freeing of the skbs moved to the softnet_data->tofree_q skb_queue_head list.

So, to match 4.8.15-rt10 (and the original work by tglx), we need to apply skbufhead-raw-lock-free-skbs.patch.

In a diff:

diff -u rhel7/net/core/dev.c v4.8.15-rt10/net/core/dev.c

@@ -4971,13 +5214,21 @@
        struct softnet_data *sd = this_cpu_ptr(&softnet_data);
        unsigned long time_limit = jiffies + 2;
        int budget = netdev_budget;
+       struct sk_buff_head tofree_q;
+       struct sk_buff *skb;
        LIST_HEAD(list);
        LIST_HEAD(repoll);
 
+       __skb_queue_head_init(&tofree_q);
+
        local_irq_disable();
+       skb_queue_splice_init(&sd->tofree_queue, &tofree_q);
        list_splice_init(&sd->poll_list, &list);
        local_irq_enable();
 
+       while ((skb = __skb_dequeue(&tofree_q)))
+               kfree_skb(skb);
+
        for (;;) {
                struct napi_struct *n;
 
 -----

So the effect is that without this hunk skbs will get leaked when network devices are unregistered and packets remained in its queued to be processed.
Comment 2 Arnaldo Carvalho de Melo 2017-04-12 10:12:56 EDT
Patch submitted and applied by Luis Claudio.
Comment 7 errata-xmlrpc 2017-08-01 15:02:59 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2077
Comment 8 errata-xmlrpc 2017-08-01 20:25:36 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2077

Note You need to log in before you can comment on or make changes to this bug.