04 Mar, 2011

4 commits

  • The VFS mount code passes the mount options to the LSM. The LSM will remove
    options it understands from the data and the VFS will then pass the remaining
    options onto the underlying filesystem. This is how options like the
    SELinux context= work. The problem comes in that -o remount never calls
    into LSM code. So if you include an LSM specific option it will get passed
    to the filesystem and will cause the remount to fail. An example of where
    this is a problem is the 'seclabel' option. The SELinux LSM hook will
    print this word in /proc/mounts if the filesystem is being labeled using
    xattrs. If you pass this word on mount it will be silently stripped and
    ignored. But if you pass this word on remount the LSM never gets called
    and it will be passed to the FS. The FS doesn't know what seclabel means
    and thus should fail the mount. For example an ext3 fs mounted over loop

    # mount -o loop /tmp/fs /mnt/tmp
    # cat /proc/mounts | grep /mnt/tmp
    /dev/loop0 /mnt/tmp ext3 rw,seclabel,relatime,errors=continue,barrier=0,data=ordered 0 0
    # mount -o remount /mnt/tmp
    mount: /mnt/tmp not mounted already, or bad option
    # dmesg
    EXT3-fs (loop0): error: unrecognized mount option "seclabel" or missing value

    This patch passes the remount mount options to an new LSM hook.

    Signed-off-by: Eric Paris
    Reviewed-by: James Morris

    Eric Paris
     
  • The security context for the newly created socket shares the same
    user, role and MLS attribute as its creator but may have a different
    type, which could be specified by a type_transition rule in the relevant
    policy package.

    Signed-off-by: Harry Ciao
    [fix call to security_transition_sid to include qstr, Eric Paris]
    Signed-off-by: Eric Paris
    Acked-by: Stephen Smalley

    Harry Ciao
     
  • The socket SID would be computed on creation and no longer inherit
    its creator's SID by default. Socket may have a different type but
    needs to retain the creator's role and MLS attribute in order not
    to break labeled networking and network access control.

    The kernel value for a class would be used to determine if the class
    if one of socket classes. If security_compute_sid is called from
    userspace the policy value for a class would be mapped to the relevant
    kernel value first.

    Signed-off-by: Harry Ciao
    Signed-off-by: Eric Paris
    Acked-by: Stephen Smalley

    Harry Ciao
     
  • The security_is_socket_class() is auto-generated by genheaders based
    on classmap.h to reduce maintenance effort when a new class is defined
    in SELinux kernel. The name for any socket class should be suffixed by
    "socket" and doesn't contain more than one substr of "socket".

    Signed-off-by: Harry Ciao
    Signed-off-by: Eric Paris
    Acked-by: Stephen Smalley

    Harry Ciao
     

26 Feb, 2011

