Received: by 10.213.65.68 with SMTP id h4csp2602697imn; Mon, 9 Apr 2018 06:15:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx49h6LglOvXGTvYB9b5f/Fvy/lMQQ+Rh6NHzIgZWESClb/jCtzeCI7ayo6rKWHMMcBAqimfT X-Received: by 10.98.61.80 with SMTP id k77mr29509509pfa.2.1523279736309; Mon, 09 Apr 2018 06:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523279736; cv=none; d=google.com; s=arc-20160816; b=LYno49JtP3DY7x+MuzWmnaEYh2r7UeAiFQL7T+rqwKdUxDpz0imDFsgkEWeIgB+FKR 73q4uKwcodKpF7NCEfKHYs2i7zGBq7X7RsLkPGeC9roStPFdWL6ww2z2GILlWbxDmgMk J8zzPFojPHXdG3Z9yH87eMlxOHx5e4/mvatk0f1qXMbz97lCPauUlPnnwEeggkp90mEU 9q8oaHoFFvjO+Ez98KSrHpCdXOiPVSD5IYSjMDVJ664Py+HWS5y0OEAii07LCl8jY2IP dMJ3RKocXKgqoMEhnzSIpRtqMRRQhTdxQW25uZdVTGV+V4fwURzm/xyk2p+XcJjCBD8G b7Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=rRBk2LvaJ8uqkoatSQ9PSP328pH8Je6KNSIQkymNYXg=; b=fU7EDR8AzHSKSvfWuuvN6fxrybvyrC3xbIBC80rZkT3+R//T2gR5e1favFoz8n77s9 Ke4UkNVh0RX1VbioAht6DKFr19GCbjadHXVoUgOdIQRra59v8lpFKa8lkD9U5TwHdcbS cSe8nGiXl+LtJjMxi8GB9qtLmDxsiOHvNlhk3Txyp8LcHvbIRRR1XoNFZunW+1E4dThh wDWQAR/InxRhV8U9DzHnZSW9w/+hruvsLjDkIuE9OdJO5k2ke0xMitCpoakpJmaZDrwG 7ZhsSWmK0PN19coClQ1BoQDzuz5sypJThGbYzDfI/d1CKiIkHj2CSH8xLwqP5AlQioCd jR8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=mV01vWfT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9-v6si306007plk.60.2018.04.09.06.14.59; Mon, 09 Apr 2018 06:15:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=mV01vWfT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751673AbeDINI7 (ORCPT + 99 others); Mon, 9 Apr 2018 09:08:59 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:33046 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbeDINI5 (ORCPT ); Mon, 9 Apr 2018 09:08:57 -0400 Received: by mail-qt0-f194.google.com with SMTP id d50so9031680qtc.0 for ; Mon, 09 Apr 2018 06:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=rRBk2LvaJ8uqkoatSQ9PSP328pH8Je6KNSIQkymNYXg=; b=mV01vWfTiK+AKNScZTMc/yUX3zmf+kMi5QjuHQG39uuUZCpHBkArd7O3y8PJq9ToUt f1ARhMpn54AJgKGLIDhqx37LtaDmCmQYfDLW9cdwd15mFKWNzxPtT/um/3wijjvIwYBv 3n3WMxfxGkRJ7Xgt5CpRphjIXAwsbojmg8BW3Zgi1sE47aX9ca2Ifdsvwz9yRehlKd+H ytJV5EMfA2WF7j6qqmzZQGTq7MPgHSmz0N/V+DmDhXp+qND1698B0L/IvXJR+VkcwuRa r6PXsQEJ6aiMJQpX9bDJlfgnB787tt5/2rUH0HpcJ8K55AS/gPL7udkkkuyJB/kYfLoz ky1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=rRBk2LvaJ8uqkoatSQ9PSP328pH8Je6KNSIQkymNYXg=; b=gyR8o0ijq3dQzL2qS8GHBNXV2r87cTS8iVfTFhwxO6Nx7BSioqZ79k6nN2seA7vS9n CgRerApl2Dqf278+WnFZhRkkwW9b7/vz4X2ClYmila3qE/yip9zsFvJFFVtbjJ12XjhZ 1fgquZw5y21QqRnEl9kvmUZL1v+cU+7CpXHzTJ91ng3ArneRZuKQxLoVc31h+TNPoxh7 JI9XiIufL3X45LVOG8x0KxlT0l6+WrHo1vKjOkr1QF6uZKAPSAoKpBgz+GF2M/VE+ZvM PHaHz0ts6UD9UNbjO8c4IIEHd7j/uFo6XRasLuzlg7r5FkFYVXVjXcpoD0Q/YliOm/fD 1i5g== X-Gm-Message-State: ALQs6tCsLYUtbtwUzL46d3wt/uQq3/nDkqGkIoxmepoDJXAhWxpkSEfo phCvw5WFK8mAOEcRpjJuFK9+nzO4PWFb68tyIAU= X-Received: by 10.200.44.164 with SMTP id 33mr54002784qtw.160.1523279336918; Mon, 09 Apr 2018 06:08:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.54.147 with HTTP; Mon, 9 Apr 2018 06:08:56 -0700 (PDT) In-Reply-To: References: From: Geert Uytterhoeven Date: Mon, 9 Apr 2018 15:08:56 +0200 X-Google-Sender-Auth: k4nRddCl6BtCXmjlqgkhll7rOuQ Message-ID: Subject: Re: [PATCH 06/12] block/swim: Fix array bounds check To: Finn Thain Cc: Laurent Vivier , Jens Axboe , linux-m68k , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Finn, On Sun, Apr 1, 2018 at 3:41 AM, Finn Thain wrote: > In the floppy_find() function in swim.c is a call to > get_disk(swd->unit[drive].disk). The actual parameter to this call > can be a NULL pointer when drive == swd->floppy_count. This causes > an oops in get_disk(). > > Data read fault at 0x00000198 in Super Data (pc=0x1be5b6) [...] > Fix the array index bounds check to avoid this. > > Fixes: 8852ecd97488 ("[PATCH] m68k: mac - Add SWIM floppy support") > Cc: Laurent Vivier > Cc: Jens Axboe > Tested-by: Stan Johnson > Signed-off-by: Finn Thain Reviewed-by: Geert Uytterhoeven Looks like amiflop.c:find_floppy() needs a check, too? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds