Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen...
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 18 Aug 2007 16:33:43 +0000 (09:33 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 18 Aug 2007 16:33:43 +0000 (09:33 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  [AVR32] Define mmiowb()
  [AVR32] Fix bogus pte_page() definition
  [AVR32] Simplify pte_alloc_one{,_kernel}
  include/asm-avr32/pgalloc.h: kmalloc + memset conversion to kcalloc
  [AVR32] Wire up i2c-gpio on the ATNGW100 board
  [AVR32] leds-gpio for stk1000

23 files changed:
MAINTAINERS
arch/i386/boot/edd.c
arch/i386/boot/video.c
arch/powerpc/boot/flatdevtree.c
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/misc_32.S
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/platforms/cell/spu_syscalls.c
arch/powerpc/platforms/ps3/device-init.c
arch/ppc/kernel/misc.S
drivers/ata/ata_piix.c
drivers/ata/libata-core.c
drivers/ata/pata_artop.c
drivers/ata/pata_hpt37x.c
drivers/ata/pata_hpt3x2n.c
drivers/ata/pata_isapnp.c
drivers/ata/sata_mv.c
fs/cifs/CHANGES
fs/cifs/README
fs/cifs/TODO
fs/cifs/file.c
fs/cifs/sess.c
fs/exec.c

index e4dde7f1f8d253092d0aa5ec9ec31f7aea535df0..371fe67a4eef3eb4bfe00039ea895da2a2c318c8 100644 (file)
@@ -1009,7 +1009,7 @@ P:        Steve French
 M:     sfrench@samba.org
 L:     linux-cifs-client@lists.samba.org
 L:     samba-technical@lists.samba.org
-W:     http://us1.samba.org/samba/Linux_CIFS_client.html
+W:     http://linux-cifs.samba.org/
 T:     git kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
 S:     Supported
 
index 658834d9f92a098acc2de75a1a5e9c028540b254..82b5c846a194acae54c1275150a76edf53d52518 100644 (file)
 
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
 
-struct edd_dapa {
-       u8      pkt_size;
-       u8      rsvd;
-       u16     sector_cnt;
-       u16     buf_off, buf_seg;
-       u64     lba;
-       u64     buf_lin_addr;
-};
-
 /*
  * Read the MBR (first sector) from a specific device.
  */
 static int read_mbr(u8 devno, void *buf)
 {
-       struct edd_dapa dapa;
-       u16 ax, bx, cx, dx, si;
-
-       memset(&dapa, 0, sizeof dapa);
-       dapa.pkt_size = sizeof(dapa);
-       dapa.sector_cnt = 1;
-       dapa.buf_off = (size_t)buf;
-       dapa.buf_seg = ds();
-       /* dapa.lba = 0; */
-
-       ax = 0x4200;            /* Extended Read */
-       si = (size_t)&dapa;
-       dx = devno;
-       asm("pushfl; stc; int $0x13; setc %%al; popfl"
-           : "+a" (ax), "+S" (si), "+d" (dx)
-           : "m" (dapa)
-           : "ebx", "ecx", "edi", "memory");
-
-       if (!(u8)ax)
-               return 0;       /* OK */
+       u16 ax, bx, cx, dx;
 
        ax = 0x0201;            /* Legacy Read, one sector */
        cx = 0x0001;            /* Sector 0-0-1 */
@@ -65,11 +37,10 @@ static int read_mbr(u8 devno, void *buf)
        return -(u8)ax;         /* 0 or -1 */
 }
 
-static u32 read_mbr_sig(u8 devno, struct edd_info *ei)
+static u32 read_mbr_sig(u8 devno, struct edd_info *ei, u32 *mbrsig)
 {
        int sector_size;
        char *mbrbuf_ptr, *mbrbuf_end;
-       u32 mbrsig;
        u32 buf_base, mbr_base;
        extern char _end[];
 
@@ -85,15 +56,15 @@ static u32 read_mbr_sig(u8 devno, struct edd_info *ei)
 
        /* Make sure we actually have space on the heap... */
        if (!(boot_params.hdr.loadflags & CAN_USE_HEAP))
-               return 0;
+               return -1;
        if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr)
-               return 0;
+               return -1;
 
        if (read_mbr(devno, mbrbuf_ptr))
-               return 0;
+               return -1;
 
-       mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET];
-       return mbrsig;
+       *mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET];
+       return 0;
 }
 
 static int get_edd_info(u8 devno, struct edd_info *ei)
@@ -160,6 +131,7 @@ void query_edd(void)
        int do_edd = 1;
        int devno;
        struct edd_info ei, *edp;
+       u32 *mbrptr;
 
        if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) {
                if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip"))
@@ -168,7 +140,8 @@ void query_edd(void)
                        do_edd = 0;
        }
 
-       edp = (struct edd_info *)boot_params.eddbuf;
+       edp    = boot_params.eddbuf;
+       mbrptr = boot_params.edd_mbr_sig_buffer;
 
        if (!do_edd)
                return;
@@ -186,11 +159,8 @@ void query_edd(void)
                        boot_params.eddbuf_entries++;
                }
 
-               if (do_mbr) {
-                       u32 mbr_sig;
-                       mbr_sig = read_mbr_sig(devno, &ei);
-                       boot_params.edd_mbr_sig_buffer[devno-0x80] = mbr_sig;
-               }
+               if (do_mbr && !read_mbr_sig(devno, &ei, mbrptr++))
+                       boot_params.edd_mbr_sig_buf_entries = devno-0x80+1;
        }
 }
 
index 958130ef004296c02f79614838152f0e1beae102..693f20d3102e9322759adca6834f2de4e159d0a1 100644 (file)
@@ -61,7 +61,7 @@ static void store_video_mode(void)
 
        /* Not all BIOSes are clean with respect to the top bit */
        boot_params.screen_info.orig_video_mode = ax & 0x7f;
-       boot_params.screen_info.orig_video_page = page;
+       boot_params.screen_info.orig_video_page = page >> 8;
 }
 
 /*
index b732644788db799f83c6c90921ac14cd5f4e8069..13761bf160c406c4b4e29fb9fa8b869db35886f5 100644 (file)
@@ -134,20 +134,6 @@ static char *ft_next(struct ft_cxt *cxt, char *p, struct ft_atom *ret)
 #define HDR_SIZE       _ALIGN(sizeof(struct boot_param_header), 8)
 #define EXPAND_INCR    1024    /* alloc this much extra when expanding */
 