5 commits

  • This reverts commit 242631c49d4cf39642741d6627750151b058233b.

    Conflicts:

    security/selinux/hooks.c

    SELinux used to recognize certain individual ioctls and check
    permissions based on the knowledge of the individual ioctl. In commit
    242631c49d4cf396 the SELinux code stopped trying to understand
    individual ioctls and to instead looked at the ioctl access bits to
    determine in we should check read or write for that operation. This
    same suggestion was made to SMACK (and I believe copied into TOMOYO).
    But this suggestion is total rubbish. The ioctl access bits are
    actually the access requirements for the structure being passed into the
    ioctl, and are completely unrelated to the operation of the ioctl or the
    object the ioctl is being performed upon.

    Take FS_IOC_FIEMAP as an example. FS_IOC_FIEMAP is defined as:

    FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)

    So it has access bits R and W. What this really means is that the
    kernel is going to both read and write to the struct fiemap. It has
    nothing at all to do with the operations that this ioctl might perform
    on the file itself!

    Signed-off-by: Eric Paris
    Acked-by: Stephen Smalley

    Eric Paris
     
  • These permissions are not used and can be dropped in the kernel
    definitions.

    Suggested-by: Stephen Smalley
    Signed-off-by: Eric Paris
    Acked-by: Stephen Smalley

    Eric Paris
     
  • The IPSKB_FORWARDED and IP6SKB_FORWARDED flags are used only in the
    multicast forwarding case to indicate that a packet looped back after
    forward. So these flags are not a good indicator for packet forwarding.
    A better indicator is the incoming interface. If we have no socket context,
    but an incoming interface and we see the packet in the ip postroute hook,
    the packet is going to be forwarded.

    With this patch we use the incoming interface as an indicator on packet
    forwarding.

    Signed-off-by: Steffen Klassert
    Acked-by: Paul Moore
    Signed-off-by: Eric Paris

    Steffen Klassert
     
  • selinux_sock_rcv_skb_compat and selinux_ip_postroute_compat are just
    called if selinux_policycap_netpeer is not set. However in these
    functions we check if selinux_policycap_netpeer is set. This leads
    to some dead code and to the fact that selinux_xfrm_postroute_last
    is never executed. This patch removes the dead code and the checks
    for selinux_policycap_netpeer in the compatibility functions.

    Signed-off-by: Steffen Klassert
    Acked-by: Paul Moore
    Signed-off-by: Eric Paris

    Steffen Klassert
     
  • selinux_xfrm_sec_ctx_alloc accidentally checks the xfrm domain of
    interpretation against the selinux context algorithm. This patch
    fixes this by checking ctx_alg against the selinux context algorithm.

    Signed-off-by: Steffen Klassert
    Acked-by: Paul Moore
    Signed-off-by: Eric Paris

    Steffen Klassert
     

02 Feb, 2011

4 commits

  • The only user for this hook was selinux. sysctl routes every call
    through /proc/sys/. Selinux and other security modules use the file
    system checks for sysctl too, so no need for this hook any more.

    Signed-off-by: Lucian Adrian Grijincu
    Signed-off-by: Eric Paris

    Lucian Adrian Grijincu
     
  • This fixes an old (2007) selinux regression: filesystem labeling for
    /proc/sys returned
    -r--r--r-- unknown /proc/sys/fs/file-nr
    instead of
    -r--r--r-- system_u:object_r:sysctl_fs_t:s0 /proc/sys/fs/file-nr

    Events that lead to breaking of /proc/sys/ selinux labeling:

    1) sysctl was reimplemented to route all calls through /proc/sys/

    commit 77b14db502cb85a031fe8fde6c85d52f3e0acb63
    [PATCH] sysctl: reimplement the sysctl proc support

    2) proc_dir_entry was removed from ctl_table:

    commit 3fbfa98112fc3962c416452a0baf2214381030e6
    [PATCH] sysctl: remove the proc_dir_entry member for the sysctl tables

    3) selinux still walked the proc_dir_entry tree to apply
    labeling. Because ctl_tables don't have a proc_dir_entry, we did
    not label /proc/sys/ inodes any more. To achieve this the /proc/sys/
    inodes were marked private and private inodes were ignored by
    selinux.

    commit bbaca6c2e7ef0f663bc31be4dad7cf530f6c4962
    [PATCH] selinux: enhance selinux to always ignore private inodes

    commit 86a71dbd3e81e8870d0f0e56b87875f57e58222b
    [PATCH] sysctl: hide the sysctl proc inodes from selinux

    Access control checks have been done by means of a special sysctl hook
    that was called for read/write accesses to any /proc/sys/ entry.

    We don't have to do this because, instead of walking the
    proc_dir_entry tree we can walk the dentry tree (as done in this
    patch). With this patch:
    * we don't mark /proc/sys/ inodes as private
    * we don't need the sysclt security hook
    * we walk the dentry tree to find the path to the inode.

    We have to strip the PID in /proc/PID/ entries that have a
    proc_dir_entry because selinux does not know how to label paths like
    '/1/net/rpc/nfsd.fh' (and defaults to 'proc_t' labeling). Selinux does
    know of '/net/rpc/nfsd.fh' (and applies the 'sysctl_rpc_t' label).

    PID stripping from the path was done implicitly in the previous code
    because the proc_dir_entry tree had the root in '/net' in the example
    from above. The dentry tree has the root in '/1'.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Lucian Adrian Grijincu
    Signed-off-by: Eric Paris

    Lucian Adrian Grijincu
     
  • Currently SELinux has rules which label new objects according to 3 criteria.
    The label of the process creating the object, the label of the parent
    directory, and the type of object (reg, dir, char, block, etc.) This patch
    adds a 4th criteria, the dentry name, thus we can distinguish between
    creating a file in an etc_t directory called shadow and one called motd.

    There is no file globbing, regex parsing, or anything mystical. Either the
    policy exactly (strcmp) matches the dentry name of the object or it doesn't.
    This patch has no changes from today if policy does not implement the new
    rules.

    Signed-off-by: Eric Paris

    Eric Paris
     
  • SELinux would like to implement a new labeling behavior of newly created
    inodes. We currently label new inodes based on the parent and the creating
    process. This new behavior would also take into account the name of the
    new object when deciding the new label. This is not the (supposed) full path,
    just the last component of the path.

    This is very useful because creating /etc/shadow is different than creating
    /etc/passwd but the kernel hooks are unable to differentiate these
    operations. We currently require that userspace realize it is doing some
    difficult operation like that and than userspace jumps through SELinux hoops
    to get things set up correctly. This patch does not implement new
    behavior, that is obviously contained in a seperate SELinux patch, but it
    does pass the needed name down to the correct LSM hook. If no such name
    exists it is fine to pass NULL.

    Signed-off-by: Eric Paris

    Eric Paris
     

