1. 12 Apr, 2004 40 commits
    • Andrew Morton's avatar
      [PATCH] parport: no procfs warning fix · e4730c3e
      Andrew Morton authored
      drivers/parport/procfs.c: In function `parport_default_proc_unregister':
      drivers/parport/procfs.c:529: warning: `return' with a value, in function returning void
      e4730c3e
    • Andrew Morton's avatar
      [PATCH] kbuild: external module support · 07e58231
      Andrew Morton authored
      From: Sam Ravnborg <sam@ravnborg.org>
      
      Based on initial patch from Andreas Gruenbacher there is now better support
      for building external modules with kbuild.
      
      The preferred syntax is now:
      make -C $KERNELSRC M=$PWD
      
      but the old syntax:
      make -C $KERNELSRC SUBDIRS=$PWD modules
      will remain supported.
      
      The major differences compared to before are that:
      1) No attempt is made to neither check nor update any files in $KERNELSRC
      2) Module versions are now supported
      
      During stage 2 of kernel compilation where the modules are built, a new file
      Module.symvers is created.  This file contains the version for all symbols
      exported by the kernel and any module compiled within the kernel tree.
      
      When the external module is build the Module.symvers file is being read and
      symbol versions are used from that file.
      
      The purpose of avoiding any updates in the kernel src is that usually in a
      distribution the kernel src will be read-only, and there is no need to try to
      update it.  And when building an external module the focus is on the module,
      not the kernel.
      
      I expect the distributions will start using something like this:
      
      kernel src - with no generated files. Not even .config:
      /usr/src/linux-<version>
      
      Output from build:
      /lib/modules/linux-<version>/build
      
      where build is a real directory with relevant output files and the
      appropriate .config.
      
      I have some Documentation in the pipe-line, but wants to see how this
      approach is received before completing it.
      
      This patch is made on top of the previously posted patch to divide
      make clean in three steps.
      
      And you may need to edit the following line in the patch to make it apply:
       %docs: scripts_basic FORCE
      to
       %docs: scripts FORCE
      07e58231
    • Andrew Morton's avatar
      [PATCH] kbuild: cleaning in three steps · a065cde3
      Andrew Morton authored
      From: Sam Ravnborg <sam@ravnborg.org>
      
      Previously 'make clean' deleted all automatically generated files.  The
      following patch revert this behaviour, and now 'make clean' leaves enough
      behind to allow external modules to be built.
      
      The cleaning is now done in three steps:
      
      make clean     - delete everything not needed for building external modules
      make mrproper  - delete all generated files, including .config
      make distclean - delete all temporary files such as *.orig, *~, *.rej etc.
      
      This fixes reports about nvidia and vmware build issues.
      a065cde3
    • Andrew Morton's avatar
      [PATCH] Make %docs depend on scripts_basic · c70b9371
      Andrew Morton authored
      From: Sam Ravnborg <sam@ravnborg.org>
      
      From: Herbert Xu <herbert@gondor.apana.org.au>
      
      It seems that the %docs targets only needs scripts_basic.  The following
      patch does just that.  This removes its dependency on the existence of a
      .config file.
      c70b9371
    • Andrew Morton's avatar
      [PATCH] fb_copy_cmap() fix · 9a6c9ba2
      Andrew Morton authored
      From: Arjan van de Ven <arjanv@redhat.com>
      
      fb_copy_cmap() takes an argument about wether to do memcpy, copy_from_user or
      copy_to_user.  0 is memcpy, 2 is copy_to_user.  In the ioctl you want
      copy_to_user for copying the colormap to userspace.
      9a6c9ba2
    • Andrew Morton's avatar
      [PATCH] framebuffer bugfix · e01d652a
      Andrew Morton authored
      From: Arjan van de Ven <arjanv@redhat.com>
      
      Patch below fixes a thinko in the frame buffer drivers; the code does
      
      cursor.image.data = kmalloc(size, GFP_KERNEL);
      ....
      cursor.mask = kmalloc(size, GFP_KERNEL);
      ....
                      if (copy_from_user(&cursor.image.data, sprite->image.data, size) ||
                          copy_from_user(cursor.mask, sprite->mask, size)) {
      ....
      
      where it's clear that the & in the first copy_from_user is utterly bogus
      since the destination is the content of the newly allocated buffer, and not
      the pointer to it as the code does.
      e01d652a
    • Andrew Morton's avatar
      [PATCH] BSD accounting oops fix · 7285840f
      Andrew Morton authored
      oopses have been reported in do_acct_process(), with premption enabled, when
      threaded applications are exitting.
      
      It appears that we're racing with another thread which is nulling out
      current->tty.  I think this race is still there after we moved current->tty
      into current->signal->tty, so let's take the needed lock.
      7285840f
    • Andrew Morton's avatar
      [PATCH] tpqic02 warnings · 177ddd52
      Andrew Morton authored
      drivers/char/tpqic02.c: In function `rdstatus':
      drivers/char/tpqic02.c:700: warning: int format, different type arg (arg 2)
      drivers/char/tpqic02.c:700: warning: int format, different type arg (arg 2)
      177ddd52
    • Andrew Morton's avatar
      [PATCH] applicom warnings and usercopy-in-cli fix · fe91397f
      Andrew Morton authored
      drivers/char/applicom.c: In function `ac_write':
      drivers/char/applicom.c:363: warning: int format, different type arg (arg 2)
      drivers/char/applicom.c:363: warning: int format, different type arg (arg 3)
      drivers/char/applicom.c:363: warning: int format, different type arg (arg 2)
      drivers/char/applicom.c:363: warning: int format, different type arg (arg 3)
      drivers/char/applicom.c:523:2: warning: #warning "Je suis stupide. DW. - copy*user in cli"
      drivers/char/applicom.c: In function `ac_read':
      drivers/char/applicom.c:546: warning: int format, different type arg (arg 2)
      drivers/char/applicom.c:546: warning: int format, different type arg (arg 3)
      drivers/char/applicom.c:546: warning: int format, different type arg (arg 2)
      drivers/char/applicom.c:546: warning: int format, different type arg (arg 3)
      fe91397f
    • Andrew Morton's avatar
      [PATCH] policydb printk warnings · c40853f2
      Andrew Morton authored
      security/selinux/ss/policydb.c:1160: warning: signed size_t format, different type arg (arg 3)
      security/selinux/ss/policydb.c:1160: warning: signed size_t format, different type arg (arg 3)
      c40853f2
    • Andrew Morton's avatar
      [PATCH] i2c-dev warning fixes · 9c8b76eb
      Andrew Morton authored
      drivers/i2c/i2c-dev.c: In function `i2cdev_read':
      drivers/i2c/i2c-dev.c:140: warning: int format, different type arg (arg 3)
      drivers/i2c/i2c-dev.c: In function `i2cdev_write':
      drivers/i2c/i2c-dev.c:168: warning: int format, different type arg (arg 3)
      9c8b76eb
    • Andrew Morton's avatar
      [PATCH] Rename bitmap_clear to bitmap_zero, remove CLEAR_BITMAP · 8447ac26
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      clear_bit(n, addr) clears the nth bit.
      test_and_clear_bit(n, addr) clears the nth bit.
      cpu_clear(n, cpumask) clears the nth bit (vs. cpus_clear()).
      bitmap_clear(bitmap, n) clears out all the bits up to n.
      
      Moreover, there's a CLEAR_BITMAP() in linux/types.h which bitmap_clear() is
      a wrapper for.
      
      Rename bitmap_clear to bitmap_zero, which is harder to confuse (yes, it bit
      me), and make everyone use it.
      8447ac26
    • Andrew Morton's avatar
      [PATCH] Fix More Problems Introduced By Module Structure Added in modpost.c · 6ab26f0a
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Sam Ravnborg found these.
      
      1) have_vmlinux is a global, and should not be reset every time.
      
      2) We pretend every module needs cleanup_module so it gets versioned,
         but that isn't defined for CONFIG_MODULE_UNLOAD=n.
      
      3) The visible effect of this is that modpost will start complaning about
         undefined symbols - previously this happened only when the module was
         isntalled.
      6ab26f0a
    • Andrew Morton's avatar
      [PATCH] do_fork() error path memory leak · 23868940
      Andrew Morton authored
      From: <john.l.byrne@hp.com>
      
      In do_fork(), if an error occurs after the mm_struct for the child has been
      allocated, it is never freed.  The exit_mm() meant to free it increments
      the mm_count and this count is never decremented.  (For a running process
      that is exitting, schedule() takes care this; however, the child process
      being cleaned up is not running.) In the CLONE_VM case, the parent's
      mm_struct will get an extra mm_count and so it will never be freed.
      
      This patch should fix both the CLONE_VM and the not CLONE_VM case; the test
      of p->active_mm prevents a panic in the case that a kernel-thread is being
      cloned.
      23868940
    • Andrew Morton's avatar
      [PATCH] mdacon.c warning fix. · 94ce3185
      Andrew Morton authored
      From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>
      
      drivers/video/console/mdacon.c:599: warning: initialization from incompatible pointer type
      94ce3185
    • Andrew Morton's avatar
      [PATCH] fix for potential integer overflow in zoran driver · 8afc52a5
      Andrew Morton authored
      From: "Ronald S. Bultje" <R.S.Bultje@students.uu.nl>
      
      Attached patch fixes a potential integer overflow in zoran_procs.c (part of
      the zr36067 driver).  Bug was detected by Ken Ashcraft with the Stanford
      checker.
      8afc52a5
    • Andrew Morton's avatar
      [PATCH] ext3fs sb= mount option fix · de2350c5
      Andrew Morton authored
      From: <achurch@achurch.org> (Andrew Church)
      
      The following patch fixes a bug in the processing of the sb= (alternate
      superblock) mount option for ext3: when changing the device block size, the
      given superblock is ignored and the code reverts to using block 1.
      de2350c5
    • Andrew Morton's avatar
      [PATCH] ext2fs sb= mount option fix · 27efbbaf
      Andrew Morton authored
      From: <achurch@achurch.org> (Andrew Church)
      
      The following patch fixes a bug in the processing of the sb= (alternate
      superblock) mount option for ext2: when changing the device block size, the
      given superblock is ignored and the code reverts to using block 1.
      27efbbaf
    • Andrew Morton's avatar
      [PATCH] fix test_and_change_bit comment · dbb1a307
      Andrew Morton authored
      From: Paul Jackson <pj@sgi.com>
      
      I've read over the code in each case, built and ran a test case for i386 in
      particular, and studied the other uses and definitions of
      test_and_change_bit().  Everything I see recommends this change.
      
      - Fix test_and_change_bit() comment: returns old value, not new one.
      dbb1a307
    • Andrew Morton's avatar
      [PATCH] make ibmasm driver uart support depend on SERIAL_8250 · ed459323
      Andrew Morton authored
      From: Max Asbock <masbock@us.ibm.com>
      
      This patch makes serial line registration in the ibmasm service processor
      driver depend on CONFIG_SERIAL_8250.  Previously the driver wouldn't
      compile when serial driver support wasn't enabled.
      ed459323
    • Andrew Morton's avatar
      [PATCH] Fix Raid5/6 above 2 Terabytes · 4fbd1438
      Andrew Morton authored
      From: Evan Felix <evan.felix@pnl.gov>
      
      Here is a patch that fixes a major issue in the raid5/6 code.  It seems
      that the code:
      
      logical_sector = bi->bi_sector & ~(STRIPE_SECTORS-1);
      (sector_t)     = (sector_t)    & (constant)
      
      that the right side of the & does not get extended correctly when the
      constant is promoted to the sector_t type.  I have CONFIG_LBD turned on so
      sector_t should be 64bits wide.  This fails to properly mask the value of
      4294967296 (2TB/512) to 4294967296.  in my case it was coming out 0.  this
      cause the loop following this code to read from 0 to 4294967296 blocks so
      it could write one character.
      
      As you might imagine this makes a format of a 3.5TB filesystem take a very
      long time.
      4fbd1438
    • Andrew Morton's avatar
      [PATCH] remove concatenation with __FUNCTION__ sound/* · dfe2c626
      Andrew Morton authored
      From: Tony Breeds <tony@bakeyournoodle.com>
      dfe2c626
    • Andrew Morton's avatar
      [PATCH] remove concatenation with __FUNCTION__ include/* · 93616c25
      Andrew Morton authored
      From: Tony Breeds <tony@bakeyournoodle.com>
      93616c25
    • Andrew Morton's avatar
      [PATCH] remove concatenation with __FUNCTION__ drivers/* · a562b03a
      Andrew Morton authored
      From: Tony Breeds <tony@bakeyournoodle.com>
      a562b03a
    • Andrew Morton's avatar
      [PATCH] remove concatenation with __FUNCTION__ arch/* · 0f3fa4b0
      Andrew Morton authored
      From: Tony Breeds <tony@bakeyournoodle.com>
      0f3fa4b0
    • Andrew Morton's avatar
      [PATCH] don't offer GEN_RTC on ia64 · c1179fa6
      Andrew Morton authored
      From: Bjorn Helgaas <bjorn.helgaas@hp.com>
      
      gen_rtc.c doesn't work on ia64 (we don't have asm/rtc.h, for starters), so
      don't offer it there.
      c1179fa6
    • Andrew Morton's avatar
      [PATCH] pdaudiocf.c needs init.h · 423f871b
      Andrew Morton authored
      From: Herbert Xu <herbert@gondor.apana.org.au>
      
      This patch makes this file includes linux/init.h since it uses the __init
      tag.
      423f871b
    • Andrew Morton's avatar
      [PATCH] saa7134 - Add two inputs for Asus TV FM · 025f1e99
      Andrew Morton authored
      From: Martin Hicks <mort@bork.org>
      
      I just bought an ASUS TV FM capture card, based on the saa7134 chip.  It only
      had one input specified, coax.  This patch adds the Composite and S-Video
      inputs.  It seems to work correctly for me.
      025f1e99
    • Andrew Morton's avatar
      [PATCH] Fix parportbook build again · 70fef640
      Andrew Morton authored
      From: Herbert Xu <herbert@gondor.apana.org.au>
      
      The previous fix causes a syntax error when building:
      
      Working on: /home/gondolin/herbert/src/debian/work/kernel/build/2.6/kernel-source-2.6.5-2.6.5/Documentation/DocBook/parportbook.sgml
      jade:/home/gondolin/herbert/src/debian/work/kernel/build/2.6/kernel-source-2.6.5-2.6.5/Documentation/DocBook/parportbook.sgml:4059:2:E: invalid comment declaration: found character "!" outside comment but inside comment declaration
      jade:/home/gondolin/herbert/src/debian/work/kernel/build/2.6/kernel-source-2.6.5-2.6.5/Documentation/DocBook/parportbook.sgml:4058:0: comment declaration started here
      jade:/home/gondolin/herbert/src/debian/work/kernel/build/2.6/kernel-source-2.6.5-2.6.5/Documentation/DocBook/parportbook.sgml:4059:4:E: character data is not allowed here
      
      This patch removes the offending line completely since that file is probably
      not coming back anyway.
      70fef640
    • Andrew Morton's avatar
      [PATCH] QD65xx I/O ports fix · 340a59bf
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      I/O port numbers can be larger than 8-bit on many platforms (this caused a
      warning when {out,in}b() cast reg to a pointer on platforms with memory
      mapped I/O)
      340a59bf
    • Andrew Morton's avatar
      [PATCH] isicom error path fix · 832c2852
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      Variable error is not initialized, but printed if tty_unregister_driver()
      fails.
      832c2852
    • Andrew Morton's avatar
      [PATCH] DVB dependency fix · 3894c1f1
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      DVB_TWINHAN_DST depends on DVB_BT8XX (dependency is explicitly mentioned in
      help text, but not enforced)
      3894c1f1
    • Andrew Morton's avatar
      [PATCH] parport dependency fix · f2973ffb
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      PCI multi-IO card support depends on PCI
      f2973ffb
    • Andrew Morton's avatar
      [PATCH] isicom.c: unused vars · 488ddba5
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      Recent serial changes moved some code, causing unused variable warnings.
      488ddba5
    • Andrew Morton's avatar
      [PATCH] isicom.c: jiffies must be unsigned long · 90cfa169
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      jiffies must be unsigned long
      90cfa169
    • Andrew Morton's avatar
      [PATCH] get_user_pages shortcut for anonymous pages · dd151b39
      Andrew Morton authored
      From: Martin Schwidefsky <schwidefsky@de.ibm.com>
      
      The patch avoids the instantiation of pagetables for not-present pages in
      get_user_pages().  Without this, the coredump code can cause total memory
      exhaustion in pagetables.  Consider a store to current stack - 1TB.  The
      stack vma is extended to include this address because of VM_GROWSDOWN.  If
      such a process dies (which is likely for a defunc process) then the elf core
      dumper will cause the system to hang because of too many page tables.
      
      We especially recognise this situation and simply return a ref to the zero
      page.
      dd151b39
    • Andrew Morton's avatar
      [PATCH] Correct kernel-doc comment with incorrect parameters documented · a3f84eac
      Andrew Morton authored
      From: "Randy.Dunlap" <rddunlap@osdl.org>
      
      From: Michael Still <mikal@stillhq.com>
      
      Correct kernel-doc comment with incorrect parameters documented
      a3f84eac
    • Andrew Morton's avatar
      [PATCH] Swsusp should not wake up stopped processes · d386fe6e
      Andrew Morton authored
      From: Pavel Machek <pavel@suse.cz>
      
      If you stop process with ^Z, then suspend, process is awakened.  Thats a
      bug.  Solution is to simply leave already stopped processes alone.  Plus we
      no longer use TASK_STOPPED for processes in refrigerator.  Userland might
      see us and get confused.
      d386fe6e
    • Andrew Morton's avatar
      [PATCH] swsusp update: supports discontingmem/highmem fixes · 2c22f5c8
      Andrew Morton authored
      From: Pavel Machek <pavel@ucw.cz>
      
      It makes swsusp behave correctly w.r.t.  discontingmem, and adds highmem
      handling.
      2c22f5c8
    • Andrew Morton's avatar
      [PATCH] swsusp update: supports discontingmem/highmem · 69a03ded
      Andrew Morton authored
      From: Pavel Machek <pavel@ucw.cz>
      
      Bill Irwin did some work on this.  It makes swsusp behave correctly w.r.t. 
      discontingmem, and adds highmem handling (very simple-minded, but should work
      ok with 1GB).  It now should behave correctly w.r.t.  more than one swap
      device, and fixes double restoring of console.
      69a03ded