netdev
[Top] [All Lists]

[PATCH] [sparse] add annotation to sock_filter.h

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: [PATCH] [sparse] add annotation to sock_filter.h
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Thu, 17 Jun 2004 10:26:22 -0700
Cc: netdev@xxxxxxxxxxx
Organization: Open Source Development Lab
Sender: netdev-bounce@xxxxxxxxxxx
Since sock_fprog is argument in ioctl, the filter pointer needs to be annotated.

Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxx>

diff -Nru a/include/linux/filter.h b/include/linux/filter.h
--- a/include/linux/filter.h    2004-06-16 15:26:32 -07:00
+++ b/include/linux/filter.h    2004-06-16 15:26:32 -07:00
@@ -5,6 +5,8 @@
 #ifndef __LINUX_FILTER_H__
 #define __LINUX_FILTER_H__
 
+#include <linux/compiler.h>
+
 /*
  * Current version of the filter code architecture.
  */
@@ -27,7 +29,7 @@
 struct sock_fprog      /* Required for SO_ATTACH_FILTER. */
 {
        unsigned short          len;    /* Number of filter blocks */
-       struct sock_filter      *filter;
+       struct sock_filter __user *filter;
 };
 
 #ifdef __KERNEL__

<Prev in Thread] Current Thread [Next in Thread>