24 Jan, 2011

2 commits


18 Jan, 2011

1 commit

  • In the embedded world there are often situations
    where libraries are updated from a variety of sources,
    for a variety of reasons, and with any number of
    security characteristics. These differences
    might include privilege required for a given library
    provided interface to function properly, as occurs
    from time to time in graphics libraries. There are
    also cases where it is important to limit use of
    libraries based on the provider of the library and
    the security aware application may make choices
    based on that criteria.

    These issues are addressed by providing an additional
    Smack label that may optionally be assigned to an object,
    the SMACK64MMAP attribute. An mmap operation is allowed
    if there is no such attribute.

    If there is a SMACK64MMAP attribute the mmap is permitted
    only if a subject with that label has all of the access
    permitted a subject with the current task label.

    Security aware applications may from time to time
    wish to reduce their "privilege" to avoid accidental use
    of privilege. One case where this arises is the
    environment in which multiple sources provide libraries
    to perform the same functions. An application may know
    that it should eschew services made available from a
    particular vendor, or of a particular version.

    In support of this a secondary list of Smack rules has
    been added that is local to the task. This list is
    consulted only in the case where the global list has
    approved access. It can only further restrict access.
    Unlike the global last, if no entry is found on the
    local list access is granted. An application can add
    entries to its own list by writing to /smack/load-self.

    The changes appear large as they involve refactoring
    the list handling to accomodate there being more
    than one rule list.

    Signed-off-by: Casey Schaufler

    Casey Schaufler
     

10 Jan, 2011

2 commits


08 Jan, 2011

