linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fix udev on alpha, parisc, and probably sparc/sparc64
@ 2006-02-17 17:15 Kyle McMartin
  2006-02-21 17:57 ` Kay Sievers
  0 siblings, 1 reply; 2+ messages in thread
From: Kyle McMartin @ 2006-02-17 17:15 UTC (permalink / raw)
  To: linux-hotplug

This fixes udev on, at least, parisc (tested), on Debian. I
recently ran into the bug where any SMP kernel would cause
the initial hotplug event deluge to run out of buffer space. Looking
more deeply into it, the reason is the sock_setsockopts
SO_RCVBUFFORCE clause was being missed completely. I suspect this
is because SO_RCVBUFFORCE is a recent addition to the kernel (first 
I can find is 2005-08-29) and linux-kernel-headers hasn't been
revved since 2.6.13ish on Debian, and Patrick's patch arrived after
2.6.13 released.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>

---
diff --git a/udev_libc_wrapper.h b/udev_libc_wrapper.h
index a4d320f..53390a2 100644
--- a/udev_libc_wrapper.h
+++ b/udev_libc_wrapper.h
@@ -135,8 +135,15 @@ static inline int inotify_add_watch(int 
 #endif
 
 #ifndef SO_RCVBUFFORCE
+/* Some architectures use a different value for compatibility with
+ * other Unix.
+ */
+#if defined(__alpha__) || defined(__hppa__) || defined(__sparc__) || defined(__sparc_v9__)
+#define SO_RCVBUFFORCE 0x100b
+#else
 #define SO_RCVBUFFORCE 33
 #endif
+#endif
 
 extern uid_t lookup_user(const char *user);
 extern gid_t lookup_group(const char *group);


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

end of thread, other threads:[~2006-02-21 17:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-17 17:15 Fix udev on alpha, parisc, and probably sparc/sparc64 Kyle McMartin
2006-02-21 17:57 ` Kay Sievers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).