[PATCH] firewire: don't panic on invalid AR request buffer



BUG() at this place is wrong. (Unless if the low level driver would
already do higher-level input validation of incoming request headers.)

Invalid incoming requests or bugs in the controller which corrupt the
AR-req buffer needlessly crashed the box because this is run in tasklet
context.

Signed-off-by: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>
---
drivers/firewire/fw-transaction.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux/drivers/firewire/fw-transaction.c
===================================================================
--- linux.orig/drivers/firewire/fw-transaction.c
+++ linux/drivers/firewire/fw-transaction.c
@@ -575,7 +575,8 @@ allocate_request(struct fw_packet *p)
break;

default:
- BUG();
+ fw_error("ERROR - corrupt request received - %08x %08x %08x\n",
+ p->header[0], p->header[1], p->header[2]);
return NULL;
}


--
Stefan Richter
-=====-==--- -=-= =====
http://arcgraph.de/sr/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: BUG REPORT: prints, but doesnt display, suppressed 1st page H
    ... duplicate headers and alternate-side page numbers in the footers. ... In this simple little file, with one master page which is never ... "Mary Sauer" wrote: ... is a bug. ...
    (microsoft.public.publisher)
  • Re: OO Javascript for AJAX encapsulation
    ... Does it mean that any properly reported bug becomes a ... and frequently impractical as subject headers are frequently so ... The implications for memory consumption are identical ...
    (comp.lang.javascript)
  • Re: Doesnt Eudora (6.2) specify the charset in the headers?
    ... The e-mail there had the neccessary headers: ... If it's not a bug, I could only imagine that this occurs due to the ... that Eudora as a reminiscence to old times changes the text ... not be in compliance with the new encoding. ...
    (comp.mail.eudora.mac)
  • Re: Email questions
    ... Microsoft Entourage will let you do this (Preferences> Mail & News ... Do you want to strip headers from incoming messages, or just replies, or ?? ... they implement those or other features. ... I'd go to Apple's bug reporter page and file a bug ...
    (comp.sys.mac.system)
  • Re: Sections, headers
    ... the margins for the new section default back to the ... This appears to be a bug, ... paragraph mark and paste including the paragraph mark, ... And the StyleRef field offers a way to have varied headers without ...
    (microsoft.public.word.pagelayout)