-/* See if the regions are in the standard order and non-overlapping */
-static int ft_ordered(struct ft_cxt *cxt)
-{
-       char *p = (char *)cxt->bph + HDR_SIZE;
-       enum ft_rgn_id r;
-
-       for (r = FT_RSVMAP; r <= FT_STRINGS; ++r) {
-               if (p > cxt->rgn[r].start)
-                       return 0;
-               p = cxt->rgn[r].start + cxt->rgn[r].size;
-       }
-       return p <= (char *)cxt->bph + cxt->max_size;
-}
-
 /* Copy the tree to a newly-allocated region and put things in order */
 static int ft_reorder(struct ft_cxt *cxt, int nextra)
 {
@@ -573,10 +559,6 @@ int ft_open(struct ft_cxt *cxt, void *blob, unsigned int max_size,
        cxt->rgn[FT_STRUCT].size = struct_size(cxt);
        cxt->rgn[FT_STRINGS].start = blob + be32_to_cpu(bph->off_dt_strings);
        cxt->rgn[FT_STRINGS].size = be32_to_cpu(bph->dt_strings_size);
-       /* Leave as '0' to force first ft_make_space call to do a ft_reorder
-        * and move dt to an area allocated by realloc.
-       cxt->isordered = ft_ordered(cxt);
-       */
 
        cxt->p = cxt->rgn[FT_STRUCT].start;
        cxt->str_anchor = cxt->rgn[FT_STRINGS].start;
index f39a72f30aadb81543fd3873491ccf94689b4d85..b0cb2e662c25a6e14f3b8e708a46993422c5e19f 100644 (file)
@@ -81,6 +81,7 @@ obj-y                         += iomap.o
 endif
 
 ifeq ($(CONFIG_PPC_ISERIES),y)
+CFLAGS_lparmap.s               += -g0
 extra-y += lparmap.s
 $(obj)/head_64.o:      $(obj)/lparmap.s
 AFLAGS_head_64.o += -I$(obj)
index e708ab7ca9e845968a6b71d910ecbaaa3f64c6e2..8533de50347d5284b23cbe0538673ba74b6b95fe 100644 (file)
@@ -301,9 +301,19 @@ _GLOBAL(_tlbie)
        mfspr   r4,SPRN_MMUCR
        mfspr   r5,SPRN_PID                     /* Get PID */
        rlwimi  r4,r5,0,24,31                   /* Set TID */
-       mtspr   SPRN_MMUCR,r4
 
+       /* We have to run the search with interrupts disabled, even critical
+        * and debug interrupts (in fact the only critical exceptions we have
+        * are debug and machine check).  Otherwise  an interrupt which causes
+        * a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */
+       mfmsr   r5
+       lis     r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha
+       addi    r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l
+       andc    r6,r5,r6
+       mtmsr   r6
+       mtspr   SPRN_MMUCR,r4
        tlbsx.  r3, 0, r3
+       mtmsr   r5
        bne     10f
        sync
        /* There are only 64 TLB entries, so r3 < 64,
index f1789578747aa340c7cf3cc7cc006f3f8ef39a98..a47151e806cae072c1836b49f4c3c8630a4c2bd0 100644 (file)
@@ -795,7 +795,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
 
 #ifdef CONFIG_PPC_MM_SLICES
        /* We only prefault standard pages for now */
-       if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize));
+       if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize))
                return;
 #endif
 
index dd2c6688c8aaa6f0bad47ab8b160856b24c34290..027ac32cc63659c8c2af89270041742dcb96e345 100644 (file)
@@ -45,6 +45,7 @@ asmlinkage long sys_spu_create(const char __user *name,
        if (owner && try_module_get(owner)) {
                if (flags & SPU_CREATE_AFFINITY_SPU) {
                        neighbor = fget_light(neighbor_fd, &fput_needed);
+                       ret = -EBADF;
                        if (neighbor) {
                                ret = spufs_calls.create_thread(name, flags,
                                                                mode, neighbor);
index e23a5a874ad39ae436152ad0475df49a1f48ae8d..ce15cada88d4ed992b478d828e8f896b0e6f85be 100644 (file)
@@ -372,7 +372,7 @@ static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo)
                    notify_event->dev_type == repo->dev_type) {
                        pr_debug("%s:%u: device ready: dev_id %u\n", __func__,
                                 __LINE__, repo->dev_id);
-                       result = 0;
+                       error = 0;
                        break;
                }
 
index 0da55368655c90a0018504d79c0125fd51326e25..a22e1f4d94c82edd1c3ee92d7ea491b82a716b30 100644 (file)
@@ -237,9 +237,19 @@ _GLOBAL(_tlbie)
        mfspr   r4,SPRN_MMUCR
        mfspr   r5,SPRN_PID                     /* Get PID */
        rlwimi  r4,r5,0,24,31                   /* Set TID */
-       mtspr   SPRN_MMUCR,r4
 
+       /* We have to run the search with interrupts disabled, even critical
+        * and debug interrupts (in fact the only critical exceptions we have
+        * are debug and machine check).  Otherwise  an interrupt which causes
+        * a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */
+       mfmsr   r5
+       lis     r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha
+       addi    r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l
+       andc    r6,r5,r6
+       mtmsr   r6
+       mtspr   SPRN_MMUCR,r4
        tlbsx.  r3, 0, r3
+       mtmsr   r5
        bne     10f
        sync
        /* There are only 64 TLB entries, so r3 < 64,
index a78832ea81fa0f5cc9460cca362f498307820cb1..071d274afaabcf6a971831019c44e50900d306c9 100644 (file)
@@ -436,7 +436,7 @@ static const struct piix_map_db ich8_map_db = {
                /* PM   PS   SM   SS       MAP */
                {  P0,  P2,  P1,  P3 }, /* 00b (hardwired when in AHCI) */
                {  RV,  RV,  RV,  RV },
-               {  IDE,  IDE,  NA,  NA }, /* 10b (IDE mode) */
+               {  P0,  P2, IDE, IDE }, /* 10b (IDE mode) */
                {  RV,  RV,  RV,  RV },
        },
 };
@@ -900,6 +900,13 @@ static int piix_broken_suspend(void)
                                DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M5"),
                        },
                },
+               {
+                       .ident = "TECRA M7",
+                       .matches = {
+                               DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+                               DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M7"),
+                       },
+               },
                {
                        .ident = "Satellite U205",
                        .matches = {
index 60e78bef469fed2f49423deea956a16b60a0448b..99d4fbffb0dfd574acd2f280c960895548254791 100644 (file)
@@ -1723,7 +1723,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
                tf.protocol = ATA_PROT_NODATA;
                tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
                err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0);
-               if (err_mask) {
+               if (err_mask && id[2] != 0x738c) {
                        rc = -EIO;
                        reason = "SPINUP failed";
                        goto err_out;
index ce589d96ca424f3083564dc9f193eef0717501f2..b5352ebecef93a9cf047b5f6cdb3cd4dc1a10c50 100644 (file)
@@ -2,6 +2,7 @@
  *    pata_artop.c - ARTOP ATA controller driver
  *
  *     (C) 2006 Red Hat <alan@redhat.com>
+ *     (C) 2007 Bartlomiej Zolnierkiewicz
  *
  *    Based in part on drivers/ide/pci/aec62xx.c
  *     Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org>
@@ -28,7 +29,7 @@
 #include <linux/ata.h>
 
 #define DRV_NAME       "pata_artop"
-#define DRV_VERSION    "0.4.3"
+#define DRV_VERSION    "0.4.4"
 
 /*
  *     The ARTOP has 33 Mhz and "over clocked" timing tables. Until we
@@ -430,7 +431,7 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
                .udma_mask      = ATA_UDMA4,
                .port_ops       = &artop6260_ops,
        };
-       static const struct ata_port_info info_626x_fast = {
+       static const struct ata_port_info info_628x = {
                .sht            = &artop_sht,
                .flags          = ATA_FLAG_SLAVE_POSS,
                .pio_mask       = 0x1f, /* pio0-4 */
@@ -438,6 +439,14 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
                .udma_mask      = ATA_UDMA5,
                .port_ops       = &artop6260_ops,
        };
+       static const struct ata_port_info info_628x_fast = {
+               .sht            = &artop_sht,
+               .flags          = ATA_FLAG_SLAVE_POSS,
+               .pio_mask       = 0x1f, /* pio0-4 */
+               .mwdma_mask     = 0x07, /* mwdma0-2 */
+               .udma_mask      = ATA_UDMA6,
+               .port_ops       = &artop6260_ops,
+       };
        const struct ata_port_info *ppi[] = { NULL, NULL };
 
        if (!printed_version++)
@@ -455,13 +464,13 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
        }
        else if (id->driver_data == 1)  /* 6260 */
                ppi[0] = &info_626x;
-       else if (id->driver_data == 2)  { /* 6260 or 6260 + fast */
+       else if (id->driver_data == 2)  { /* 6280 or 6280 + fast */
                unsigned long io = pci_resource_start(pdev, 4);
                u8 reg;
 
-               ppi[0] = &info_626x;
+               ppi[0] = &info_628x;
                if (inb(io) & 0x10)
-                       ppi[0] = &info_626x_fast;
+                       ppi[0] = &info_628x_fast;
                /* Mac systems come up with some registers not set as we
                   will need them */
 
index 84d9c5568567461b782da104f41c857fb8f75f11..c5ddd937dbf21a438af2cbe8fb0f2c385b88a774 100644 (file)
@@ -8,12 +8,10 @@
  * Copyright (C) 1999-2003             Andre Hedrick <andre@linux-ide.org>
  * Portions Copyright (C) 2001         Sun Microsystems, Inc.
  * Portions Copyright (C) 2003         Red Hat Inc
- * Portions Copyright (C) 2005-2006    MontaVista Software, Inc.
+ * Portions Copyright (C) 2005-2007    MontaVista Software, Inc.
  *
  * TODO
- *     PLL mode
- *     Look into engine reset on timeout errors. Should not be
- *             required.
+ *     Look into engine reset on timeout errors. Should not be required.
  */
 
 #include <linux/kernel.h>
@@ -26,7 +24,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME       "pata_hpt37x"
-#define DRV_VERSION    "0.6.7"
+#define DRV_VERSION    "0.6.9"
 
 struct hpt_clock {
        u8      xfer_speed;
@@ -1092,9 +1090,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
                int dpll, adjust;
 
                /* Compute DPLL */
-               dpll = 2;
-               if (port->udma_mask & 0xE0)
-                       dpll = 3;
+               dpll = (port->udma_mask & 0xC0) ? 3 : 2;
 
                f_low = (MHz[clock_slot] * 48) / MHz[dpll];
                f_high = f_low + 2;
@@ -1116,7 +1112,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
                        pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low | 0x100);
                }
                if (adjust == 8) {
-                       printk(KERN_WARNING "hpt37x: DPLL did not stabilize.\n");
+                       printk(KERN_ERR "pata_hpt37x: DPLL did not stabilize!\n");
                        return -ENODEV;
                }
                if (dpll == 3)
@@ -1124,7 +1120,8 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
                else
                        private_data = (void *)hpt37x_timings_50;
 
-               printk(KERN_INFO "hpt37x: Bus clock %dMHz, using DPLL.\n", MHz[dpll]);
+               printk(KERN_INFO "pata_hpt37x: bus clock %dMHz, using %dMHz DPLL.\n",
+                      MHz[clock_slot], MHz[dpll]);
        } else {
                private_data = (void *)chip_table->clocks[clock_slot];
                /*
@@ -1137,7 +1134,8 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
                        port = &info_hpt370_33;
                if (clock_slot < 2 && port == &info_hpt370a)
                        port = &info_hpt370a_33;
-               printk(KERN_INFO "hpt37x: %s: Bus clock %dMHz.\n", chip_table->name, MHz[clock_slot]);
+               printk(KERN_INFO "pata_hpt37x: %s using %dMHz bus clock.\n",
+                      chip_table->name, MHz[clock_slot]);
        }
 
        /* Now kick off ATA set up */
index aa29cde09f8bbd594022f23a1e7803b6adfc5d87..f8f234bfc8ce2bc1ef075fccedd6df98d52fec2f 100644 (file)
@@ -8,7 +8,7 @@
  * Copyright (C) 1999-2003             Andre Hedrick <andre@linux-ide.org>
  * Portions Copyright (C) 2001         Sun Microsystems, Inc.
  * Portions Copyright (C) 2003         Red Hat Inc
- * Portions Copyright (C) 2005-2006    MontaVista Software, Inc.
+ * Portions Copyright (C) 2005-2007    MontaVista Software, Inc.
  *
  *
  * TODO
@@ -25,7 +25,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME       "pata_hpt3x2n"
-#define DRV_VERSION    "0.3.3"
+#define DRV_VERSION    "0.3.4"
 
 enum {
        HPT_PCI_FAST    =       (1 << 31),
@@ -579,10 +579,12 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
                pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low);
        }
        if (adjust == 8) {
-               printk(KERN_WARNING "hpt3x2n: DPLL did not stabilize.\n");
+               printk(KERN_ERR "pata_hpt3x2n: DPLL did not stabilize!\n");
                return -ENODEV;
        }
 
+       printk(KERN_INFO "pata_hpt37x: bus clock %dMHz, using 66MHz DPLL.\n",
+              pci_mhz);
        /* Set our private data up. We only need a few flags so we use
           it directly */
        port.private_data = NULL;
index 5525518204e65dc07850f2283f8a5e1b775a9703..91a396fa5b20f0f75fdbc550ab6d1b9654738145 100644 (file)
@@ -139,6 +139,8 @@ static struct pnp_device_id isapnp_devices[] = {
        {.id = ""}
 };
 
+MODULE_DEVICE_TABLE(pnp, isapnp_devices);
+
 static struct pnp_driver isapnp_driver = {
        .name           = DRV_NAME,
        .id_table       = isapnp_devices,
index 8ec520885b959557d0dc8d6bc3d80407cda3460f..3acf65e75eb2dd0b64b6ce2d2bfc7670c7f1cf8b 100644 (file)
@@ -621,6 +621,9 @@ static const struct pci_device_id mv_pci_tbl[] = {
        { PCI_VDEVICE(MARVELL, 0x5041), chip_504x },
        { PCI_VDEVICE(MARVELL, 0x5080), chip_5080 },
        { PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
+       /* RocketRAID 1740/174x have different identifiers */
+       { PCI_VDEVICE(TTI, 0x1740), chip_508x },
+       { PCI_VDEVICE(TTI, 0x1742), chip_508x },
 
        { PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
        { PCI_VDEVICE(MARVELL, 0x6041), chip_604x },
index 6d84ca2beead8db4b0cd324c6c1ccc9d5b56a0d3..bed6215c0794ef8d9264b113aff767dc85ef4025 100644 (file)
@@ -3,7 +3,10 @@ Version 1.50
 Fix NTLMv2 signing. NFS server mounted over cifs works (if cifs mount is
 done with "serverino" mount option).  Add support for POSIX Unlink
 (helps with certain sharing violation cases when server such as
-Samba supports newer POSIX CIFS Protocol Extensions).
+Samba supports newer POSIX CIFS Protocol Extensions). Add "nounix"
+mount option to allow disabling the CIFS Unix Extensions for just
+that mount. Fix hang on spinlock in find_writable_file (race when
+reopening file after session crash).
 
 Version 1.49
 ------------
index 85f1eb14083eb2c3057027f60863f80db82df1b8..b806b11b5560e912f67fca11219381328744dd34 100644 (file)
@@ -444,6 +444,13 @@ A partial list of the supported mount options follows:
  noposixpaths   If CIFS Unix extensions are supported, do not request
                posix path name support (this may cause servers to
                reject creatingfile with certain reserved characters).
+ nounix         Disable the CIFS Unix Extensions for this mount (tree
+               connection). This is rarely needed, but it may be useful
+               in order to turn off multiple settings all at once (ie
+               posix acls, posix locks, posix paths, symlink support
+               and retrieving uids/gids/mode from the server) or to
+               work around a bug in server which implement the Unix
+               Extensions.
  nobrl          Do not send byte range lock requests to the server.
                This is necessary for certain applications that break
                with cifs style mandatory byte range locks (and most
@@ -451,6 +458,12 @@ A partial list of the supported mount options follows:
                byte range locks).
  remount        remount the share (often used to change from ro to rw mounts
                or vice versa)
+ servern        Specify the server 's netbios name (RFC1001 name) to use
+               when attempting to setup a session to the server.  This is
+               This is needed for mounting to some older servers (such
+               as OS/2 or Windows 98 and Windows ME) since they do not
+               support a default server name.  A server name can be up
+               to 15 characters long and is usually uppercased.
  sfu            When the CIFS Unix Extensions are not negotiated, attempt to
                create device files and fifos in a format compatible with
                Services for Unix (SFU).  In addition retrieve bits 10-12
index d7bd51575fd63888ab34f4de3f4c579187b02b81..29d4b2715254847cdf702283b96681e50ce1ed4a 100644 (file)
@@ -82,8 +82,7 @@ u) DOS attrs - returned as pseudo-xattr in Samba format (check VFAT and NTFS for
 
 v) mount check for unmatched uids
 
-w) Add mount option for Linux extension disable per mount, and partial
-disable per mount (uid off, symlink/fifo/mknod on but what about posix acls?)
+w) Add support for new vfs entry points for setlease and fallocate 
 
 x) Fix Samba 3 server to handle Linux kernel aio so dbench with lots of 
 processes can proceed better in parallel (on the server)
index e13592afca9c830565c420295cbc186e9f834fee..894b1f7b299d5d5dc679b391bb54ca6e1abc092e 100644 (file)
@@ -1904,6 +1904,25 @@ static int cifs_readpage(struct file *file, struct page *page)
        return rc;
 }
 
+static int is_inode_writable(struct cifsInodeInfo *cifs_inode)
+{
+       struct cifsFileInfo *open_file;
+
+       read_lock(&GlobalSMBSeslock);
+       list_for_each_entry(open_file, &cifs_inode->openFileList, flist) {
+               if (open_file->closePend)
+                       continue;
+               if (open_file->pfile &&
+                   ((open_file->pfile->f_flags & O_RDWR) ||
+                    (open_file->pfile->f_flags & O_WRONLY))) {
+                       read_unlock(&GlobalSMBSeslock);
+                       return 1;
+               }
+       }
+       read_unlock(&GlobalSMBSeslock);
+       return 0;
+}
+
 /* We do not want to update the file size from server for inodes
    open for write - to avoid races with writepage extending
    the file - in the future we could consider allowing
@@ -1912,19 +1931,13 @@ static int cifs_readpage(struct file *file, struct page *page)
    page caching in the current Linux kernel design */
 int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
 {
-       struct cifsFileInfo *open_file = NULL;
-
-       if (cifsInode)
-               open_file =  find_writable_file(cifsInode);
+       if (!cifsInode)
+               return 1;
 
-       if (open_file) {
+       if (is_inode_writable(cifsInode)) {
+               /* This inode is open for write at least once */
                struct cifs_sb_info *cifs_sb;
 
-               /* there is not actually a write pending so let
-               this handle go free and allow it to
-               be closable if needed */
-               atomic_dec(&open_file->wrtPending);
-
                cifs_sb = CIFS_SB(cifsInode->vfs_inode.i_sb);
                if ( cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO ) {
                        /* since no page cache to corrupt on directio
index 2ea027dda215cc2053d6645ca8a306ed959220c6..892be9b4d1f362351de1c0075b2f9b3086aff514 100644 (file)
@@ -372,6 +372,10 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
 
        /* 2000 big enough to fit max user, domain, NOS name etc. */
        str_area = kmalloc(2000, GFP_KERNEL);
+       if (str_area == NULL) {
+               cifs_small_buf_release(smb_buf);
+               return -ENOMEM;
+       }
        bcc_ptr = str_area;
 
        ses->flags &= ~CIFS_SES_LANMAN;
index 7bdea7937ee896179e34b3fe0102f76803fedecb..ce62f7b65f17aa3963c67c8ff095974489b4f033 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1084,9 +1084,12 @@ int flush_old_exec(struct linux_binprm * bprm)
         */
        current->mm->task_size = TASK_SIZE;
 
-       if (bprm->e_uid != current->euid || bprm->e_gid != current->egid || 
-           file_permission(bprm->file, MAY_READ) ||
-           (bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) {
+       if (bprm->e_uid != current->euid || bprm->e_gid != current->egid) {
+               suid_keys(current);
+               set_dumpable(current->mm, suid_dumpable);
+               current->pdeath_signal = 0;
+       } else if (file_permission(bprm->file, MAY_READ) ||
+                       (bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) {
                suid_keys(current);
                set_dumpable(current->mm, suid_dumpable);
        }
@@ -1177,8 +1180,10 @@ void compute_creds(struct linux_binprm *bprm)
 {
        int unsafe;
 
-       if (bprm->e_uid != current->uid)
+       if (bprm->e_uid != current->uid) {
                suid_keys(current);
+               current->pdeath_signal = 0;
+       }
        exec_keys(current);
 
        task_lock(current);