1. 24 Jan, 2008 1 commit
  2. 17 Jul, 2007 1 commit
    • Andrew Morton's avatar
      isdn/capi warning fixes · 5e6c20a9
      Andrew Morton authored
      drivers/isdn/capi/capi.c: In function 'handle_minor_send':
      drivers/isdn/capi/capi.c:552: warning: cast from pointer to integer of different size
      Of course, the code here might actually be buggy, in which case this patch
      should not be applied?
        No this field is ignored inside linux kernel.Yes this is ugly, but it's
        the CAPI spec for all OS.
        CAPI DATA_B3 Request/Indication CAPI Message has a mandatory field which
        represent the 32 bit buffer address of the payload data.  In linux the
        payload data do not use a sperate buffer, data follows directely after the
        CAPI Message in the same skb and we use this assumption inside the drivers,
        so we can ignore this field.
        Inside the linux CAPI implemetation we never use this field, so it could
        also have no value, but since random data in a message is bad as well (e.g.
        displayed in CAPI traces) we set is to the most adequate value.
        Outside the kernel the capi20 library sets the correct addresses (there is
        an optional second field for 64 bit adresses for 64 bit systems, we do not
        use here).
      Acked-by: default avatarKarsten Keil <kkeil@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  3. 08 May, 2007 2 commits
  4. 12 Feb, 2007 3 commits
  5. 08 Dec, 2006 3 commits
  6. 02 Oct, 2006 1 commit
    • Jeff Dike's avatar
      [PATCH] const struct tty_operations · b68e31d0
      Jeff Dike authored
      As part of an SMP cleanliness pass over UML, I consted a bunch of
      structures in order to not have to document their locking.  One of these
      structures was a struct tty_operations.  In order to const it in UML
      without introducing compiler complaints, the declaration of
      tty_set_operations needs to be changed, and then all of its callers need to
      be fixed.
      This patch declares all struct tty_operations in the tree as const.  In all
      cases, they are static and used only as input to tty_set_operations.  As an
      extra check, I ran an i386 allyesconfig build which produced no extra
      53 drivers are affected.  I checked the history of a bunch of them, and in
      most cases, there have been only a handful of maintenance changes in the
      last six months.  serial_core.c was the busiest one that I looked at.
      Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
      Acked-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  7. 30 Jun, 2006 1 commit
  8. 26 Jun, 2006 5 commits
    • Greg Kroah-Hartman's avatar
      [PATCH] devfs: Remove the tty_driver devfs_name field as it's no longer needed · f4eaa370
      Greg Kroah-Hartman authored
      Also fixes all drivers that set this field.
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • Greg Kroah-Hartman's avatar
      [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree · ff23eca3
      Greg Kroah-Hartman authored
      Also fixes up all files that #include it.
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • Greg Kroah-Hartman's avatar
      [PATCH] devfs: Remove devfs_remove() function from the kernel tree · 8ab5e4c1
      Greg Kroah-Hartman authored
      Removes the devfs_remove() function and all callers of it.
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • Greg Kroah-Hartman's avatar
      [PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree · 7c69ef79
      Greg Kroah-Hartman authored
      Removes the devfs_mk_cdev() function and all callers of it.
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • Michael Buesch's avatar
      [PATCH] CAPI crash / race condition · 6aa65472
      Michael Buesch authored
      I am getting more or less reproducible crashes from the CAPI subsystem
      using the fcdsl driver:
      Unable to handle kernel NULL pointer dereference at virtual address 00000010
       printing eip:
      *pde = 00000000
      Oops: 0000 [#1]
      Modules linked in: netconsole capi capifs 3c59x mii fcdsl kernelcapi uhci_hcd usbcore ide_cd cdrom
      CPU:    0
      EIP:    0060:[<c39bbca4>]    Tainted: P      VLI
      EFLAGS: 00010202   ( #3)
      EIP is at handle_minor_send+0x17a/0x241 [capi]
      eax: c24abbc0   ebx: c0b4c980   ecx: 00000010   edx: 00000010
      esi: c1679140   edi: c2783016   ebp: 0000c28d   esp: c0327e24
      ds: 007b   es: 007b   ss: 0068
      Process swapper (pid: 0, threadinfo=c0326000 task=c02e1300)
      Stack: <0>000005b4 c1679180 00000000 c28d0000 c1ce04e0 c2f69654 c221604e c1679140
             c39bc19a 00000038 c20c0400 c075c560 c1f2f800 00000000 c01dc9b5 c1e96a40
             c075c560 c2ed64c0 c1e96a40 c01dcd3b c2fb94e8 c075c560 c0327f00 c1e96a40
      Call Trace:
       [<c39bc19a>] capinc_tty_write+0xda/0xf3 [capi]
       [<c01dc9b5>] ppp_sync_push+0x52/0xfe
       [<c01dcd3b>] ppp_sync_send+0x1f5/0x204
       [<c01d9bc1>] ppp_push+0x3e/0x9c
       [<c01dacd4>] ppp_xmit_process+0x422/0x4cc
       [<c01daf3f>] ppp_start_xmit+0x1c1/0x1f6
       [<c0213ea5>] qdisc_restart+0xa7/0x135
       [<c020b112>] dev_queue_xmit+0xba/0x19e
       [<c0223f69>] ip_output+0x1eb/0x236
       [<c0220907>] ip_forward+0x1c1/0x21a
       [<c021fa6c>] ip_rcv+0x38e/0x3ea
       [<c020b4c2>] netif_receive_skb+0x166/0x195
       [<c020b55e>] process_backlog+0x6d/0xd2
       [<c020a30f>] net_rx_action+0x6a/0xff
       [<c0112909>] __do_softirq+0x35/0x7d
       [<c0112973>] do_softirq+0x22/0x26
       [<c0103a9d>] do_IRQ+0x1e/0x25
       [<c010255a>] common_interrupt+0x1a/0x20
       [<c01013c5>] default_idle+0x2b/0x53
       [<c0101426>] cpu_idle+0x39/0x4e
       [<c0328386>] start_kernel+0x20b/0x20d
      Code: c0 e8 b3 b6 77 fc 85 c0 75 10 68 d8 c8 9b c3 e8 82 3d 75 fc 8b 43 60 5a eb 50 8d 56 50 c7 00 00 00 00 00 66 89 68 04 eb 02 89
      ca <8b> 0a 85 c9 75 f8 89 02 89 da ff 46 54 8b 46 10 e8 30 79 fd ff
       <0>Kernel panic - not syncing: Fatal exception in interrupt
      That oops took me to the "ackqueue" implementation in capi.c.  The crash
      occured in capincci_add_ack() (auto-inlined by the compiler).
      I read the code a bit and finally decided to replace the custom linked list
      implementation (struct capiminor->ackqueue) by a struct list_head.  That
      did not solve the crash, but produced the following interresting oops:
      Unable to handle kernel paging request at virtual address 00200200
       printing eip:
      *pde = 00000000
      Oops: 0002 [#1]
      Modules linked in: netconsole capi capifs 3c59x mii fcdsl kernelcapi uhci_hcd usbcore ide_cd cdrom
      CPU:    0
      EIP:    0060:[<c39bb1f5>]    Tainted: P      VLI
      EFLAGS: 00010246   ( #3)
      EIP is at capiminor_del_ack+0x18/0x49 [capi]
      eax: 00200200   ebx: c18d41a0   ecx: c1385620   edx: 00100100
      esi: 0000d147   edi: 00001103   ebp: 0000d147   esp: c1093f3c
      ds: 007b   es: 007b   ss: 0068
      Process events/0 (pid: 3, threadinfo=c1092000 task=c1089030)
      Stack: <0>c2a17580 c18d41a0 c39bbd16 00000038 c18d41e0 00000000 d147c640 c29e0b68
             c29e0b90 00000212 c29e0b68 c39932b2 c29e0bb0 c10736a0 c0119ef0 c399326c
             c10736a8 c10736a0 c10736b0 c0119f93 c011a06e 00000001 00000000 00000000
      Call Trace:
       [<c39bbd16>] handle_minor_send+0x1af/0x241 [capi]
       [<c39932b2>] recv_handler+0x46/0x5f [kernelcapi]
       [<c0119ef0>] run_workqueue+0x5e/0x8d
       [<c399326c>] recv_handler+0x0/0x5f [kernelcapi]
       [<c0119f93>] worker_thread+0x0/0x10b
       [<c011a06e>] worker_thread+0xdb/0x10b
       [<c010c998>] default_wake_function+0x0/0xc
       [<c011c399>] kthread+0x90/0xbc
       [<c011c309>] kthread+0x0/0xbc
       [<c0100a65>] kernel_thread_helper+0x5/0xb
      Code: 7e 02 89 ee 89 f0 5a f7 d0 c1 f8 1f 5b 21 f0 5e 5f 5d c3 56 53 8b 48 50 89 d6 89 c3 8b 11 eb 2f 66 39 71 08 75 25 8b 41 04 8b 11 <89> 10 89 42 04 c7 01 00 01 10 00 89 c8 c7 41 04 00 02 20 00 e8
      The interresting part of it is the "virtual address 00200200", which is
      LIST_POISON2.  I thought about some race condition, but as this is an UP
      system, it leads to questions on how it can happen.  If we look at EFLAGS:
      00010202, we see that interrupts are enabled at the time of the crash
      (eflags & 0x200).
      Finally, I don't understand all the capi code, but I think that
      handle_minor_send() is racing somehow against capi_recv_message(), which
      call both capiminor_del_ack().  So if an IRQ occurs in the middle of
      capiminor_del_ack() and another instance of it is invoked, it leads to
      linked list corruption.
      I came up with the following patch.  With this, I could not reproduce the
      crash anymore.  Clearly, this is not the correct fix for the issue.  As this
      seems to be some locking issue, there might be more locking issues in that
      code.  For example, doesn't the whole struct capiminor have to be locked
      Cc: Carsten Paeth <calle@calle.de>
      Cc: Kai Germaschewski <kai.germaschewski@gmx.de>
      Cc: Karsten Keil <kkeil@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  9. 15 May, 2006 1 commit
  10. 28 Mar, 2006 1 commit
  11. 10 Jan, 2006 1 commit
    • Alan Cox's avatar
      [PATCH] TTY layer buffering revamp · 33f0f88f
      Alan Cox authored
      The API and code have been through various bits of initial review by
      serial driver people but they definitely need to live somewhere for a
      while so the unconverted drivers can get knocked into shape, existing
      drivers that have been updated can be better tuned and bugs whacked out.
      This replaces the tty flip buffers with kmalloc objects in rings. In the
      normal situation for an IRQ driven serial port at typical speeds the
      behaviour is pretty much the same, two buffers end up allocated and the
      kernel cycles between them as before.
      When there are delays or at high speed we now behave far better as the
      buffer pool can grow a bit rather than lose characters. This also means
      that we can operate at higher speeds reliably.
      For drivers that receive characters in blocks (DMA based, USB and
      especially virtualisation) the layer allows a lot of driver specific
      code that works around the tty layer with private secondary queues to be
      removed. The IBM folks need this sort of layer, the smart serial port
      people do, the virtualisers do (because a virtualised tty typically
      operates at infinite speed rather than emulating 9600 baud).
      Finally many drivers had invalid and unsafe attempts to avoid buffer
      overflows by directly invoking tty methods extracted out of the innards
      of work queue structs. These are no longer needed and all go away. That
      fixes various random hangs with serial ports on overflow.
      The other change in here is to optimise the receive_room path that is
      used by some callers. It turns out that only one ldisc uses receive room
      except asa constant and it updates it far far less than the value is
      read. We thus make it a variable not a function call.
      I expect the code to contain bugs due to the size alone but I'll be
      watching and squashing them and feeding out new patches as it goes.
      Because the buffers now dynamically expand you should only run out of
      buffering when the kernel runs out of memory for real.  That means a lot of
      the horrible hacks high performance drivers used to do just aren't needed any
      tty_insert_flip_char is an old API and continues to work as before, as does
      tty_flip_buffer_push() [this is why many drivers dont need modification].  It
      does now also return the number of chars inserted
      There are also
      tty_buffer_request_room(tty, len)
      which asks for a buffer block of the length requested and returns the space
      found.  This improves efficiency with hardware that knows how much to
      and tty_insert_flip_string_flags(tty, str, flags, len)
      to insert a string of characters and flags
      For a smart interface the usual code is
          len = tty_request_buffer_room(tty, amount_hardware_says);
          tty_insert_flip_string(tty, buffer_from_card, len);
      More description!
      At the moment tty buffers are attached directly to the tty.  This is causing a
      lot of the problems related to tty layer locking, also problems at high speed
      and also with bursty data (such as occurs in virtualised environments)
      I'm working on ripping out the flip buffers and replacing them with a pool of
      dynamically allocated buffers.  This allows both for old style "byte I/O"
      devices and also helps virtualisation and smart devices where large blocks of
      data suddenely materialise and need storing.
      So far so good.  Lots of drivers reference tty->flip.*.  Several of them also
      call directly and unsafely into function pointers it provides.  This will all
      break.  Most drivers can use tty_insert_flip_char which can be kept as an API
      but others need more.
      At the moment I've added the following interfaces, if people think more will
      be needed now is a good time to say
       int tty_buffer_request_room(tty, size)
      Try and ensure at least size bytes are available, returns actual room (may be
      zero).  At the moment it just uses the flipbuf space but that will change.
      Repeated calls without characters being added are not cumulative.  (ie if you
      call it with 1, 1, 1, and then 4 you'll have four characters of space.  The
      other functions will also try and grow buffers in future but this will be a
      more efficient way when you know block sizes.
       int tty_insert_flip_char(tty, ch, flag)
      As before insert a character if there is room.  Now returns 1 for success, 0
      for failure.
       int tty_insert_flip_string(tty, str, len)
      Insert a block of non error characters.  Returns the number inserted.
       int tty_prepare_flip_string(tty, strptr, len)
      Adjust the buffer to allow len characters to be added.  Returns a buffer
      pointer in strptr and the length available.  This allows for hardware that
      needs to use functions like insl or mencpy_fromio.
      Signed-off-by: default avatarAlan Cox <alan@redhat.com>
      Cc: Paul Fulghum <paulkf@microgate.com>
      Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: default avatarSerge Hallyn <serue@us.ibm.com>
      Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
      Signed-off-by: default avatarJohn Hawkes <hawkes@sgi.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  12. 28 Oct, 2005 1 commit
  13. 20 Jun, 2005 1 commit
  14. 01 May, 2005 1 commit
  15. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      Let it rip!