Date: Tue, 22 Mar 2011 20:11:17 +0100 From: Marius Strobl <marius@alchemy.franken.de> To: Roger Hammerstein <cheeky.m@live.com> Cc: pjd@freebsd.org, freebsd-sparc64@freebsd.org, mm@freebsd.org Subject: Re: sparc64 hang with zfs v28 Message-ID: <20110322191117.GH15528@alchemy.franken.de> In-Reply-To: <BAY147-w266A8BF89A940BDD569D2EF9B40@phx.gbl> References: <BAY147-w7342A790723770DCE8BD4F9C00@phx.gbl> <BAY147-w229E76D137B7A0DCEB3696F9C70@phx.gbl> <20110307192239.GA31314@alchemy.franken.de> <BAY147-w5926709E28BF613C663D48F9C90@phx.gbl> <20110310185423.GA50419@alchemy.franken.de> <20110319152838.GA8594@alchemy.franken.de> <20110321175632.GA19345@darkthrone.kvedulv.de> <20110321175933.GD2086@garage.freebsd.pl> <BAY147-w266A8BF89A940BDD569D2EF9B40@phx.gbl>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Tue, Mar 22, 2011 at 01:51:20PM -0400, Roger Hammerstein wrote:
>
> which is:
> 1310:
> 1311: error = put_nvlist(zc, configs);
> 1312:
> 1313: nvlist_free(configs);
> 1314:
> 1315: return (error);
> 1316:}
> 1317:
>
Uhm, looks like r219089 changed some xcopy{in,out}() into
ddi_copy{in,out}(), i.e. copy{in,out}() into bcopy(), which
is just wrong for copying in data in from/out to userspace.
However, looking at the other uses of ddi_copy{in,out}() it
generally seems that ddi_copy{in,out}() should be defined to
copy{in,out}(). With the attached patch at least my simple
test cases works again. The one remaining xcopyout() in
zfs_ioctl.c then could be also replaced with a ddi_copyout().
Not sure how any of this manages to work on x86 :)
Marius
[-- Attachment #2 --]
Index: sys/cddl/compat/opensolaris/sys/sunddi.h
===================================================================
--- sys/cddl/compat/opensolaris/sys/sunddi.h (revision 219703)
+++ sys/cddl/compat/opensolaris/sys/sunddi.h (working copy)
@@ -37,8 +37,10 @@
#define strdup(ptr) strdup((ptr), M_SOLARIS)
#define ddi_driver_major(zfs_dip) (0)
-#define ddi_copyin(from, to, size, flag) (bcopy((from), (to), (size)), 0)
-#define ddi_copyout(from, to, size, flag) (bcopy((from), (to), (size)), 0)
+#define ddi_copyin(from, to, size, flag) \
+ (copyin((from), (to), (size)), 0)
+#define ddi_copyout(from, to, size, flag) \
+ (copyout((from), (to), (size)), 0)
int ddi_strtol(const char *str, char **nptr, int base, long *result);
int ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result);
int ddi_strtoull(const char *str, char **nptr, int base,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110322191117.GH15528>
