29 May, 2009

1 commit


21 Apr, 2009

1 commit


17 Apr, 2009

2 commits

  • Currently, following test programs don't finished.

    % ruby -e '
    Thread.new { sleep }
    File.read("/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies")
    '

    strace expose the reason.

    ...
    open("/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies", O_RDONLY|O_LARGEFILE) = 3
    ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf9fa6b8) = -1 ENOTTY (Inappropriate ioctl for device)
    fstat64(3, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
    _llseek(3, 0, [0], SEEK_CUR) = 0
    select(4, [3], NULL, NULL, NULL) = 1 (in [3])
    read(3, "1400000 1300000 1200000 1100000 1"..., 4096) = 62
    select(4, [3], NULL, NULL, NULL

    Because Ruby (the scripting language) VM assume select system-call
    against regular file don't block. it because SUSv3 says "Regular files
    shall always poll TRUE for reading and writing". see
    http://www.opengroup.org/onlinepubs/009695399/functions/poll.html it
    seems valid assumption.

    But sysfs_poll() don't keep this rule although sysfs file can read and
    write always.

    This patch restore proper poll behavior to sysfs.
    /sys/block/md*/md/sync_action polling application and another sysfs
    updating sensitive application still can use POLLERR and POLLPRI.

    Cc: Neil Brown
    Signed-off-by: KOSAKI Motohiro
    Signed-off-by: Greg Kroah-Hartman

    KOSAKI Motohiro
     
  • A sysfs attribute using sysfs_schedule_callback() to commit suicide
    may end up calling device_unregister(), which will eventually call
    a driver's ->remove function.

    Drivers may call flush_scheduled_work() in their shutdown routines,
    in which case lockdep will complain with something like the following:

    =============================================
    [ INFO: possible recursive locking detected ]
    2.6.29-rc8-kk #1
    ---------------------------------------------
    events/4/56 is trying to acquire lock:
    (events){--..}, at: [] flush_workqueue+0x0/0xa0

    but task is already holding lock:
    (events){--..}, at: [] run_workqueue+0x108/0x230

    other info that might help us debug this:
    3 locks held by events/4/56:
    #0: (events){--..}, at: [] run_workqueue+0x108/0x230
    #1: (&ss->work){--..}, at: [] run_workqueue+0x108/0x230
    #2: (pci_remove_rescan_mutex){--..}, at: [] remove_callback+0x21/0x40

    stack backtrace:
    Pid: 56, comm: events/4 Not tainted 2.6.29-rc8-kk #1
    Call Trace:
    [] validate_chain+0xb7d/0x1260
    [] __lock_acquire+0x42e/0xa40
    [] lock_acquire+0x58/0x80
    [] ? flush_workqueue+0x0/0xa0
    [] flush_workqueue+0x4d/0xa0
    [] ? flush_workqueue+0x0/0xa0
    [] flush_scheduled_work+0x10/0x20
    [] e1000_remove+0x55/0xfe [e1000e]
    [] ? sysfs_schedule_callback_work+0x0/0x50
    [] pci_device_remove+0x32/0x70
    [] __device_release_driver+0x59/0x90
    [] device_release_driver+0x2b/0x40
    [] bus_remove_device+0xa6/0x120
    [] device_del+0x12b/0x190
    [] device_unregister+0x26/0x70
    [] pci_stop_dev+0x49/0x60
    [] pci_remove_bus_device+0x40/0xc0
    [] remove_callback+0x29/0x40
    [] sysfs_schedule_callback_work+0x1f/0x50
    [] run_workqueue+0x15a/0x230
    [] ? run_workqueue+0x108/0x230
    [] worker_thread+0x9f/0x100
    [] ? autoremove_wake_function+0x0/0x40
    [] ? worker_thread+0x0/0x100
    [] kthread+0x4d/0x80
    [] child_rip+0xa/0x20
    [] ? restore_args+0x0/0x30
    [] ? kthread+0x0/0x80
    [] ? child_rip+0x0/0x20

    Although we know that the device_unregister path will never acquire
    a lock that a driver might try to acquire in its ->remove, in general
    we should never attempt to flush a workqueue from within the same
    workqueue, and lockdep rightly complains.

    So as long as sysfs attributes cannot commit suicide directly and we
    are stuck with this callback mechanism, put the sysfs callbacks on
    their own workqueue instead of the global one.

    This has the side benefit that if a suicidal sysfs attribute kicks
    off a long chain of ->remove callbacks, we no longer induce a long
    delay on the global queue.

    This also fixes a missing module_put in the error path introduced
    by sysfs-only-allow-one-scheduled-removal-callback-per-kobj.patch.

    We never destroy the workqueue, but I'm not sure that's a
    problem.

    Reported-by: Kenji Kaneshige
    Tested-by: Kenji Kaneshige
    Signed-off-by: Alex Chiang
    Signed-off-by: Greg Kroah-Hartman

    Alex Chiang
     

01 Apr, 2009

1 commit

  • Fix warnings and return values in sysfs bin_page_mkwrite(), fixing
    fs/sysfs/bin.c: In function `bin_page_mkwrite':
    fs/sysfs/bin.c:250: warning: passing argument 2 of `bb->vm_ops->page_mkwrite' from incompatible pointer type
    fs/sysfs/bin.c: At top level:
    fs/sysfs/bin.c:280: warning: initialization from incompatible pointer type

    Expects to have my [PATCH next] sysfs: fix some bin_vm_ops errors

    Signed-off-by: Hugh Dickins
    Cc: Nick Piggin
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

28 Mar, 2009

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (37 commits)
    fs: avoid I_NEW inodes
    Merge code for single and multiple-instance mounts
    Remove get_init_pts_sb()
    Move common mknod_ptmx() calls into caller
    Parse mount options just once and copy them to super block
    Unroll essentials of do_remount_sb() into devpts
    vfs: simple_set_mnt() should return void
    fs: move bdev code out of buffer.c
    constify dentry_operations: rest
    constify dentry_operations: configfs
    constify dentry_operations: sysfs
    constify dentry_operations: JFS
    constify dentry_operations: OCFS2
    constify dentry_operations: GFS2
    constify dentry_operations: FAT
    constify dentry_operations: FUSE
    constify dentry_operations: procfs
    constify dentry_operations: ecryptfs
    constify dentry_operations: CIFS
    constify dentry_operations: AFS
    ...

    Linus Torvalds
     
  • Signed-off-by: Al Viro

    Al Viro
     

25 Mar, 2009

7 commits

  • Commit 86c9508eb1c0ce5aa07b5cf1d36b60c54efc3d7a
    "sysfs: don't block indefinitely for unmapped files" in linux-next
    crashes the PowerMac G5 when X starts up. It's caught out by the way
    powerpc's pci_mmap of legacy_mem uses shmem_zero_setup(), substituting
    a new vma->vm_file whose private_data no longer points to the bin_buffer
    (substitution done because some versions of X crash if that mmap fails).

    The fix to this is straightforward: the original vm_file is fput() in
    that case, so this mmap won't block sysfs at all, so just don't switch
    over to bin_vm_ops if vm_file has changed.

    But more fixes made before realizing that was the problem:-

    It should not be an error if bin_page_mkwrite() finds no underlying
    page_mkwrite().

    Check that a file already mmap'ed has the same underlying vm_ops
    _before_ pointing vma->vm_ops at bin_vm_ops.

    If the file being mmap'ed is a shmem/tmpfs file, don't fail the mmap
    on CONFIG_NUMA=y, just because that has a set_policy and get_policy:
    provide bin_set_policy, bin_get_policy and bin_migrate.

    Signed-off-by: Hugh Dickins
    Acked-by: Eric Biederman
    Signed-off-by: Greg Kroah-Hartman

    Hugh Dickins
     
  • The only way for a sysfs attribute to remove itself (without
    deadlock) is to use the sysfs_schedule_callback() interface.

    Vegard Nossum discovered that a poorly written sysfs ->store
    callback can repeatedly schedule remove callbacks on the same
    device over and over, e.g.

    $ while true ; do echo 1 > /sys/devices/.../remove ; done

    If the 'remove' attribute uses the sysfs_schedule_callback API
    and also does not protect itself from concurrent accesses, its
    callback handler will be called multiple times, and will
    eventually attempt to perform operations on a freed kobject,
    leading to many problems.

    Instead of requiring all callers of sysfs_schedule_callback to
    implement their own synchronization, provide the protection in
    the infrastructure.

    Now, sysfs_schedule_callback will only allow one scheduled
    callback per kobject. On subsequent calls with the same kobject,
    return -EAGAIN.

    This is a short term fix. The long term fix is to allow sysfs
    attributes to remove themselves directly, without any of this
    callback hokey pokey.

    [cornelia.huck@de.ibm.com: s390 ccwgroup bits]

    Reported-by: vegard.nossum@gmail.com
    Signed-off-by: Alex Chiang
    Acked-by: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Alex Chiang
     
  • Modify sysfs bin files so that we can remove the bin file while they are
    still mapped. When the kobject is removed we unmap the bin file and
    arrange for future accesses to the mapping to receive SIGBUS.

    Implementing this prevents a nasty DOS when pci devices are hot plugged
    and unplugged. Where if any of their resources were mmaped the kernel
    could not free up their pci resources or release their pci data
    structures.

    [akpm@linux-foundation.org: remove unused var]
    Signed-off-by: Eric W. Biederman
    Cc: Jesse Barnes
    Acked-by: Tejun Heo
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • The sysfs_dirent serves as both an inode and a directory entry
    for sysfs. To prevent the sysfs inode numbers from being freed
    prematurely hold a reference to sysfs_dirent from the sysfs inode.

    [akpm@linux-foundation.org: add comment]
    Signed-off-by: Eric W. Biederman
    Cc: Tejun Heo
    Cc: Al Viro
    Cc: Cornelia Huck
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • sysfs: sysfs_add_one WARNs with full path to duplicate filename

    As a debugging aid, it can be useful to know the full path to a
    duplicate file being created in sysfs.

    We now will display warnings such as:

    sysfs: cannot create duplicate filename '/foo'

    when attempting to create multiple files named 'foo' in the sysfs
    root, or:

    sysfs: cannot create duplicate filename '/bus/pci/slots/5/foo'

    when attempting to create multiple files named 'foo' under a
    given directory in sysfs.

    The path displayed is always a relative path to sysfs_root. The
    leading '/' in the path name refers to the sysfs_root mount
    point, and should not be confused with the "real" '/'.

    Thanks to Alex Williamson for essentially writing sysfs_pathname.

    Cc: Alex Williamson
    Signed-off-by: Alex Chiang
    Signed-off-by: Greg Kroah-Hartman

    Alex Chiang
     
  • sysfs_get_inode ultimately calls sysfs_count_nlink when the a
    directory inode is fectched. sysfs_count_nlink needs to be
    called under the sysfs_mutex to guard against the unlikely
    but possible scenario that the root directory is changing
    as we are counting the number entries in it, and just in
    general to be consistent.

    Signed-off-by: Eric W. Biederman
    Acked-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • SYSFS_MAGIC has been added into magic.h, so only use that definition
    in magic.h to avoid potential consistency problem.

    Signed-off-by: Qinghuang Feng
    Signed-off-by: Greg Kroah-Hartman

    Qinghuang Feng
     

27 Jan, 2009

1 commit


22 Jan, 2009

1 commit


21 Jan, 2009

1 commit

  • Some sysfs binary files don't like having 0 passed to them as a size.
    Fix this up at the root by just returning to the vfs if userspace asks
    us for a zero sized buffer.

    Thanks to Pavel Roskin for pointing this out.

    Reported-by: Pavel Roskin
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

06 Jan, 2009

1 commit


23 Oct, 2008

1 commit


17 Oct, 2008

6 commits

  • It finally dawned on me what the clean fix to sysfs_rename_dir
    calling kobject_set_name is. Move the work into kobject_rename
    where it belongs. The callers serialize us anyway so this is
    safe.

    Signed-off-by: Eric W. Biederman
    Acked-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • Because they can be, and because code like this produces a warning if
    they're not:

    struct device_attribute dev_attr;

    sysfs_notify(&kobj, NULL, dev_attr.attr.name);

    Signed-off-by: Trent Piepho
    CC: Neil Brown
    Signed-off-by: Greg Kroah-Hartman

    Trent Piepho
     
  • As inode creation is protected by sysfs_mutex, ilookup5_nowait()
    always either fails to find at all or finds one which is fully
    initialized, so using ilookup5_nowait() or ilookup5() doesn't make any
    difference. Switch to ilookup5() as it's planned to be removed. This
    change also makes lookup return value handling a bit simpler.

    This change was suggested by Al Viro.

    Signed-off-by: Tejun Heo
    Cc: Al Viro
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     
  • On Thu, Sep 11, 2008 at 10:27:10AM +0200, Ingo Molnar wrote:

    > and it's working fine on most boxes. One testbox found this new locking
    > scenario:
    >
    > PM: Adding info for No Bus:vcsa7
    > EDAC DEBUG: MC0: i82860_check()
    >
    > =======================================================
    > [ INFO: possible circular locking dependency detected ]
    > 2.6.27-rc6-tip #1
    > -------------------------------------------------------
    > X/4873 is trying to acquire lock:
    > (&bb->mutex){--..}, at: [] mmap+0x40/0xa0
    >
    > but task is already holding lock:
    > (&mm->mmap_sem){----}, at: [] sys_mmap2+0x8e/0xc0
    >
    > which lock already depends on the new lock.
    >
    >
    > the existing dependency chain (in reverse order) is:
    >
    > -> #1 (&mm->mmap_sem){----}:
    > [] validate_chain+0xa96/0xf50
    > [] __lock_acquire+0x2cb/0x5b0
    > [] lock_acquire+0x89/0xc0
    > [] might_fault+0x6b/0x90
    > [] copy_to_user+0x38/0x60
    > [] read+0xfb/0x170
    > [] vfs_read+0x95/0x110
    > [] sys_pread64+0x63/0x80
    > [] sysenter_do_call+0x12/0x43
    > [] 0xffffffff
    >
    > -> #0 (&bb->mutex){--..}:
    > [] validate_chain+0x6b7/0xf50
    > [] __lock_acquire+0x2cb/0x5b0
    > [] lock_acquire+0x89/0xc0
    > [] __mutex_lock_common+0xab/0x3c0
    > [] mutex_lock_nested+0x38/0x50
    > [] mmap+0x40/0xa0
    > [] mmap_region+0x14e/0x450
    > [] do_mmap_pgoff+0x2ef/0x310
    > [] sys_mmap2+0xad/0xc0
    > [] sysenter_do_call+0x12/0x43
    > [] 0xffffffff
    >
    > other info that might help us debug this:
    >
    > 1 lock held by X/4873:
    > #0: (&mm->mmap_sem){----}, at: [] sys_mmap2+0x8e/0xc0
    >
    > stack backtrace:
    > Pid: 4873, comm: X Not tainted 2.6.27-rc6-tip #1
    > [] print_circular_bug_tail+0x79/0xc0
    > [] validate_chain+0x6b7/0xf50
    > [] ? trace_hardirqs_off_caller+0x15/0xb0
    > [] __lock_acquire+0x2cb/0x5b0
    > [] lock_acquire+0x89/0xc0
    > [] ? mmap+0x40/0xa0
    > [] __mutex_lock_common+0xab/0x3c0
    > [] ? mmap+0x40/0xa0
    > [] mutex_lock_nested+0x38/0x50
    > [] ? mmap+0x40/0xa0
    > [] mmap+0x40/0xa0
    > [] mmap_region+0x14e/0x450
    > [] ? arch_get_unmapped_area_topdown+0xf8/0x160
    > [] do_mmap_pgoff+0x2ef/0x310
    > [] sys_mmap2+0xad/0xc0
    > [] sysenter_do_call+0x12/0x43
    > [] ? __switch_to+0x130/0x220
    > =======================
    > evbug.c: Event. Dev: input3, Type: 20, Code: 0, Value: 500
    > warning: `sudo' uses deprecated v2 capabilities in a way that may be insecure.
    >
    > i've attached the config.
    >
    > at first sight it looks like a genuine bug in fs/sysfs/bin.c?

    Yes, it is a real bug by the looks. bin.c takes bb->mutex under mmap_sem
    when it is mmapped, and then does its copy_*_user under bb->mutex too.

    Here is a basic fix for the sysfs lor.

    From: Nick Piggin
    Signed-off-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Nick Piggin
     
  • Support sysfs_notify from atomic context with new sysfs_notify_dirent

    sysfs_notify currently takes sysfs_mutex.
    This means that it cannot be called in atomic context.
    sysfs_mutex is sometimes held over a malloc (sysfs_rename_dir)
    so it can block on low memory.

    In md I want to be able to notify on a sysfs attribute from
    atomic context, and I don't want to block on low memory because I
    could be in the writeout path for freeing memory.

    So:
    - export the "sysfs_dirent" structure along with sysfs_get, sysfs_put
    and sysfs_get_dirent so I can get the sysfs_dirent that I want to
    notify on and hold it in an md structure.
    - split sysfs_notify_dirent out of sysfs_notify so the sysfs_dirent
    can be notified on with no blocking (just a spinlock).

    Signed-off-by: Neil Brown
    Acked-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Neil Brown
     
  • Print the name of the last-accessed sysfs file when we oops, to help track
    down oopses which occur in sysfs store/read handlers. Because these oopses
    tend to not leave any trace of the offending code in the stack traces.

    Cc: Kay Sievers
    Cc: Mathieu Desnoyers
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Andrew Morton
     

27 Jul, 2008

1 commit

  • Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes
    part of the warning section for better reporting/collection. Also, with this,
    one fo the if() sections collapses entirely into the WARN().

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

22 Jul, 2008

2 commits

  • driver core: Suppress sysfs warnings for device_rename().

    Renaming network devices to an already existing name is not
    something we want sysfs to print a scary warning for, since the
    callers can deal with this correctly. So let's introduce
    sysfs_create_link_nowarn() which gets rid of the common warning.

    Signed-off-by: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Cornelia Huck
     
  • sysfs_chmod_file() calls notify_change() to change the permission bits
    on a sysfs file. Replace with explicit call to sysfs_setattr() and
    fsnotify_change().

    This is equivalent, except that security_inode_setattr() is not
    called. This function is called by drivers, so the security checks do
    not make any sense.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Greg Kroah-Hartman

    Miklos Szeredi
     

15 May, 2008

1 commit

  • It is possible that the entry in sysfs already exists, one case of this is
    when a network device is renamed to bonding_masters. Anyway, in this case
    the proper error path is for device_rename to return an error code, not to
    generate bogus backtrace and errors.

    Also, to avoid possible races, the create link should be done before the
    remove link. This makes a device rename atomic operation like other renames.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

01 May, 2008

1 commit

  • sysfs allows attribute files to be truncated, e.g. using ftruncate(), with the
    expected effect on their inode. For most attributes, this doesn't change the
    "real" size of the file i.e. how much can be read from it. However, the
    parameter validation for reading and writing binary attribute files is based
    on the inode size and not the size specified in the file's bin_attribute, so it
    can be broken by this. For example, if we try using dd to write to such a file:

    # pwd
    /sys/bus/pci/devices/0000:08:00.0
    # ls -l config
    -rw-r--r-- 1 root root 4096 Feb 1 17:35 config
    # dd if=/dev/zero of=config bs=4 count=1
    1+0 records in
    1+0 records out
    # ls -l config
    -rw-r--r-- 1 root root 0 Feb 1 17:50 config
    # dd if=/dev/zero of=config bs=4 count=1 seek=128
    dd: writing `config': No space left on device
    1+0 records in
    0+0 records out

    Also, after truncation to 0, parameter validation for read and write is
    disabled. Most bin_attribute read and write methods also validate the size and
    offset, but for some this will allow out-of-range access. This may be a
    security issue, though access to such files is often limited to root. In any
    case, the validation should remain for safety's sake!)

    This was previously reported in Bugzilla as bug 9867.

    sysfs should ignore size changes or else refuse them (by returning -EINVAL).
    This patch makes it ignore them.

    Signed-off-by: Ben Hutchings
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     

30 Apr, 2008

2 commits

  • __FUNCTION__ is gcc-specific, use __func__

    Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • Add a new BDI capability flag: BDI_CAP_NO_ACCT_WB. If this flag is
    set, then don't update the per-bdi writeback stats from
    test_set_page_writeback() and test_clear_page_writeback().

    Misc cleanups:

    - convert bdi_cap_writeback_dirty() and friends to static inline functions
    - create a flag that includes all three dirty/writeback related flags,
    since almst all users will want to have them toghether

    Signed-off-by: Miklos Szeredi
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     

23 Apr, 2008

1 commit

  • We have a problem in scsi_transport_spi in that we need to customise
    not only the visibility of the attributes, but also their mode. Fix
    this by making the is_visible() callback return a mode, with 0
    indicating is not visible.

    Also add a sysfs_update_group() API to allow us to change either the
    visibility or mode of the files at any time on the fly.

    Acked-by: Kay Sievers
    Signed-off-by: James Bottomley

    James Bottomley
     

20 Apr, 2008

2 commits

  • Requiring userspace to close and re-open sysfs attributes has been the
    policy since before 2.6.12. It allows userspace to get a consistent
    snapshot of kernel state and consume it with incremental reads and seeks.

    Now, if the file position is zero the kernel assumes userspace wants to see
    the new value. The application for this change is to allow a userspace
    RAID metadata handler to check the state of an array without causing any
    memory allocations. Thus not causing writeback to a raid array that might
    be blocked waiting for userspace to take action.

    Cc: Neil Brown
    Acked-by: Tejun Heo
    Signed-off-by: Dan Williams
    Signed-off-by: Greg Kroah-Hartman

    Dan Williams
     
  • After an experimental deletion of the unnecessary inclusion of
    from the header file , the following
    files under fs/sysfs were exposed as needing to explicitly include
    .

    Signed-off-by: Robert P. J. Day
    Signed-off-by: Greg Kroah-Hartman

    Robert P. J. Day
     

18 Apr, 2008

1 commit

  • Allow callers of sysfs_remove_link() to pass a NULL kobj, in which case
    sysfs_root will be used as the parent directory. This allows us to tear down
    top level symlinks created via sysfs_create_link(), which already has
    similar handling of a NULL parent object.

    Signed-off-by: Mark Fasheh
    Acked-by: Greg Kroah-Hartman

    Mark Fasheh
     

25 Mar, 2008

1 commit


08 Feb, 2008

1 commit

  • It's possible that the caller of sysfs_remove_group messed up and passed in an attribute group that was not really registered to this kobject. But don't panic for such a foolish error, spit out a warning about what happened, and continue on our way safely.

    Cc: Roland Dreier
    Cc: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

26 Jan, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits)
    [SCSI] usbstorage: use last_sector_bug flag universally
    [SCSI] libsas: abstract STP task status into a function
    [SCSI] ultrastor: clean up inline asm warnings
    [SCSI] aic7xxx: fix firmware build
    [SCSI] aacraid: fib context lock for management ioctls
    [SCSI] ch: remove forward declarations
    [SCSI] ch: fix device minor number management bug
    [SCSI] ch: handle class_device_create failure properly
    [SCSI] NCR5380: fix section mismatch
    [SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices
    [SCSI] IB/iSER: add logical unit reset support
    [SCSI] don't use __GFP_DMA for sense buffers if not required
    [SCSI] use dynamically allocated sense buffer
    [SCSI] scsi.h: add macro for enclosure bit of inquiry data
    [SCSI] sd: add fix for devices with last sector access problems
    [SCSI] fix pcmcia compile problem
    [SCSI] aacraid: add Voodoo Lite class of cards.
    [SCSI] aacraid: add new driver features flags
    [SCSI] qla2xxx: Update version number to 8.02.00-k7.
    [SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command.
    ...

    Linus Torvalds
     

25 Jan, 2008

1 commit

  • Remove the no longer needed subsys_attributes, they are all converted to
    the more sensical kobj_attributes.

    There is no longer a magic fallback in sysfs attribute operations, all
    kobjects which create simple attributes need explicitely a ktype
    assigned, which tells the core what was intended here.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers