From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01128FA372C for ; Fri, 8 Nov 2019 07:18:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C7E2421D6C for ; Fri, 8 Nov 2019 07:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573197513; bh=V0BHKUiRMHgKTkJyAFpHuw3X/fjzN2F/ystH0oBGEkA=; h=Subject:To:From:Date:List-ID:From; b=a5BIhgE4xw39Lcq/2xsTfdeU9cPZ5H4ZLv2cU+uJTmcZMJr47QbsWnBSh7zKfE3Qg aufLmAndc+/GNj5QWotP5fcNBC/RI76nXjmIelwOquwOR7ht8FIm+OpdoTGTDzX9Ev AZVJ1IfQAMvt98mtLaVam2tG1yBg6/FrJrg43I/E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729764AbfKHHSd (ORCPT ); Fri, 8 Nov 2019 02:18:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:41740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725886AbfKHHSd (ORCPT ); Fri, 8 Nov 2019 02:18:33 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 817332085B; Fri, 8 Nov 2019 07:18:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573197511; bh=V0BHKUiRMHgKTkJyAFpHuw3X/fjzN2F/ystH0oBGEkA=; h=Subject:To:From:Date:From; b=BynJv3BTmikToMyPgobz7a+iV8ic+YUj/QnmsC6AmTwkaftEC2YBVom412pH5PX7c rcrujllUoj9AS9bDM81Eaj5nqXnyWOYGf0bGpxTCMAznpkOyuHWTEomog4aSVjmT/i bHcsGoew9DI0i7s5OksHTUF9M147QBC2T+rizdJE= Subject: patch "usbip: tools: fix fd leakage in the function of" added to usb-next To: hewenliang4@huawei.com, gregkh@linuxfoundation.org, stable@vger.kernel.org From: Date: Fri, 08 Nov 2019 08:17:37 +0100 Message-ID: <1573197457253132@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is a note to let you know that I've just added the patch titled usbip: tools: fix fd leakage in the function of to my usb git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git in the usb-next branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will also be merged in the next major kernel release during the merge window. If you have any questions about this process, please let me know. >From 26a4d4c00f85cb844dd11dd35e848b079c2f5e8f Mon Sep 17 00:00:00 2001 From: Hewenliang Date: Fri, 25 Oct 2019 00:35:15 -0400 Subject: usbip: tools: fix fd leakage in the function of read_attr_usbip_status We should close the fd before the return of read_attr_usbip_status. Fixes: 3391ba0e2792 ("usbip: tools: Extract generic code to be shared with vudc backend") Signed-off-by: Hewenliang Cc: stable Link: https://lore.kernel.org/r/20191025043515.20053-1-hewenliang4@huawei.com Signed-off-by: Greg Kroah-Hartman --- tools/usb/usbip/libsrc/usbip_host_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/usb/usbip/libsrc/usbip_host_common.c b/tools/usb/usbip/libsrc/usbip_host_common.c index 2813aa821c82..d1d8ba2a4a40 100644 --- a/tools/usb/usbip/libsrc/usbip_host_common.c +++ b/tools/usb/usbip/libsrc/usbip_host_common.c @@ -57,7 +57,7 @@ static int32_t read_attr_usbip_status(struct usbip_usb_device *udev) } value = atoi(status); - + close(fd); return value; } -- 2.24.0