16 Jun, 2009

1 commit


24 Apr, 2009

1 commit

  • This patch (as1231) fixes a use-after-free bug in g_file_storage. A
    device's name may not be available after the device is unregistered,
    even if the device structure itself is still allocated. Since
    close_backing_file() prints a LUN's name for debugging, it shouldn't
    be called after the LUN has been unregistered.

    That whole area needed to be cleaned up; the backing files were
    getting closed in a couple of different places. The patch fixes
    things so that they get closed in just one place, as part of the
    unbind procedure, immediately before the LUN is unregistered.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

27 Mar, 2009

1 commit


25 Mar, 2009

1 commit


16 Mar, 2009

1 commit

  • Traditionally, changes to struct file->f_flags have been done under BKL
    protection, or with no protection at all. This patch causes all f_flags
    changes after file open/creation time to be done under protection of
    f_lock. This allows the removal of some BKL usage and fixes a number of
    longstanding (if microscopic) races.

    Reviewed-by: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     

28 Feb, 2009

1 commit

  • This patch (as1220) automatically disables stalls when g_file_storage
    finds itself running with an Atmel device controller, because the
    Atmel hardware/driver isn't capable of halting bulk endpoints
    correctly.

    Reported-by: Stanislaw Gruszka
    Signed-off-by: Alan Stern
    Acked-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

08 Jan, 2009

2 commits

  • In some obscure scenarios e.g. passing a 0-byte backing file
    storage, wait_for_completion() would wait forever in fsg_cleanup().

    Prevent it by completing the thread in fsg_bind() error path.

    Signed-off-by: Felipe Balbi
    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Felipe Balbi
     
  • This patch (as1172) adds the ability to emulate a CD-ROM drive to
    g_file_storage. The emulation is limited, since it presents as a disc
    containing a single data track and no audio tracks. Still, it may
    come in useful on occasion.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

06 Jan, 2009

1 commit

  • Fsync currently has a fdatawrite/fdatawait pair around the method call,
    and a mutex_lock/unlock of the inode mutex. All callers of fsync have
    to duplicate this, but we have a few and most of them don't quite get
    it right. This patch adds a new vfs_fsync that takes care of this.
    It's a little more complicated as usual as ->fsync might get a NULL file
    pointer and just a dentry from nfsd, but otherwise gets afile and we
    want to take the mapping and file operations from it when it is there.

    Notes on the fsync callers:

    - ecryptfs wasn't calling filemap_fdatawrite / filemap_fdatawait on the
    lower file
    - coda wasn't calling filemap_fdatawrite / filemap_fdatawait on the host
    file, and returning 0 when ->fsync was missing
    - shm wasn't calling either filemap_fdatawrite / filemap_fdatawait nor
    taking i_mutex. Now given that shared memory doesn't have disk
    backing not doing anything in fsync seems fine and I left it out of
    the vfs_fsync conversion for now, but in that case we might just
    not pass it through to the lower file at all but just call the no-op
    simple_sync_file directly.

    [and now actually export vfs_fsync]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

18 Oct, 2008

2 commits

  • Offer a "how much VBUS power to request" configuration option
    for USB gadgets that aren't using board-specific customization
    of their gadget or (composite) configuration drivers.

    Also remove a couple pointless "depends on USB_GADGET" bits
    from the Kconfig text; booleans inside an "if USB_GADGET" will
    already have that dependency.

    Based on a patch from Justin Clacherty.

    Signed-off-by: David Brownell
    Cc: Justin Clacherty
    Tested-by: Robert Jarzmik
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • Try to workaround issues with bad SCSI implementations
    by ignoring the command size error.

    Signed-off-by: Felipe Balbi
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Felipe Balbi
     

17 Oct, 2008

1 commit

  • Change how the file storage gadget driver builds: don't
    use separate compilation, since it works poorly when key
    parts are library code (with init sections etc). Instead
    be as close as we can to "gcc --combine ...".

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     

26 Jul, 2008

1 commit

  • We want to use WARN() as a variant of WARN_ON(), however a few drivers are
    using WARN() internally. This patch renames these to WARNING() to avoid the
    namespace clash. A few cases were defining but not using the thing, for those
    cases I just deleted the definition.

    Signed-off-by: Arjan van de Ven
    Acked-by: Greg KH
    Cc: Karsten Keil
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

22 Jul, 2008

2 commits


03 May, 2008

1 commit


25 Apr, 2008

2 commits


15 Feb, 2008

1 commit

  • d_path() is used on a pair. Lets use a struct path to
    reflect this.

    [akpm@linux-foundation.org: fix build in mm/memory.c]
    Signed-off-by: Jan Blunck
    Acked-by: Bryan Wu
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Cc: "J. Bruce Fields"
    Cc: Neil Brown
    Cc: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     

02 Feb, 2008

1 commit


20 Oct, 2007

1 commit

  • The task_struct->pid member is going to be deprecated, so start
    using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in
    the kernel.

    The first thing to start with is the pid, printed to dmesg - in
    this case we may safely use task_pid_nr(). Besides, printks produce
    more (much more) than a half of all the explicit pid usage.

    [akpm@linux-foundation.org: git-drm went and changed lots of stuff]
    Signed-off-by: Pavel Emelyanov
    Cc: Dave Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     

