DPDK patches and discussions
 help / color / mirror / Atom feed
From: 周杨超 <zhouyates@gmail.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH] kni: error release device list head could cause a kernel crash.
Date: Sat, 6 Aug 2016 19:19:41 +0800	[thread overview]
Message-ID: <CABLiTuw72K8iS67GWviZp9cEu1muabanQE6nVA1h+_vbYNd0Hg@mail.gmail.com> (raw)

>From 3edca1e3194959ba26a6c36143f8423009661b11 Mon Sep 17 00:00:00 2001
From: zhouyangchao <zhouyates@gmail.com>
Date: Sat, 6 Aug 2016 19:14:51 +0800
Subject: [PATCH] kni: error release device list head could cause a kernel crash.

Signed-off-by: zhouyangchao <zhouyates@gmail.com>
---
 lib/librte_eal/linuxapp/kni/kni_misc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c
b/lib/librte_eal/linuxapp/kni/kni_misc.c
index ae8133f..a49924b 100644
--- a/lib/librte_eal/linuxapp/kni/kni_misc.c
+++ b/lib/librte_eal/linuxapp/kni/kni_misc.c
@@ -276,8 +276,8 @@ kni_release(struct inode *inode, struct file *file)
 #ifdef RTE_KNI_VHOST
  kni_vhost_backend_release(dev);
 #endif
- kni_dev_remove(dev);
  list_del(&dev->list);
+ kni_dev_remove(dev);
  }
  up_write(&knet->kni_list_lock);

@@ -613,8 +613,8 @@ kni_ioctl_release(struct net *net,
 #ifdef RTE_KNI_VHOST
  kni_vhost_backend_release(dev);
 #endif
- kni_dev_remove(dev);
  list_del(&dev->list);
+ kni_dev_remove(dev);
  ret = 0;
  break;
  }
--

             reply	other threads:[~2016-08-06 11:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-06 11:19 周杨超 [this message]
2016-08-08 11:48 ` Ferruh Yigit
2016-08-31 13:24   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABLiTuw72K8iS67GWviZp9cEu1muabanQE6nVA1h+_vbYNd0Hg@mail.gmail.com \
    --to=zhouyates@gmail.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).