Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752386Ab2FROSo (ORCPT ); Mon, 18 Jun 2012 10:18:44 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:42482 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751212Ab2FROSn (ORCPT ); Mon, 18 Jun 2012 10:18:43 -0400 Date: Mon, 18 Jun 2012 10:18:41 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Michal Nazarewicz cc: Felipe Balbi , , Subject: Re: [PATCH 3/3] usb: gadget: mass_storage: require backing file for non-removable LUNs In-Reply-To: <593bff689c31fefb07534e3f500d8a8c29fcdacb.1340022674.git.mina86@mina86.com> Message-ID: 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 Content-Length: 827 Lines: 21 On Mon, 18 Jun 2012, Michal Nazarewicz wrote: > From: Michal Nazarewicz > > The fsg_file_store() function does not check whether a LUN is removable or not > allowing one to specify an empty file name for a non-removable LUN. This > commit adds explicit check of whether a file name is provided for > non-removable LUNs. Looks okay. Note that in file_storage.c, the "file" attribute isn't writable if the LUN isn't removable, and the "ro" attribute isn't writable if the LUN is a cdrom. Maybe you would prefer to do things that way instead. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/