Message ID | f4f26c3d586cde0d46f8c3bcb4e8ae32311b650d.1733876548.git.Thinh.Nguyen@synopsys.com |
---|---|
State | New |
Headers | show
Received: from mx0a-00230701.pphosted.com (mx0a-00230701.pphosted.com [148.163.156.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A7E4CA4E; Wed, 11 Dec 2024 00:34:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=148.163.156.19 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733877264; cv=fail; b=DQVGdNi2ebtY23WTiuMJzM9SisxVP9aLQZ0I0RM8hSSnapQ4Hv+Q9Ulpz1WAuZNZa8hrLyBI1utCgmw+S4qcBWMRJxU8dozYL1/qtBZrBUv503aAEoMJxJsHgL0IDcFvJIXwqfVeBUovkvy/4KRqZPx7a+wury9T6BQGeZrPEVA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733877264; c=relaxed/simple; bh=LYI3x5/5UgqsBpZUS+S/i0iKZBhuzGAbzpWdDq7ULYs=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=uUxgCM5uC/CQocduqNcxU0vhuViWqRBylAgI72Rpvp/g+Mcj/aMtMhl2Ahg+Vmp7Hvyj7k9WXSzgMq/FIhaaFA2sREsXdUOHIrbicLlrLeYe+CqiGE9cBMKfFREdqirPcOnjwv9NyFD7Uq11VMWuZhJj8nM/ceuEObQ6oL1BVDI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=synopsys.com; spf=pass smtp.mailfrom=synopsys.com; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b=WUIr2/00; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b=PbCwJjjd; dkim=fail (1024-bit key) header.d=synopsys.com header.i=@synopsys.com header.b=fuSO0iIq reason="signature verification failed"; arc=fail smtp.client-ip=148.163.156.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=synopsys.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=synopsys.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="WUIr2/00"; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="PbCwJjjd"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="fuSO0iIq" Received: from pps.filterd (m0098571.ppops.net [127.0.0.1]) by mx0a-00230701.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BANjYjd019385; Tue, 10 Dec 2024 16:32:13 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfptdkimsnps; bh=lGdUHFaxgK2sH2aCiw4tL86EZHe4lYLV3BiPV0osGAE=; b=WUIr2/0047hP PyRtOtw+tb0HsbTj4mDjuqSFgHobHHu9u+FX+3ZpIefDNv7ZeO1NdUpgVwjmZX8T /Hsv4ESjCCTvUP9EyJZy56y8raYTm92pye/30VMYRSMnhI2kGlo+dptcuG9phvBU Ylv2Wc4xiwYx3eeQGiLyBR9mGRGr9vk60ht4wllLPWl8kTSda27yAVx5E0B7qunC dSagP1wuZrGQOCfu5Kmd6Z+A4mzGyq4WdFuxjaT79xhONNdqRWkR2rhDxVkaRW9b mnvpvGhfLYe7NQoPIt0xaO1thsdwQQ3A9YEUpDitmVNl42xiqb+cSQkbbiwbCIKA JnjvSOcDfg== Received: from smtprelay-out1.synopsys.com (smtprelay-out1.synopsys.com [149.117.73.133]) by mx0a-00230701.pphosted.com (PPS) with ESMTPS id 43cp8t9vh2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Dec 2024 16:32:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1733877132; bh=LYI3x5/5UgqsBpZUS+S/i0iKZBhuzGAbzpWdDq7ULYs=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=PbCwJjjdcvnT+X6gBSw2OJyvyhdrZp7TQOFNZyyptpdc+N2Z/57KrTzmtB9sz8Ear nqzVXbt9sNNAGgV1MxCKriOyh+uc0cTyUAG0Lm1KzYWj+EYCybXCZFXDk+LzxITnBx ySFwtMEdGTVJsUoA3813IThTCzMGtrNeEm+vd7e5V+UBw8Xwe68/t5XAONnt63UASt C4MXhEuSMo7+iA4iOeP+d9kXcBzZHdcBNJjgqjatcRICC2VD2FgMBzswvGdIMMxv+1 VcWgN/i2pcD3YpCE7Oc51v5wo0jkde/W51Aoeor4nO+u4llIichMxAOcLGPE1O6n8R our0xntVIgDTg== Received: from mailhost.synopsys.com (badc-mailhost4.synopsys.com [10.192.0.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) client-signature RSA-PSS (2048 bits)) (Client CN "mailhost.synopsys.com", Issuer "SNPSica2" (verified OK)) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 1376B40126; Wed, 11 Dec 2024 00:32:12 +0000 (UTC) Received: from o365relay-in.synopsys.com (sv2-o365relay3.synopsys.com [10.202.1.139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "o365relay-in.synopsys.com", Issuer "Entrust Certification Authority - L1K" (not verified)) by mailhost.synopsys.com (Postfix) with ESMTPS id E8088A005E; Wed, 11 Dec 2024 00:32:11 +0000 (UTC) Authentication-Results: o365relay-in.synopsys.com; dmarc=pass (p=reject dis=none) header.from=synopsys.com Authentication-Results: o365relay-in.synopsys.com; spf=pass smtp.mailfrom=synopsys.com Authentication-Results: o365relay-in.synopsys.com; dkim=pass (1024-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256 header.s=selector1 header.b=fuSO0iIq; dkim-atps=neutral Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2171.outbound.protection.outlook.com [104.47.55.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by o365relay-in.synopsys.com (Postfix) with ESMTPS id 535DB40148; Wed, 11 Dec 2024 00:32:10 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RaeVjvTrsfge6UwSYhZZ6D5G1qiEhg3KnO4uF8tqzIYxL21dXEuEoZLYN2Gpx+QcTlcD2682hDQKRqj+TJBgEUqBLAws1JYS3IejLCCnntWMznXelk4glRoqa7fAz3UZ0HtNhhprXSIv8tXIZLiLB5+0LKf63FeMAvqyPJj3OyGdbAn4CVK78YGymmYj4wXka2RlbOsiF+kwzCx8m+4zKhcMu0vrh9CYvIEcgFFwGu4tAy0bhNP4uYC50NUo2l8o+4TswAQpOkD3LHsoO7aJ9DwsVjxFP4KGY9rmOzSJaiC/RcMp/SIewZH4Q0xuJqxtb/WZ2BYofNvDmovZ/iyh5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lGdUHFaxgK2sH2aCiw4tL86EZHe4lYLV3BiPV0osGAE=; b=c4azKhENrgdB/xzlD3AnnGlceTzAqnHl9lzDmTJcFSB+HL+yCwCphKSAdsluWEIBmEg/MkfjJpZFnS8ABT74TOInAhSdywvwSbL6kAR3ui5djYq1fG0lwwo6m2GO78SLj6m81qXvjT2nQcfFnFRYQrFA45uvG0FQvAftXA1ydKPArF4Q6F7l71axbEowQe2T8CDNR2sSdaMjX49f8tfgcKjsMlk25LxrJigs0NBtsc7qPX8urDqxCHrSQ2eDZImZ5UdEVjZ/+SZjbLinT9fJU6YE+6EHh+ietVMPfKno34piJ7vYfBx9kH3BQrefQjLb3uD9yP3pCXx/gwiJIXE3Ew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synopsys.com; dmarc=pass action=none header.from=synopsys.com; dkim=pass header.d=synopsys.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lGdUHFaxgK2sH2aCiw4tL86EZHe4lYLV3BiPV0osGAE=; b=fuSO0iIqqaQeV1t+hf/JC/X87W0mZEAA68DQkYIlP2zMO0g99QM18TkyNPLfFPg0KblZEPZ23xonbMCEBvycjTivVD0fad+Sf816jii7kbjSTlFNnDt99hKOgs5Wwwxb4TusEkiBYPZwMgm99jGNDZf12cwUTPtUJGugVb6tn+k= Received: from LV2PR12MB5990.namprd12.prod.outlook.com (2603:10b6:408:170::16) by CH3PR12MB7691.namprd12.prod.outlook.com (2603:10b6:610:151::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.15; Wed, 11 Dec 2024 00:32:07 +0000 Received: from LV2PR12MB5990.namprd12.prod.outlook.com ([fe80::3d09:f15f:d888:33a8]) by LV2PR12MB5990.namprd12.prod.outlook.com ([fe80::3d09:f15f:d888:33a8%7]) with mapi id 15.20.8251.008; Wed, 11 Dec 2024 00:32:07 +0000 X-SNPS-Relay: synopsys.com From: Thinh Nguyen <Thinh.Nguyen@synopsys.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Thinh Nguyen <Thinh.Nguyen@synopsys.com>, Nicholas Bellinger <nab@linux-iscsi.org>, Sebastian Andrzej Siewior <bigeasy@linutronix.de> CC: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>, "stable@vger.kernel.org" <stable@vger.kernel.org>, Homura Akemi <a1134123566@gmail.com>, Alan Stern <stern@rowland.harvard.edu>, Christoph Hellwig <hch@lst.de> Subject: [PATCH v3 06/28] usb: gadget: f_tcm: Don't prepare BOT write request twice Thread-Topic: [PATCH v3 06/28] usb: gadget: f_tcm: Don't prepare BOT write request twice Thread-Index: AQHbS2Qba4VAzDTcF0+prwyD9wf8iA== Date: Wed, 11 Dec 2024 00:32:07 +0000 Message-ID: <f4f26c3d586cde0d46f8c3bcb4e8ae32311b650d.1733876548.git.Thinh.Nguyen@synopsys.com> References: <cover.1733876548.git.Thinh.Nguyen@synopsys.com> In-Reply-To: <cover.1733876548.git.Thinh.Nguyen@synopsys.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: LV2PR12MB5990:EE_|CH3PR12MB7691:EE_ x-ms-office365-filtering-correlation-id: 875f473a-d749-4b7f-3bc0-08dd197b3e28 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|366016|1800799024|376014|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?nNK93poZZv8vqpHmMueLgEaOo3?= =?iso-8859-1?q?RcT0sWecE8pFm1UlYb7GJ7VxTMPYVpV2Ci/lT3B+RGzE8ptQdxwVG28MfzOQ?= =?iso-8859-1?q?E09QsCUfyX/9fwU3jekbTIeG19MkhpqcWGG0lkbT0sy7myhc/zCyZxsPZHjx?= =?iso-8859-1?q?5Nt8jriEQ3hdellEr1XbAk7lBAiPqtqR5W6tvZPA3UOEuEiNMvxgoI8xxrTX?= =?iso-8859-1?q?3O6OtoEO3YDdMMycbZDVaBMslxei76mEFiEg5AwnSwQ3SFvACzf53D5OuLII?= =?iso-8859-1?q?NepWEvPFXA0xh0uQ7tO+T2E0Hq1GNnugyGKTPZpYrXgUQZ4/Xn1o1p6deb5k?= =?iso-8859-1?q?QeTus04qtcj9mJPRqD5BhPGinYjPu9h8LMDosYX1QWpEqyNFT7Nn3gL1cA2V?= =?iso-8859-1?q?ADJ7/17tjHzhTYjrnP1RTYAXwST3bhpeptPbWJMkh7fL1XXZx3tKSDhl7xw2?= =?iso-8859-1?q?I53i3x1lRj28JfhHmnO+ISKduCReP859nRrIVJylsxZdnWpiixpdvfS9+IS/?= =?iso-8859-1?q?hmhtmxO4LoCYzV+9aaI4DMOQUwylewkdbvOHwkpfHIAxycO5pO06ahtERvJ8?= =?iso-8859-1?q?H7iHKZRE2lDoNgTmihbM6/Aa9FHM2V6Dzbl8nUd4gtbIAfw+EzbMGIKs/M51?= =?iso-8859-1?q?SY6ylyUJRReDIIfbLoihKlZYqSXYNUaKfoE8Nx/uG2E2/7cuW3uSXxjEApvX?= =?iso-8859-1?q?A71gH5Ang/0OpOhvfFOruLZBLzYnjYT5T66p/wo6VXqwEg7nhIkdnUlqeYmU?= =?iso-8859-1?q?X+x+Fy7ag+Z3SyV5OpcpHej9pfJ6BcejXuZiov3FT+xqBMVufmuTersJqtMw?= =?iso-8859-1?q?z+T2CZPeRV5AGrzBKcg8M74nAui/j6Ng8WOkzzWWjuxr4XM68yB3E4fWzMkP?= =?iso-8859-1?q?P9nHWseoxUw1FyO1DwHpm4JgsSX359Y7UxT8dwviCSSSTKbu1g3eSLWtqyJv?= =?iso-8859-1?q?Yq0GV9NJYEp5D0U40ConyEyRUyBYkZTuB6KGAHaDBaAWk+O7W5G6Vwz6dqia?= =?iso-8859-1?q?7wV9EVvKFVNkTfljHWwTOUzjmjTxBOdTDiFAcWRoIgAi+6mLwTW9omLMay3m?= =?iso-8859-1?q?fEMpjPk3H5fog+5K6Gj6wPj0EpaRrfBIppYs1UODjZsbxzUhjFy9gWrXgc+a?= =?iso-8859-1?q?f2iFQecExhlfrR/GOKCwIWCvh9VAziqlfpbriOjzsqdYpIBMpObTkvjrfAuQ?= =?iso-8859-1?q?6GCynEnQQxrOcfwLRyfcVSy+9W6Qw7qPOfGU0SeN+T+4jB7owGFTEOagmyP9?= =?iso-8859-1?q?8ImYahbS3bvxSBAiQxegrEpI/RTRDq8uf8X4YzNHTpi6lXEYvq4iyqisUoZC?= =?iso-8859-1?q?kua4Nw/O22GxKC9u0nHrj2et32yMB+FTSUD1QGoDeTRTPZFHOSN836b6hC/E?= =?iso-8859-1?q?SZYSJ7C80bq/FK3uzbxyLzEISqfkHjqsdZPyVERw7nAN3cGB4mXaxokdK2te?= =?iso-8859-1?q?jCZBVSLNwXbunA9pc9D+K0WQ=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5990.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?3LeHpqxtFoTjCnDLz7QqTnq?= =?iso-8859-1?q?HFsxbhcidk45jAjcH8uNwYnI+5Gn9nQV7xSjcBHQGgXadNBjEGiYk/wNCD5T?= =?iso-8859-1?q?/EkiLBkN7ZZZ3smP9nNyAvvh+2vVF2xvywchyqqGHw2OGBOD2G4558VV2dEU?= =?iso-8859-1?q?aF5oIXf6+lkxq7IGBfj9uSyiOWsifR0kt8UOoe8AhvshJgJCVGp7/5226w+L?= =?iso-8859-1?q?88CgOU4fDK4Fjra2CpCxE0Lw8QQ2m9DmuTWx2X73NyOqcaWp25UNXO7Hnm5J?= =?iso-8859-1?q?jI03S2WLi07jTuFlkLrEJnmfoKDE7NGN8AWJSxZw7aXB6JZDP5md0W1YBpac?= =?iso-8859-1?q?uwO0SkzonuOXgU3PD0IgwC6Af8esEB9Chv/6rAnAHbXLPos5RnczWBaFJOPn?= =?iso-8859-1?q?UHeGHJkciqPIt5Ck7lixuS0f/QITTK/lE2xKSEvcWsgZV9lWKqN7eq2rMhgv?= =?iso-8859-1?q?WKhE9YcmobU4E5ehzC7ET5Gwz4K8QmBUcRax2Cn+UkIS04zVSlyPmrIn+cAq?= =?iso-8859-1?q?VnyYrw1AyhTxv6uNoVFV6Rs2UxiquiTgNSvNstX9Wz+2yKpt2Xcse/96fRJF?= =?iso-8859-1?q?aIWuMOov3L51+D9pFtLhErM18iBbaUYH13ccxxS3mt8JACWp/+8dnUoFn1hQ?= =?iso-8859-1?q?h3s54cwKIouuZg5cc0XAsCPttFm4azH+yXSwoFFKojdb4KuHPAsryu3IRPy5?= =?iso-8859-1?q?dmAa52Lhxpv82WvqUNglyvg9z0ndc/TgpFiq9wR0o6BeZYHlqqGCzY2Zn/rR?= =?iso-8859-1?q?XeXqbyTacUelx0gygw/qjupO6oJU54LTAGdvdQAyLDGIHalqbRUqguZRRXrd?= =?iso-8859-1?q?JY4XpZ19LHwEAoyyv4ETJRZihx2hOV+n+BoKC/GQlBxXFItDyXY57R5hgJTc?= =?iso-8859-1?q?qkgHytnQlH8++HroKEAPWgFPHHDqMt2W174Pruktjs8LmAIREwC+14+CF6AN?= =?iso-8859-1?q?zeZc/W+q/g8t/840L/Cw+N7hZr4uJSmoJlg8IxCjkIHsnfVkc5PXUPvPJUmS?= =?iso-8859-1?q?OjuzDD36BPOzZhij91ocsM5n4ZGwgbNeV9b8WnV2UkkIRU/t/UEGfmn3SMrU?= =?iso-8859-1?q?viMa4bvp0zODzAnPPt61tNzpg+Y2BOsmLCIo8BpfBovNRxemO4JI7WTIbYWK?= =?iso-8859-1?q?uUstQIg2uuXeY9HxD8AXfUUzSIeqV1nnKkKUgMqRa9SLMxF8wFDBNxCen7Cj?= =?iso-8859-1?q?9yNKNpoDhe5H3FB7s2JMlYQjsy4x7oZRbAfxK2xncGjAuVrE0fdjevl2RAVL?= =?iso-8859-1?q?I8JeTuFW5YKB9JLYH+4LpgTiDArj5oL0S0cYqkpDJYRoreFnnzMKzlEppt4q?= =?iso-8859-1?q?hTvEfvclmykXYWHE9gmW2WZ35hVFIN80gMrUXPBQbGvAQe+qpesBcXV0Je+X?= =?iso-8859-1?q?o5B5+/bVY2MeoC0nDB6svAo8NliBEif4/wPCqnSwaku9FkKIuJ9SeCFwhzPZ?= =?iso-8859-1?q?n2ZhGNnXomJ12RdcqzctPGwTsdwSqf4q6KJIMBSR/J05rC5oh8gQdaLidYfC?= =?iso-8859-1?q?25t1CSyoMxAx+N95wVqSKxx6BBBF6eoxt2IGXAc4cjRcarTl46GjUwlrlGeq?= =?iso-8859-1?q?8A7ikafEhukiXFvXsv7K2TYTIbWYCX4uqBt0BDwz9F8YHZsuzK7S2Z/NOEuE?= =?iso-8859-1?q?tx/6MHIDA4WypBVwG?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: <linux-usb.vger.kernel.org> List-Subscribe: <mailto:linux-usb+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-usb+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: umHc6Ud1RRVocvZp9qOlmFuh0GUyiws2UUUinxMk95thEAqBnqFLL5WAX0wkifqr2uYBggvzqaQF2f43gheVt6zxr95XFDVITMo7n3NBmQU0PCEJP1OF4LgquiuC5kDvLV/Gbw5osBXCwqdfCQx0AxOKUYL9R+JmZXvmediNWgnb1j/p1S7sd7gRHSsRthODnBy55k6yIbmgzsMv7Cn1E3YUHjJVqdp+ztQoH80Cir44+Gzfc5HkQgRhtbMeejAV90jcP+1n9Wdf5yu+o3kQOt8Rik8CSf72LZpMdSWlIbjUHormhwpBlwLosjehHLgIRNgQULtZm5XjZtiDbjAHW96oso8afyq9zDcbP1Ysvp8DphX5QtC1tAxPZh+vwOi/LjE4dS0H2+C7GRMzamN7Pvgj7d3KiAc/KFTD8wmxXanz2bLuIFceB7CtCNVuzoio3S/aX5LCYy8oWD7EMW1poT+y1bGB3JtVY+T5PE3jnTU4ZQA70NQFPkqbbIrcMmC2K7P66ZRUh4eWtK0bgKWfVQ7pfogrmHYPmk8t1SUF2fUHEq+LQyQgXOWJ5UK8zKNbKjmnta2lCSy7HE8MBtYf8grhS/nDNdIezE8sjH0mpp9wzVuL25NAH6Ryp1sOINEEhLcOoez9LiylQ8UvZMPIuw== X-OriginatorOrg: synopsys.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5990.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 875f473a-d749-4b7f-3bc0-08dd197b3e28 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Dec 2024 00:32:07.0451 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c33c9f88-1eb7-4099-9700-16013fd9e8aa X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NVdMhDUei0+vtRcpw3yxncaW22UN0cYGJxjCSHQMBHxJ1YUnMflNZiZ/eo0D2ZJI0eIdzZMqRXc0QZ/F0tJ+Pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7691 X-Proofpoint-GUID: bghzpIoZMAxexHUz5K8GKZtwt4wFV0BN X-Proofpoint-ORIG-GUID: bghzpIoZMAxexHUz5K8GKZtwt4wFV0BN X-Authority-Analysis: v=2.4 cv=KdsosRYD c=1 sm=1 tr=0 ts=6758dd8c cx=c_pps a=8EbXvwLXkpGsT4ql/pYRAw==:117 a=8EbXvwLXkpGsT4ql/pYRAw==:17 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=8nJEP1OIZ-IA:10 a=RZcAm9yDv7YA:10 a=nEwiWwFL_bsA:10 a=qPHU084jO2kA:10 a=VwQbUJbxAAAA:8 a=jIQo8A4GAAAA:8 a=6lpbQM8GuGKqb_z4f3IA:9 a=wPNLvfGTeEIA:10 a=Lf5xNeLK5dgiOs8hzIjU:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_active_cloned_notspam policy=outbound_active_cloned score=0 adultscore=0 spamscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 clxscore=1015 mlxlogscore=566 suspectscore=0 phishscore=0 mlxscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412110002 |
Series |
[v3,01/28] usb: gadget: f_tcm: Don't free command immediately
|
expand
|
diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c index b35e0446d467..4fd56ae056a3 100644 --- a/drivers/usb/gadget/function/f_tcm.c +++ b/drivers/usb/gadget/function/f_tcm.c @@ -245,7 +245,6 @@ static int bot_send_write_request(struct usbg_cmd *cmd) { struct f_uas *fu = cmd->fu; struct se_cmd *se_cmd = &cmd->se_cmd; - struct usb_gadget *gadget = fuas_to_gadget(fu); int ret; init_completion(&cmd->write_complete); @@ -256,22 +255,6 @@ static int bot_send_write_request(struct usbg_cmd *cmd) return -EINVAL; } - if (!gadget->sg_supported) { - cmd->data_buf = kmalloc(se_cmd->data_length, GFP_KERNEL); - if (!cmd->data_buf) - return -ENOMEM; - - fu->bot_req_out->buf = cmd->data_buf; - } else { - fu->bot_req_out->buf = NULL; - fu->bot_req_out->num_sgs = se_cmd->t_data_nents; - fu->bot_req_out->sg = se_cmd->t_data_sg; - } - - fu->bot_req_out->complete = usbg_data_write_cmpl; - fu->bot_req_out->length = se_cmd->data_length; - fu->bot_req_out->context = cmd; - ret = usbg_prepare_w_request(cmd, fu->bot_req_out); if (ret) goto cleanup;
The duplicate kmalloc here is causing memory leak. The request preparation in bot_send_write_request is also done in usbg_prepare_w_request. Remove the duplicate work. Fixes: c52661d60f63 ("usb-gadget: Initial merge of target module for UASP + BOT") Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> --- drivers/usb/gadget/function/f_tcm.c | 17 ----------------- 1 file changed, 17 deletions(-)