Fix drivers/macintosh/adbhid.c stupid breakage

From: Paul Mackerras (paulus_at_samba.org)
Date: 10/31/05

  • Next message: Alexander Shaposhnikov: "Re: cpufreq driver + wrong cpu time"
    Date:	Mon, 31 Oct 2005 16:38:43 +1100
    To: Dmitry Torokhov <dtor_core@ameritech.net>
    
    

    Commit c7f7a569d9b4ea7c53ab6fcd1377895312d8372b ("[PATCH] Input:
    convert drivers/macintosh to dynamic input_dev allocation") breaks any
    machine with an ADB keyboard or mouse, which includes my G4
    powerbook. Was it given any testing at all?

    The problem is that adbhid[]->input is NULL, so the kernel oopses with
    a null pointer dereference as soon as I press a key. The following
    patch fixes it.

    Signed-off-by: Paul Mackerras <paulus@samba.org>

    ---
    diff -urN powerpc-merge/drivers/macintosh/adbhid.c merge-hack/drivers/macintosh/adbhid.c
    --- powerpc-merge/drivers/macintosh/adbhid.c	2005-10-31 13:15:26.000000000 +1100
    +++ merge-hack/drivers/macintosh/adbhid.c	2005-10-31 16:30:31.000000000 +1100
    @@ -723,6 +723,7 @@
     
     	sprintf(hid->phys, "adb%d:%d.%02x/input", id, default_id, original_handler_id);
     
    +	hid->input = input_dev;
     	hid->id = default_id;
     	hid->original_handler_id = original_handler_id;
     	hid->current_handler_id = current_handler_id;
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Alexander Shaposhnikov: "Re: cpufreq driver + wrong cpu time"

    Relevant Pages

    • Re: Fix drivers/macintosh/adbhid.c stupid breakage
      ... On Monday 31 October 2005 00:38, Paul Mackerras wrote: ... > machine with an ADB keyboard or mouse, ... > powerbook. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [patch] use cheaper elv_queue_empty when unplug a device
      ... Arjan van de Ven wrote: ... >> and assume the chances of getting a merge will be small (is this ... the complete removal of the GFP_ATOMIC allocation probably ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Kernel 2.6.9 Multiple Page Allocation Failures
      ... > Adam Radford from this list and i would like to see it run stable for about a ... > still swapping a bit but no kernel messages on this, ... We will have more information on the free areas state when the allocation ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: DRAM and PCI devices at same physical address
      ... but this is the most reliable way to do your large allocation. ... assignment for a given resource type. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [patch 0/6] mm: alloc_percpu and bigrefs
      ... > the brain, and it's starting to bloat things up a little bit too much. ... allocation can't get per-cpu data it just degrades beautifully into a ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)