13 Oct, 2007

4 commits

  • Move to , reducing
    some of the clutter in the main include directory.

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • This patch (as983) makes a test for minimum-length command sizes in
    g_file_storage less restrictive. It doesn't matter because commands
    with bad lengths will be detected later on anyway, and doing it like
    this makes the driver interoperable with certain buggy hosts such as
    the JVC HiFi (reported by Samuel Hangouet).

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as957) makes some minor cleanups to the g_file_storage
    driver:

    Update the copyright date and version string;

    Uniformize the logging macros for the gadget and the LUNs;

    Remove "inline" markers -- nowadays we rely on the compiler
    to decide which routines are best inlined;

    Use the print_hex_dump() library routines;

    Remove some unnecessary assignments within conditionals
    and fix some close-brace indenting levels;

    Fix some column-80 violations.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • Clean up the file storage gadget, using newer APIs and conventions:

    - gadget_is_dualspeed() and gadget_is_otg() ... #ifdef removal

    - Remove many now-needless #includes

    - Use the DEBUG (from Kconfig+Makefile) and VERBOSE_DEBUG conventions.

    - Remove some "sparse" warnings (it still dislikes the __user annotations)

    This gave only a minor object code shrinkage.

    Signed-off-by: David Brownell
    Cc: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     

23 Aug, 2007

2 commits


18 Jul, 2007

1 commit

  • Currently, the freezer treats all tasks as freezable, except for the kernel
    threads that explicitly set the PF_NOFREEZE flag for themselves. This
    approach is problematic, since it requires every kernel thread to either
    set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
    care for the freezing of tasks at all.

    It seems better to only require the kernel threads that want to or need to
    be frozen to use some freezer-related code and to remove any
    freezer-related code from the other (nonfreezable) kernel threads, which is
    done in this patch.

    The patch causes all kernel threads to be nonfreezable by default (ie. to
    have PF_NOFREEZE set by default) and introduces the set_freezable()
    function that should be called by the freezable kernel threads in order to
    unset PF_NOFREEZE. It also makes all of the currently freezable kernel
    threads call set_freezable(), so it shouldn't cause any (intentional)
    change of behaviour to appear. Additionally, it updates documentation to
    describe the freezing of tasks more accurately.

    [akpm@linux-foundation.org: build fixes]
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Nigel Cunningham
    Cc: Pavel Machek
    Cc: Oleg Nesterov
    Cc: Gautham R Shenoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

13 Jul, 2007

2 commits

  • Remove usb_ep_{alloc,free}_buffer() calls, for small dma-coherent buffers.
    This patch just removes the interface and its users; later patches will
    remove controller driver support.

    - This interface is invariably not implemented correctly in the
    controller drivers (e.g. using dma pools, a mechanism which
    post-dates the interface by several years).

    - At this point no gadget driver really *needs* to use it. In
    current kernels, any driver that needs such a mechanism could
    allocate a dma pool themselves.

    Removing this interface is thus a simplification and improvement.

    Note that the gmidi.c driver had a bug in this area; fixed.

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • Disable file_storage USB_CONFIG_ATT_WAKEUP as it requires
    user interaction during Chapter 9 tests.

    Signed-off-by: Tony Lindgren
    Acked-by: Alan Stern
    Acked-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Tony Lindgren
     

26 Jun, 2007

1 commit

  • New changes in the signal-handling code require compensating changes
    in g_file_storage. This patch (as913) by Oleg Nesterov makes the
    code use allow_signal() instead of sigprocmask().

    From: Alan Stern
    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Oleg Nesterov
     

12 Feb, 2007

1 commit


08 Feb, 2007

2 commits


21 Dec, 2006

1 commit

  • Allow gadget drivers to omit the unbind() method. When they're
    statically linked, that's an appropriate memory saving tweak.

    Similarly, provide consistent/simpler handling for a should-not-happen
    error case: removing a peripheral controller driver when a gadget
    driver is still loaded. Such code dates back to early versions of the
    first implementation of the gadget API, and has never been triggered.

    Includes relevant section annotation fixs for gmidi.c, file_storage.c,
    and serial.c; we don't yet have an "init or exit" annotation. Also
    some whitespace fixes in gmidi.c (space at EOL, before tabs, etc).

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     

09 Dec, 2006

1 commit


08 Dec, 2006

1 commit


02 Oct, 2006

1 commit

  • In some places, particularly drivers and __init code, the init utsns is the
    appropriate one to use. This patch replaces those with a the init_utsname
    helper.

    Changes: Removed several uses of init_utsname(). Hope I picked all the
    right ones in net/ipv4/ipconfig.c. These are now changed to
    utsname() (the per-process namespace utsname) in the previous
    patch (2/7)

    [akpm@osdl.org: CIFS fix]
    Signed-off-by: Serge E. Hallyn
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Herbert Poetzl
    Cc: Andrey Savochkin
    Cc: Serge Hallyn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     

29 Sep, 2006

2 commits