From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760015AbYESQkb (ORCPT ); Mon, 19 May 2008 12:40:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753102AbYESQkN (ORCPT ); Mon, 19 May 2008 12:40:13 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:40977 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752213AbYESQkL (ORCPT ); Mon, 19 May 2008 12:40:11 -0400 Date: Mon, 19 May 2008 09:36:56 -0700 (PDT) From: Linus Torvalds To: Boaz Harrosh cc: Alan Stern , Maciej Rutecki , Linux Kernel Mailing List , USB list , USB Storage list , SCSI development list Subject: Re: [Re: Linux 2.6.26-rc2] Write protect on on In-Reply-To: <4831A60A.5010308@panasas.com> Message-ID: References: <4831A60A.5010308@panasas.com> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 19 May 2008, Boaz Harrosh wrote: > Alan Stern wrote: > > > > Yes, it never worked properly. But now it fails in a bad way whereas > > before it failed in a benign way. > > You do realize that, that was pure lock to have a zero'ed buffer. Umm. Maybe it SHOULD NOT HAVE BEEN! The thing is, if we can get partial results back, we really *should* either error out, or we should have at least cleared the buffer (either beforehand or when seeing the partial result). Returning a buffer with the old random contents is a bug. And if clearing the buffer not only avoids any security holes and possible undefined behavior, but _also_ ends up fixing the write protect sense issue, all the better! Linus