diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-30 10:28:14 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-30 10:28:14 -0800 |
commit | e864effa1fe240473e023fc8e8d243045a7763e0 (patch) | |
tree | 4f0da74d696958e813be9ba982c7bd777611eded /net | |
parent | 9d0ad045533ee37a208991ac5baaf6641e60a9ed (diff) | |
parent | e0260d530b73ee969ae971d14daa02376dcfc93f (diff) |
Merge tag '9p-for-6.13-rc1' of https://github.com/martinetd/linux
Pull 9p updates from Dominique Martinet:
- usbg: fix alloc failure handling & build-as-module
- xen: couple of fixes
- v9fs_cache_register/unregister code cleanup
* tag '9p-for-6.13-rc1' of https://github.com/martinetd/linux:
net/9p/usbg: allow building as standalone module
9p/xen: fix release of IRQ
9p/xen: fix init sequence
net/9p/usbg: fix handling of the failed kzalloc() memory allocation
fs/9p: replace functions v9fs_cache_{register|unregister} with direct calls
Diffstat (limited to 'net')
-rw-r--r-- | net/9p/Kconfig | 4 | ||||
-rw-r--r-- | net/9p/trans_usbg.c | 4 | ||||
-rw-r--r-- | net/9p/trans_xen.c | 9 |
3 files changed, 10 insertions, 7 deletions
diff --git a/net/9p/Kconfig b/net/9p/Kconfig index ee967fd25312..22f8c167845d 100644 --- a/net/9p/Kconfig +++ b/net/9p/Kconfig @@ -41,8 +41,8 @@ config NET_9P_XEN two Xen domains. config NET_9P_USBG - bool "9P USB Gadget Transport" - depends on USB_GADGET=y || USB_GADGET=NET_9P + tristate "9P USB Gadget Transport" + depends on USB_GADGET select CONFIGFS_FS select USB_LIBCOMPOSITE help diff --git a/net/9p/trans_usbg.c b/net/9p/trans_usbg.c index 975b76839dca..6b694f117aef 100644 --- a/net/9p/trans_usbg.c +++ b/net/9p/trans_usbg.c @@ -909,9 +909,9 @@ static struct usb_function_instance *usb9pfs_alloc_instance(void) usb9pfs_opts->buflen = DEFAULT_BUFLEN; dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (IS_ERR(dev)) { + if (!dev) { kfree(usb9pfs_opts); - return ERR_CAST(dev); + return ERR_PTR(-ENOMEM); } usb9pfs_opts->dev = dev; diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c index dfdbe1ca5338..b9ff69c7522a 100644 --- a/net/9p/trans_xen.c +++ b/net/9p/trans_xen.c @@ -286,7 +286,7 @@ static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) if (!priv->rings[i].intf) break; if (priv->rings[i].irq > 0) - unbind_from_irqhandler(priv->rings[i].irq, priv->dev); + unbind_from_irqhandler(priv->rings[i].irq, ring); if (priv->rings[i].data.in) { for (j = 0; j < (1 << priv->rings[i].intf->ring_order); @@ -465,6 +465,7 @@ static int xen_9pfs_front_init(struct xenbus_device *dev) goto error; } + xenbus_switch_state(dev, XenbusStateInitialised); return 0; error_xenbus: @@ -512,8 +513,10 @@ static void xen_9pfs_front_changed(struct xenbus_device *dev, break; case XenbusStateInitWait: - if (!xen_9pfs_front_init(dev)) - xenbus_switch_state(dev, XenbusStateInitialised); + if (dev->state != XenbusStateInitialising) + break; + + xen_9pfs_front_init(dev); break; case XenbusStateConnected: |