The patch titled Fix a potential NULL pointer dereference in write_bulk_callback() in drivers/net/usb/pegasus.c has been added to the -mm tree. Its filename is fix-a-potential-null-pointer-dereference-in-write_bulk_callback.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Fix a potential NULL pointer dereference in write_bulk_callback() in drivers/net/usb/pegasus.c From: Micah Gruber <micah.gruber@xxxxxxxxx> This patch fixes a potential null dereference bug where we dereference pegasus before a null check. This patch simply moves the dereferencing after the null check. Signed-off-by: Micah Gruber <micah.gruber@xxxxxxxxx> Acked-by: Petko Manolov <petkan@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/net/usb/pegasus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN drivers/net/usb/pegasus.c~fix-a-potential-null-pointer-dereference-in-write_bulk_callback drivers/net/usb/pegasus.c --- a/drivers/net/usb/pegasus.c~fix-a-potential-null-pointer-dereference-in-write_bulk_callback +++ a/drivers/net/usb/pegasus.c @@ -768,11 +768,13 @@ done: static void write_bulk_callback(struct urb *urb) { pegasus_t *pegasus = urb->context; - struct net_device *net = pegasus->net; + struct net_device *net; if (!pegasus) return; + net = pegasus->net; + if (!netif_device_present(net) || !netif_running(net)) return; _ Patches currently in -mm which might be from micah.gruber@xxxxxxxxx are fix-a-potential-null-pointer-dereference-in-write_bulk_callback.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html