Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9241279pxu; Mon, 28 Dec 2020 10:11:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/meX20RL6PE9gaQpkfPMohhBJPKNUDUhpZfnE6O24N4sAqPmDP1+K49IOtomr+zDVMhbR X-Received: by 2002:a50:becf:: with SMTP id e15mr44414977edk.138.1609179104340; Mon, 28 Dec 2020 10:11:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609179104; cv=none; d=google.com; s=arc-20160816; b=QQDFQifCstMYIZcLHn3c/QyQ2a82Mf0wsgG5xMcLOVEKtX814pCK3yNfHvXbI7OyhE 8TxaO+umNAhYyep4/+6O7W/o12Et7ytYBYuVVcnSnUoeCB33lr+WGGniv5bU/Dhy+Z+E zZbu6wWWUzMPNw1DieB9BH4l/lSLtntQvEth1rUCrkjh0xE9GVEhNIJ46Pml/TAHSyDB GN3pZh3PXM6V38AFVlDPSDrvYnTzNpn0kmo289LbO4M+tiuQeijGUDPN9oOSudOt4Cnn 7akVfFxNfSyIfne5w6ve4u98ma2YmNSWyRxJkQQ99892AP1zJV+JDzdWz2ToTMMbknpl uxTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pSjc1kVfU8/WxLBVTNMhdXujWeNrygnjk30ne1RCEcg=; b=bYqednf47RTCpCICwUwy8Y6Fd2HWpfQiC0gHzKq8Zdnyz2UrU915VNuDSJqjNIbw+S BDUPumL3Za5/cc+D/DTW5mLJWt5ITiSxkV0Db7SNT0dHxjQQs3J/Obh9SXUTbmSAIO00 or/5Orq4NIf+yuZD7Mbfu/U4xQHg4CJzVOwtYkK7TxWJ1HCyh9JIw0Fi2qIATZnOSb/i 7yEn+PKQRELnonday3ufETCBt2tEFk43AUS3VH2/heMF+iLvgqxxcZzHdPr6Ev6fGWt9 DP5wcoo+Pg/slQ/Lr69nvU3KL0F1mUD/YhAhbsRrXQFIbd83hIUnfknpeFZbVo6CJ/bI PmrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mQqUOYjO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e26si7073009edv.153.2020.12.28.10.11.21; Mon, 28 Dec 2020 10:11:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mQqUOYjO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388987AbgL1NZp (ORCPT + 99 others); Mon, 28 Dec 2020 08:25:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:53452 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388897AbgL1NZY (ORCPT ); Mon, 28 Dec 2020 08:25:24 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 92D3922B37; Mon, 28 Dec 2020 13:25:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161909; bh=32N3iBa7n5TJdAl+gIU8U6PfxFqNxfabR2e5sxFeG04=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mQqUOYjOuyVp7Qvd1ozL8PP/tyagVEzqRuxVXCfcK61lR7fnjwD9XcyFzz1yaDpL/ EP4sFmiRK32yGexu3iUiH/wAFCehLKcbHJ0xPgtbf5+Dn3PIYii6MqvPEJ+P8LWoJM Dl+/2rQketFVRueEhGufDLgssDRzLevnxrJQFu6s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Antti Palosaari , Mauro Carvalho Chehab , syzbot+c60ddb60b685777d9d59@syzkaller.appspotmail.com Subject: [PATCH 4.19 093/346] media: msi2500: assign SPI bus number dynamically Date: Mon, 28 Dec 2020 13:46:52 +0100 Message-Id: <20201228124924.296393809@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Antti Palosaari commit 9c60cc797cf72e95bb39f32316e9f0e5f85435f9 upstream. SPI bus number must be assigned dynamically for each device, otherwise it will crash when multiple devices are plugged to system. Reported-and-tested-by: syzbot+c60ddb60b685777d9d59@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/usb/msi2500/msi2500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/usb/msi2500/msi2500.c +++ b/drivers/media/usb/msi2500/msi2500.c @@ -1250,7 +1250,7 @@ static int msi2500_probe(struct usb_inte } dev->master = master; - master->bus_num = 0; + master->bus_num = -1; master->num_chipselect = 1; master->transfer_one_message = msi2500_transfer_one_message; spi_master_set_devdata(master, dev);