提交 81291dd9 编写于 作者: K Kirill Tkhai 提交者: Greg Kroah-Hartman

staging: sbe-2t3e3: Fix possible reuse of freed memory in timer function

Do not call kfree() till timer function is finished.

[This was found using grep. Compilation tested only]
Signed-off-by: NKirill Tkhai <tkhai@yandex.ru>
CC: Joe Perches <joe@perches.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f578b5d3
......@@ -122,7 +122,7 @@ static void t3e3_remove_card(struct pci_dev *pdev)
struct channel *channel0 = pci_get_drvdata(pdev);
struct card *card = channel0->card;
del_timer(&card->timer);
del_timer_sync(&card->timer);
if (has_two_ports(channel0->pdev)) {
t3e3_remove_channel(&card->channels[1]);
pci_dev_put(card->channels[1].pdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册