Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp908166rdg; Fri, 13 Oct 2023 05:06:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHorNJR7Mlm6PQQ4jq8lGgIhJtfNM39vzlLnWnzYP8KiLY9w9gk3Gn56XsNaCqAVdur44Dq X-Received: by 2002:a05:6a20:7fa8:b0:159:c2d0:9fc6 with SMTP id d40-20020a056a207fa800b00159c2d09fc6mr34163350pzj.8.1697198787923; Fri, 13 Oct 2023 05:06:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697198787; cv=pass; d=google.com; s=arc-20160816; b=ZIy9xbnfM2JHfKjsYjp9oWICQpYx8u9Lertji3Ceuhliu/agbzm8dKqm/NaXsnfuJ7 ZDN3T4sUeFq6ydczHQ+ANhqP98E2s/fCqg5mQ8ktDJAqByTDpcCzvaqSP8G9im/yPp8Z PLRuzhUGlTrnqzYZXXoi4ztg/vu9xAEV/leS4GlCGiQqbn1T06MpoSBVJPHAYwMAeTfK MtFWZHdCKate1zHWFRhPtQ/HxIniZP4J6FhjEz53S+8mHGPM1O8BFObVtb2Jpv9EsZmK gijYqF1Ux3ydp0ywfu+AnbKe1RHnYk0sDVyNzk9kZY4UmDne0IzaB3qMJBmSVHOYMeIJ Oaqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ejrs8jylAJqBfnpW0hEqW2gxslFv2Y1aTmpuXU3k3mE=; fh=TvJwH5oYqQm+nKEmPkUDnfMQM/gX1tmsJCHVqzfqOAY=; b=yNlToIVD9wwWBnOdhzF/ZW6w2pCIP8dowmftnX5iK2yJTrEEiSe4DUmSHzlZaygnZL Fskb4jsXTg21695Ff/72bVOiJHDrPUTtIWjVtsOZ6p9xFv9eI07PWjjsQ7Td1Mm6JP3j k7Kh+zuu3SN4eEmC6u2/kOwatxHYHaQPHKIKpcCbHASzR76ydlxmHueuGn+rxTZHwyBz vz9/coHr8PEcFdLywNGskJGNOsM/NROKgfWkV2avhmDuFmk+4xKzOxvZt2ADiOLJiGWV rR198hs6WK3qkPcYSDvira99Ya3gtpjHuYQ+SYreRfsAX20DsTzDKW3Honrl60GHV0wd +TmQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@zenithal.me header.s=selector1 header.b=KQ5Y8LP3; arc=pass (i=1 spf=pass spfdomain=zenithal.me dkim=pass dkdomain=zenithal.me dmarc=pass fromdomain=zenithal.me); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zenithal.me Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id a21-20020a63e855000000b0054405623a4asi1987164pgk.615.2023.10.13.05.06.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 05:06:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@zenithal.me header.s=selector1 header.b=KQ5Y8LP3; arc=pass (i=1 spf=pass spfdomain=zenithal.me dkim=pass dkdomain=zenithal.me dmarc=pass fromdomain=zenithal.me); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zenithal.me Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3DB8B81D2D14; Fri, 13 Oct 2023 05:06:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231472AbjJMMGI (ORCPT + 99 others); Fri, 13 Oct 2023 08:06:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231533AbjJMMGG (ORCPT ); Fri, 13 Oct 2023 08:06:06 -0400 Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2107.outbound.protection.outlook.com [40.107.114.107]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65F3BD6; Fri, 13 Oct 2023 05:06:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lkpIzmhyuMhjy6rlj8GW9KaDajviopbJpiSHQL/U7lyThE43kd4skudpMsIvxENzSMgqQn6H+Cs0Q6q0Inf/tOAG5B50jB1BqBz87MV4RE8HxzElDRP3YueeFfMIMQoUzYcZ0pbfWxtma5WwV7n58c0BR9lBpF/uFL+TS7yLMUCWwagBwzgmHA4aBaPTYEuq175J3TJhpTecZmQT4hSEBn9U7iTAnhQUTN386yFgLJbg3l8Gk9qSxbb7hpv6+b6yn+/SOwTYbFlyXB6ESwkXdDGB13JpC25VZ0wVdpsSMhYFWaHQZLu8XbR9xQ8FVHEQGUcVahGG4D2DNuloFo1HIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ejrs8jylAJqBfnpW0hEqW2gxslFv2Y1aTmpuXU3k3mE=; b=OZ8P/IkEpbC92B0j1P0KgsCXaS+cXfbuB1MM5xIUyffPmihGPvWPwvMdNP+GObJFVEwPE63qfBbl+aos2VMmqjpErR5wjDswyhsnETFAU6FFJHBtfvlCHz7taJK+c1/79S+PuQnK/2jR1rBZitytdZu0S56VEAm5bb3CmYyk/8gJGgM/X4jt/4mfxWLAWw3ljNz8QNTxJcozDS9Dt6n0mfmrr4VQ48ChlsTz+OF9LDif7EJpm3VBAHYZ3u0mR08a6J6zw8zetdD+gdTkkuefvgX2zuJHXMZjawyenMu5eLVN2ZyWnlXtPvazOdpqlF7Nlo/DZ8GSo9hDpidFWTZMuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=zenithal.me; dmarc=pass action=none header.from=zenithal.me; dkim=pass header.d=zenithal.me; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zenithal.me; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ejrs8jylAJqBfnpW0hEqW2gxslFv2Y1aTmpuXU3k3mE=; b=KQ5Y8LP3Nh0utFf8mDsRK21HxvgsNk7QYOShNbodXSknzWVqfUM7+oImTBbasUF9hMO0bkIJdlWU3lMapCc51wVG5ZHUA+TIhj9jtOgnuzIOzdRg4sfksSr0bgZk6Wja4oceiZ6c5zBWsm+Q14TNwFsQSZugeLjevCtJ0s3D5Rs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=zenithal.me; Received: from TYYP286MB1406.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:de::5) by TYWP286MB2601.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:248::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.17; Fri, 13 Oct 2023 12:05:59 +0000 Received: from TYYP286MB1406.JPNP286.PROD.OUTLOOK.COM ([fe80::54a2:c3cf:4f5:91cc]) by TYYP286MB1406.JPNP286.PROD.OUTLOOK.COM ([fe80::54a2:c3cf:4f5:91cc%7]) with mapi id 15.20.6886.030; Fri, 13 Oct 2023 12:05:59 +0000 Date: Fri, 13 Oct 2023 20:05:52 +0800 From: Hongren Zheng To: Shuah Khan , Greg Kroah-Hartman , Valentina Manea , Andy Shevchenko Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, sfr@canb.auug.org.au Subject: Re: [PATCH -next] usb/usbip: fix wrong data added to platform device Message-ID: References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux Sun 5.15.67 X-Mailer: Mutt 2.2.7 (2022-08-07) X-ClientProxiedBy: BYAPR06CA0071.namprd06.prod.outlook.com (2603:10b6:a03:14b::48) To TYYP286MB1406.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:de::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYYP286MB1406:EE_|TYWP286MB2601:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a781a3d-b16f-4a7c-b951-08dbcbe4c376 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LnK/nPxTJJ5+zzn18A1nsOEzsuW5EUFxt3utj5hckiQ6C+8XqBNf+Tevrj8mjQT8OURFE0nyG6wrYOsgEVqG6MuEVmsTuRhVmVQvdPy74CcJk09hZ07nvh2qVdbgVlcJ6X/1hLLEhguvfEIv+CtCujNAL2HroXMIyTNS78c6aj5U9mDhdiXBn24ACpMI0RTMcQWdDTFI1NPB+a2Xf7OHdz8uk6eW88ZqOcaaMd9Kl4zofuZtoUS3ZNVMOkFPyxehHpWzlrppkNqmVgjPl1TtoN+2O7Tb2A4GDeUfrzyHdeLrChL9+Kjyc0SJfxWg/ii+MW9Dn/VzTrFzqZBMPdZKiuS4ivO1X7tpgmOPlLDrjD5d+SN0lwZbr7v0heEcvSBiPIQJQSpLy5DLzXb3GrtPsiBJGA5UEYz0AfYkVeBCwJP+L6wczNJ+cw8H31a5S7h/Gh4yh3rrNkslTFCxSBT0RGPNLEGvZq10AtGhP5vlqa7/4pTfgsK+HRwK+/ss9FpOjr0QlNixftLqMe+Y5UbnMUR6k5ymviyeUdrFuhKz12X2J+sro5U8KtbadTSTilvad3NLuzUipgfR3N0Z/en3eFSlgEzYO8dZho6lNFFRVyY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYYP286MB1406.JPNP286.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(7916004)(39830400003)(346002)(396003)(136003)(366004)(376002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(66476007)(786003)(66556008)(316002)(66946007)(41320700001)(83380400001)(110136005)(4326008)(5660300002)(478600001)(6506007)(6666004)(86362001)(8676002)(6486002)(966005)(8936002)(2906002)(38100700002)(9686003)(6512007)(33716001)(41300700001)(49092004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?zNK6bJDgXLTC/r9uPL3B0T9Zqjw2cQleTYkxZsGmyt/BKeJzYPX7wYeh+XNC?= =?us-ascii?Q?EYC3c0KdFZC+MHkzJO332RW6cpishrZ5s8IpXeocGTEDuA6MVTc/n8Ykw7pq?= =?us-ascii?Q?xWvvxepTV3lflNyLozqUa3MgZFga7GDSHpmcuxzXHR2jMWV8RXdVXTSPqlgd?= =?us-ascii?Q?qawMxfS3LXVEalPVXnP6uX3avp5vFzBCsAiM4yRNXvV2rLWQepnawWXV2e/q?= =?us-ascii?Q?UvzPXI9TmldKFH9ED9pOpGVxzs6MYAppqlFKTOJPZT7gAU5Li78HyPGzTLja?= =?us-ascii?Q?JqXL0IBSJO4oano1fOxs1uhpq6Y2fePpQI3buVuK6yOKc1K+36oNfLg4jXO9?= =?us-ascii?Q?sjDWeyPg4pPJON7EJITqH7JSz9L2sUxHO+lFEp/bmuTPtgIJEsMHVk+Wgbne?= =?us-ascii?Q?MM+80L3N0a+clWABkvNdjZcaCrmjHV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x0dNscGMAup04oGhoBHgW1mWi5x8eNwiB3aLP0PplnXvgrXqEICnXvi3V?= =?us-ascii?Q?ITajRU2Ow/mzAPEx6BqwbLyd5T54g4lUqvqTy3ID21+BSeao4wHW0bfstTl8?= =?us-ascii?Q?hb0A+mL0tvd/8UT5xHS3E6phtVtUZrk440otownyIGAcbTlkLHj8UMFmviCV?= =?us-ascii?Q?XSgU7gBQxBVxeWFGiaf0cJ8eQZRLsez84KfIHxtlDJV7Veqe7yw8zj4bHmrZ?= =?us-ascii?Q?97JeoIQruizSZB14VePlp9fpwNIZkVMBpQmToBrK?= X-OriginatorOrg: zenithal.me X-MS-Exchange-CrossTenant-Network-Message-Id: 6a781a3d-b16f-4a7c-b951-08dbcbe4c376 X-MS-Exchange-CrossTenant-AuthSource: TYYP286MB1406.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2023 12:05:59.6538 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 436d481c-43b1-4418-8d7f-84c1e4887cf0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DxHkdybgvKDKwQ1QwJhX3BdZSkFDUA56DojRJWzMmjrcztt8fgDkiD+eIwL35Fjp X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWP286MB2601 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 13 Oct 2023 05:06:25 -0700 (PDT) On Fri, Oct 13, 2023 at 06:52:09PM +0800, Hongren Zheng wrote: > .data of platform_device_info will be copied into .platform_data of > struct device via platform_device_add_data. > > However, vhcis[i] contains a spinlock, is dynamically allocated and > used by other code, so it is not meant to be copied. The workaround > was to use void *vhci as an agent, but it was removed in the commit > suggested below. > > This patch adds back the workaround and changes the way of using > platform_data accordingly. > > Reported-by: syzbot+e0dbc33630a092ccf033@syzkaller.appspotmail.com > Closes: https://lore.kernel.org/linux-usb/00000000000029242706077f3145@google.com/ > Reported-by: syzbot+6867a9777f4b8dc4e256@syzkaller.appspotmail.com > Closes: https://lore.kernel.org/linux-usb/0000000000007634c1060793197c@google.com/ > Fixes: b8aaf639b403 ("usbip: Use platform_device_register_full()") > Signed-off-by: Hongren Zheng > --- Tested-by: syzbot+6867a9777f4b8dc4e256@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/0000000000007ac87d0607979b6b@google.com/