mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] raw1394 missing failure handling
@ 2005-03-02 11:10 Panagiotis Issaris
  2005-03-02 11:33 ` Anton Altaparmakov
  2005-03-02 11:37 ` Sergey Vlasov
  0 siblings, 2 replies; 11+ messages in thread
From: Panagiotis Issaris @ 2005-03-02 11:10 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 240 bytes --]

Hi,

In the raw1394 driver the failure handling for
a __copy_to_user call is missing.

With friendly regards,
Takis

-- 
  K.U.Leuven, Mechanical Eng.,  Mechatronics & Robotics Research Group
  http://people.mech.kuleuven.ac.be/~pissaris/


[-- Attachment #2: pi-20050302T114855-linux_2_6_11-raw1394_copy_to_user_failure_handling.diff --]
[-- Type: text/x-patch, Size: 661 bytes --]

diff -pruN linux-2.6.11/drivers/ieee1394/raw1394.c linux-2.6.11-pi/drivers/ieee1394/raw1394.c
--- linux-2.6.11/drivers/ieee1394/raw1394.c	2005-03-02 11:44:26.000000000 +0100
+++ linux-2.6.11-pi/drivers/ieee1394/raw1394.c	2005-03-02 11:47:38.000000000 +0100
@@ -443,7 +443,8 @@ static ssize_t raw1394_read(struct file 
                         req->req.error = RAW1394_ERROR_MEMFAULT;
                 }
         }
-        __copy_to_user(buffer, &req->req, sizeof(req->req));
+        if (__copy_to_user(buffer, &req->req, sizeof(req->req)))
+                return -EFAULT;
 
         free_pending_request(req);
         return sizeof(struct raw1394_request);

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-03-05 21:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-02 11:10 [PATCH] raw1394 missing failure handling Panagiotis Issaris
2005-03-02 11:33 ` Anton Altaparmakov
2005-03-02 12:28   ` Panagiotis Issaris
2005-03-02 14:24     ` Dmitry Torokhov
2005-03-02 14:30       ` Panagiotis Issaris
2005-03-03 21:48         ` Jody McIntyre
2005-03-03 22:41           ` Panagiotis Issaris
2005-03-03 22:55           ` Panagiotis Issaris
2005-03-05 18:47             ` Jody McIntyre
2005-03-05 21:10               ` Gene Heskett
2005-03-02 11:37 ` Sergey Vlasov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome