]> Pileus Git - ~andy/linux/commitdiff
usb-anchor: Ensure poisened gets initialized to 0
authorHans de Goede <hdegoede@redhat.com>
Wed, 9 Oct 2013 15:01:40 +0000 (17:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Oct 2013 23:33:58 +0000 (16:33 -0700)
And do so in a way which ensures that any fields added in the future will
also get properly zero-ed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/usb.h

index f726c39097e044d2bec294054a42bff87b5c46f7..fa8bedf06c6e2a883797006d29024dcfc628bd76 100644 (file)
@@ -1214,6 +1214,7 @@ struct usb_anchor {
 
 static inline void init_usb_anchor(struct usb_anchor *anchor)
 {
+       memset(anchor, 0, sizeof(*anchor));
        INIT_LIST_HEAD(&anchor->urb_list);
        init_waitqueue_head(&anchor->wait);
        spin_lock_init(&anchor->lock);