18 commits

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus:
    hfsplus: %L-to-%ll, macro correction, and remove unneeded braces
    hfsplus: spaces/indentation clean-up
    hfsplus: C99 comments clean-up
    hfsplus: over 80 character lines clean-up
    hfsplus: fix an artifact in ioctl flag checking
    hfsplus: flush disk caches in sync and fsync
    hfsplus: optimize fsync
    hfsplus: split up inode flags
    hfsplus: write up fsync for directories
    hfsplus: simplify fsync
    hfsplus: avoid useless work in hfsplus_sync_fs
    hfsplus: make sure sync writes out all metadata
    hfsplus: use raw bio access for partition tables
    hfsplus: use raw bio access for the volume headers
    hfsplus: always use hfsplus_sync_fs to write the volume header
    hfsplus: silence a few debug printks
    hfsplus: fix option parsing during remount

    Fix up conflicts due to VFS changes in fs/hfsplus/{hfsplus_fs.h,unicode.c}

    Linus Torvalds
     
  • * 'next-spi' of git://git.secretlab.ca/git/linux-2.6: (77 commits)
    spi/omap: Fix DMA API usage in OMAP MCSPI driver
    spi/imx: correct the test on platform_get_irq() return value
    spi/topcliff: Typo fix threhold to threshold
    spi/dw_spi Typo change diable to disable.
    spi/fsl_espi: change the read behaviour of the SPIRF
    spi/mpc52xx-psc-spi: move probe/remove to proper sections
    spi/dw_spi: add DMA support
    spi/dw_spi: change to EXPORT_SYMBOL_GPL for exported APIs
    spi/dw_spi: Fix too short timeout in spi polling loop
    spi/pl022: convert running variable
    spi/pl022: convert busy flag to a bool
    spi/pl022: pass the returned sglen to the DMA engine
    spi/pl022: map the buffers on the DMA engine
    spi/topcliff_pch: Fix data transfer issue
    spi/imx: remove autodetection
    spi/pxa2xx: pass of_node to spi device and set a parent device
    spi/pxa2xx: Modify RX-Tresh instead of busy-loop for the remaining RX bytes.
    spi/pxa2xx: Add chipselect support for Sodaville
    spi/pxa2xx: Consider CE4100's FIFO depth
    spi/pxa2xx: Add CE4100 support
    ...

    Linus Torvalds
     
  • * 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (30 commits)
    gameport: use this_cpu_read instead of lookup
    x86: udelay: Use this_cpu_read to avoid address calculation
    x86: Use this_cpu_inc_return for nmi counter
    x86: Replace uses of current_cpu_data with this_cpu ops
    x86: Use this_cpu_ops to optimize code
    vmstat: User per cpu atomics to avoid interrupt disable / enable
    irq_work: Use per cpu atomics instead of regular atomics
    cpuops: Use cmpxchg for xchg to avoid lock semantics
    x86: this_cpu_cmpxchg and this_cpu_xchg operations
    percpu: Generic this_cpu_cmpxchg() and this_cpu_xchg support
    percpu,x86: relocate this_cpu_add_return() and friends
    connector: Use this_cpu operations
    xen: Use this_cpu_inc_return
    taskstats: Use this_cpu_ops
    random: Use this_cpu_inc_return
    fs: Use this_cpu_inc_return in buffer.c
    highmem: Use this_cpu_xx_return() operations
    vmstat: Use this_cpu_inc_return for vm statistics
    x86: Support for this_cpu_add, sub, dec, inc_return
    percpu: Generic support for this_cpu_add, sub, dec, inc_return
    ...

    Fixed up conflicts: in arch/x86/kernel/{apic/nmi.c, apic/x2apic_uv_x.c, process.c}
    as per Tejun.

    Linus Torvalds
     
  • * 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (33 commits)
    usb: don't use flush_scheduled_work()
    speedtch: don't abuse struct delayed_work
    media/video: don't use flush_scheduled_work()
    media/video: explicitly flush request_module work
    ioc4: use static work_struct for ioc4_load_modules()
    init: don't call flush_scheduled_work() from do_initcalls()
    s390: don't use flush_scheduled_work()
    rtc: don't use flush_scheduled_work()
    mmc: update workqueue usages
    mfd: update workqueue usages
    dvb: don't use flush_scheduled_work()
    leds-wm8350: don't use flush_scheduled_work()
    mISDN: don't use flush_scheduled_work()
    macintosh/ams: don't use flush_scheduled_work()
    vmwgfx: don't use flush_scheduled_work()
    tpm: don't use flush_scheduled_work()
    sonypi: don't use flush_scheduled_work()
    hvsi: don't use flush_scheduled_work()
    xen: don't use flush_scheduled_work()
    gdrom: don't use flush_scheduled_work()
    ...

    Fixed up trivial conflict in drivers/media/video/bt8xx/bttv-input.c
    as per Tejun.

    Linus Torvalds
     
  • …l/git/tip/linux-2.6-tip

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Constify function scope static struct sched_param usage
    sched: Fix strncmp operation
    sched: Move sched_autogroup_exit() to free_signal_struct()
    sched: Fix struct autogroup memory leak
    sched: Mark autogroup_init() __init
    sched: Consolidate the name of root_task_group and init_task_group

    Linus Torvalds
     
  • …/kernel/git/tip/linux-2.6-tip

    * 'x86-apic-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: apic: Cleanup and simplify setup_local_APIC()
    x86: Further simplify mp_irq info handling
    x86: Unify 3 similar ways of saving mp_irqs info
    x86, ioapic: Avoid writing io_apic id if already correct
    x86, x2apic: Don't map lapic addr for preenabled x2apic systems
    x86, sfi: Use register_lapic_address()
    x86, apic: Use register_lapic_address() in init_apic_mapping()
    x86, apic: Remove early_init_lapic_mapping()
    x86, apic: Unify identical register_lapic_address() functions

    Linus Torvalds
     
  • * 'mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
    EDAC, MCE: Fix NB error formatting
    EDAC, MCE: Use BIT_64() to eliminate warnings on 32-bit
    EDAC, MCE: Enable MCE decoding on F15h
    EDAC, MCE: Allow F15h bank 6 MCE injection
    EDAC, MCE: Shorten error report formatting
    EDAC, MCE: Overhaul error fields extraction macros
    EDAC, MCE: Add F15h FP MCE decoder
    EDAC, MCE: Add F15 EX MCE decoder
    EDAC, MCE: Add an F15h NB MCE decoder
    EDAC, MCE: No F15h LS MCE decoder
    EDAC, MCE: Add F15h CU MCE decoder
    EDAC, MCE: Add F15h IC MCE decoder
    EDAC, MCE: Add F15h DC MCE decoder
    EDAC, MCE: Select extended error code mask

    Linus Torvalds
     
  • * 'edac-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
    amd64_edac: Disable DRAM ECC injection on K8
    EDAC: Fixup scrubrate manipulation
    amd64_edac: Remove two-stage initialization
    amd64_edac: Check ECC capabilities initially
    amd64_edac: Carve out ECC-related hw settings
    amd64_edac: Remove PCI ECS enabling functions
    amd64_edac: Remove explicit Kconfig PCI dependency
    amd64_edac: Allocate driver instances dynamically
    amd64_edac: Rework printk macros
    amd64_edac: Rename CPU PCI devices
    amd64_edac: Concentrate per-family init even more
    amd64_edac: Cleanup the CPU PCI device reservation
    amd64_edac: Simplify CPU family detection
    amd64_edac: Add per-family init function
    amd64_edac: Use cached extended CPU model
    amd64_edac: Remove F11h support

    Linus Torvalds
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (65 commits)
    [S390] prevent unneccesary loops_per_jiffy recalculation
    [S390] cpuinfo: use get_online_cpus() instead of preempt_disable()
    [S390] smp: remove cpu hotplug messages
    [S390] mutex: enable spinning mutex on s390
    [S390] mutex: Introduce arch_mutex_cpu_relax()
    [S390] cio: fix ccwgroup unregistration race condition
    [S390] perf: add DWARF register lookup for s390
    [S390] cleanup ftrace backend functions
    [S390] ptrace cleanup
    [S390] smp/idle: call init_idle() before starting a new cpu
    [S390] smp: delay idle task creation
    [S390] dasd: Correct retry counter for terminated I/O.
    [S390] dasd: Add support for raw ECKD access.
    [S390] dasd: Prevent deadlock during suspend/resume.
    [S390] dasd: Improve handling of stolen DASD reservation
    [S390] dasd: do path verification for paths added at runtime
    [S390] dasd: add High Performance FICON multitrack support
    [S390] cio: reduce memory consumption of itcw structures
    [S390] nmi: enable machine checks early
    [S390] qeth: buffer count imbalance
    ...

    Linus Torvalds
     
  • * 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (67 commits)
    ARM: mach-shmobile: update for SMP changes.
    ARM: mach-shmobile: update for GIC changes.
    ARM: mach-shmobile: Fix up clkdev fallout for SH73A0.
    dma: shdma: don't register the global die notifier multiple times
    ARM: mach-shmobile: Rely on run-time IRQ handlers
    ARM: mach-shmobile: Run-time IRQ handler for GIC
    ARM: mach-shmobile: Run-time IRQ handler for INTCA
    ARM: mach-shmobile: Enable CONFIG_MULTI_IRQ_HANDLER
    ARM: mach-shmobile: Use shared GIC entry macros
    ARM: mach-shmobile: mackerel: Add zboot support
    ARM: mach-shmobile: mackerel: Add HDMI sound support
    ARM: mach-shmobile: mackerel: add HDMI video support
    ARM: mach-shmobile: ap4evb: fixup clk_put timing of fsib_clk
    ARM: mach-shmobile: sh73a0: fix div4 table
    ARM: mach-shmobile: ap4/mackerel: modify wrong comment out of USB
    ARM: mach-shmobile: Mackerel VGA camera support
    mmc: sh_mmcif: make DMA support by the driver unconditional
    ARM: mach-shmobile: Add eMMC support through MMCIF on AG5EVM
    ARM: mach-shmobile: Use pullups for AG5EVM KEYSC pins
    ARM: mach-shmobile: sh73a0 GPIO pullup improvement
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (58 commits)
    Input: wacom_w8001 - support pen or touch only devices
    Input: wacom_w8001 - use __set_bit to set keybits
    Input: bu21013_ts - fix misuse of logical operation in place of bitop
    Input: i8042 - add Acer Aspire 5100 to the Dritek list
    Input: wacom - add support for digitizer in Lenovo W700
    Input: psmouse - disable the synaptics extension on OLPC machines
    Input: psmouse - fix up Synaptics comment
    Input: synaptics - ignore bogus mt packet
    Input: synaptics - add multi-finger and semi-mt support
    Input: synaptics - report clickpad property
    input: mt: Document interface updates
    Input: fix double equality sign in uevent
    Input: introduce device properties
    hid: egalax: Add support for Wetab (726b)
    Input: include MT library as source for kerneldoc
    MAINTAINERS: Update input-mt entry
    hid: egalax: Add support for Samsung NB30 netbook
    hid: egalax: Document the new devices in Kconfig
    hid: egalax: Add support for Wetab
    hid: egalax: Convert to MT slots
    ...

    Fixed up trivial conflict in drivers/input/keyboard/Kconfig

    Linus Torvalds
     
  • * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (36 commits)
    serial: apbuart: Fixup apbuart_console_init()
    TTY: Add tty ioctl to figure device node of the system console.
    tty: add 'active' sysfs attribute to tty0 and console device
    drivers: serial: apbuart: Handle OF failures gracefully
    Serial: Avoid unbalanced IRQ wake disable during resume
    tty: fix typos/errors in tty_driver.h comments
    pch_uart : fix warnings for 64bit compile
    8250: fix uninitialized FIFOs
    ip2: fix compiler warning on ip2main_pci_tbl
    specialix: fix compiler warning on specialix_pci_tbl
    rocket: fix compiler warning on rocket_pci_ids
    8250: add a UPIO_DWAPB32 for 32 bit accesses
    8250: use container_of() instead of casting
    serial: omap-serial: Add support for kernel debugger
    serial: fix pch_uart kconfig & build
    drivers: char: hvc: add arm JTAG DCC console support
    RS485 documentation: add 16C950 UART description
    serial: ifx6x60: fix memory leak
    serial: ifx6x60: free IRQ on error
    Serial: EG20T: add PCH_UART driver
    ...

    Fixed up conflicts in drivers/serial/apbuart.c with evil merge that
    makes the code look fairly sane (unlike either side).

    Linus Torvalds
     
  • * 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (144 commits)
    USB: add support for Dream Cheeky DL100B Webmail Notifier (1d34:0004)
    USB: serial: ftdi_sio: add support for TIOCSERGETLSR
    USB: ehci-mxc: Setup portsc register prior to accessing OTG viewport
    USB: atmel_usba_udc: fix freeing irq in usba_udc_remove()
    usb: ehci-omap: fix tll channel enable mask
    usb: ohci-omap3: fix trivial typo
    USB: gadget: ci13xxx: don't assume that PAGE_SIZE is 4096
    USB: gadget: ci13xxx: fix complete() callback for no_interrupt rq's
    USB: gadget: update ci13xxx to work with g_ether
    USB: gadgets: ci13xxx: fix probing of compiled-in gadget drivers
    Revert "USB: musb: pm: don't rely fully on clock support"
    Revert "USB: musb: blackfin: pm: make it work"
    USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path
    USB: uas: Ensure we only bind to a UAS interface
    USB: uas: Rename sense pipe and sense urb to status pipe and status urb
    USB: uas: Use kzalloc instead of kmalloc
    USB: uas: Fix up the Sense IU
    usb: musb: core: kill unneeded #include's
    DA8xx: assign name to MUSB IRQ resource
    usb: gadget: g_ncm added
    ...

    Manually fix up trivial conflicts in USB Kconfig changes in:
    arch/arm/mach-omap2/Kconfig
    arch/sh/Kconfig
    drivers/usb/Kconfig
    drivers/usb/host/ehci-hcd.c
    and annoying chip clock data conflicts in:
    arch/arm/mach-omap2/clock3xxx_data.c
    arch/arm/mach-omap2/clock44xx_data.c

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (147 commits)
    [SCSI] arcmsr: fix write to device check
    [SCSI] lpfc: lower stack use in lpfc_fc_frame_check
    [SCSI] eliminate an unnecessary local variable from scsi_remove_target()
    [SCSI] libiscsi: use bh locking instead of irq with session lock
    [SCSI] libiscsi: do not take host lock in queuecommand
    [SCSI] be2iscsi: fix null ptr when accessing task hdr
    [SCSI] be2iscsi: fix gfp use in alloc_pdu
    [SCSI] libiscsi: add more informative failure message during iscsi scsi eh
    [SCSI] gdth: Add missing call to gdth_ioctl_free
    [SCSI] bfa: remove unused defintions and misc cleanups
    [SCSI] bfa: remove inactive functions
    [SCSI] bfa: replace bfa_assert with WARN_ON
    [SCSI] qla2xxx: Use sg_next to fetch next sg element while walking sg list.
    [SCSI] qla2xxx: Fix to avoid recursive lock failure during BSG timeout.
    [SCSI] qla2xxx: Remove code to not reset ISP82xx on failure.
    [SCSI] qla2xxx: Display mailbox register 4 during 8012 AEN for ISP82XX parts.
    [SCSI] qla2xxx: Don't perform a BIG_HAMMER if Get-ID (0x20) mailbox command fails on CNAs.
    [SCSI] qla2xxx: Remove redundant module parameter permission bits
    [SCSI] qla2xxx: Add sysfs node for displaying board temperature.
    [SCSI] qla2xxx: Code cleanup to remove unwanted comments and code.
    ...

    Linus Torvalds
     
  • There was a semi-colon missing and it broke the compile.

    Signed-off-by: Dan Carpenter
    Cc: Dmitry Torokhov
    Signed-off-by: Linus Walleij
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • Running the latest kernel on the 4430SDP board with DMA API debugging
    enabled results in this:

    WARNING: at lib/dma-debug.c:803 check_unmap+0x19c/0x6f0()
    NULL NULL: DMA-API: device driver tries to free DMA memory it has not allocated
    [device address=0x000000008129901a] [size=260 bytes]
    Modules linked in:
    Backtrace:
    [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c)
    r7:c1839dc0 r6:c0198578 r5:c0304b17 r4:00000323
    [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_common+0x58/0x70)
    [] (warn_slowpath_common+0x0/0x70) from [] (warn_slowpath_fmt+0x38/0x40)
    r8:c1839e40 r7:00000000 r6:00000104 r5:00000000 r4:8129901a
    [] (warn_slowpath_fmt+0x0/0x40) from [] (check_unmap+0x19c/0x6f0)
    r3:c03110de r2:c0304e6b
    [] (check_unmap+0x0/0x6f0) from [] (debug_dma_unmap_page+0x74/0x80)
    [] (debug_dma_unmap_page+0x0/0x80) from [] (omap2_mcspi_work+0x514/0xbf0)
    [] (omap2_mcspi_work+0x0/0xbf0) from [] (process_one_work+0x294/0x400)
    [] (process_one_work+0x0/0x400) from [] (worker_thread+0x220/0x3f8)
    [] (worker_thread+0x0/0x3f8) from [] (kthread+0x88/0x90)
    [] (kthread+0x0/0x90) from [] (do_exit+0x0/0x5fc)
    r7:00000013 r6:c005e924 r5:c0073848 r4:c1829ee0
    ---[ end trace 1b75b31a2719ed20 ]---

    I've no idea why this driver uses NULL for dma_unmap_single instead of
    the &spi->dev that is laying around just waiting to be used in that
    function - but it's an easy fix.

    Also replace this comment with a FIXME comment:
    /* Do DMA mapping "early" for better error reporting and
    * dcache use. Note that if dma_unmap_single() ever starts
    * to do real work on ARM, we'd need to clean up mappings
    * for previous transfers on *ALL* exits of this loop...
    */
    as the comment is not true - we do work in dma_unmap() functions,
    particularly on ARMv6 and above. I've corrected the existing unmap
    functions but if any others are required they must be added ASAP.

    Signed-off-by: Russell King
    Acked-by: Tony Lindgren
    Signed-off-by: Grant Likely

    Russell King - ARM Linux
     
  • The test "if (spi_imx->irq irq < 0)"

    [grant.likely: Note: In general, Linux irq number 0 should also mean
    no irq, but arm still allows devices to be assigned 0, and the imx
    platform uses 0 for one of the spi devices, so this patch is needed
    for the device to work]

    Signed-off-by: Richard Genoud
    Signed-off-by: Grant Likely

    Richard Genoud
     
  • …t/npiggin/linux-npiggin

    * 'vfs-scale-working' of git://git.kernel.org/pub/scm/linux/kernel/git/npiggin/linux-npiggin: (57 commits)
    fs: scale mntget/mntput
    fs: rename vfsmount counter helpers
    fs: implement faster dentry memcmp
    fs: prefetch inode data in dcache lookup
    fs: improve scalability of pseudo filesystems
    fs: dcache per-inode inode alias locking
    fs: dcache per-bucket dcache hash locking
    bit_spinlock: add required includes
    kernel: add bl_list
    xfs: provide simple rcu-walk ACL implementation
    btrfs: provide simple rcu-walk ACL implementation
    ext2,3,4: provide simple rcu-walk ACL implementation
    fs: provide simple rcu-walk generic_check_acl implementation
    fs: provide rcu-walk aware permission i_ops
    fs: rcu-walk aware d_revalidate method
    fs: cache optimise dentry and inode for rcu-walk
    fs: dcache reduce branches in lookup path
    fs: dcache remove d_mounted
    fs: fs_struct use seqlock
    fs: rcu-walk for path lookup
    ...

    Linus Torvalds
     

07 Jan, 2011

4 commits

  • Function-scope statics are discouraged because they are
    easily overlooked and can cause subtle bugs/races due to
    their global (non-SMP safe) nature.

    Linus noticed that we did this for sched_param - at minimum
    make the const.

    Suggested-by: Linus Torvalds
    Signed-off-by: Peter Zijlstra
    LKML-Reference: Message-ID:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • One of the operands, buf, is incorrect, since it is stripped and the
    correct address for subsequent string comparing could change if
    leading white spaces, if any, are removed from buf.

    It is fixed by replacing buf with cmp.

    Signed-off-by: Hillf Danton
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Hillf Danton
     
  • Per Oleg's suggestion, undo fork failure free/put_signal_struct change,
    and move sched_autogroup_exit() to free_signal_struct() instead.

    Signed-off-by: Mike Galbraith
    Reviewed-by: Oleg Nesterov
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Mike Galbraith
     
  • Seems I lost a change somewhere, leaking memory.

    sched: fix struct autogroup memory leak

    Add missing change to actually use autogroup_free().

    Signed-off-by: Mike Galbraith
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Mike Galbraith