Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 308279 Details for
Bug 449812
gnbd does explicitly disallow sending requests after a send has failed.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to disallow sending requests after a send has failed.
shutdown_after_failure.patch (text/plain), 1.68 KB, created by
Ben Marzinski
on 2008-06-03 18:50:20 UTC
(
hide
)
Description:
patch to disallow sending requests after a send has failed.
Filename:
MIME Type:
Creator:
Ben Marzinski
Created:
2008-06-03 18:50:20 UTC
Size:
1.68 KB
patch
obsolete
>Index: gnbd-kernel-0.1.4/src/gnbd.c >=================================================================== >--- gnbd-kernel-0.1.4.orig/src/gnbd.c >+++ gnbd-kernel-0.1.4/src/gnbd.c >@@ -401,6 +401,12 @@ int __gnbd_send_req(struct gnbd_device * > > down(&dev->tx_lock); > >+ if (dev->corrupt) { >+ printk(KERN_ERR "%s: Attempted to send on a faulty socket\n", >+ dev->disk->disk_name); >+ result = -EBADFD; >+ goto error_out; >+ } > if (!sock) { > printk(KERN_ERR "%s: Attempted send on closed socket\n", > dev->disk->disk_name); >@@ -455,6 +461,7 @@ int __gnbd_send_req(struct gnbd_device * > return 0; > > send_error_out: >+ dev->corrupt = 1; > dev->current_request = NULL; > wake_up(&dev->tx_wait); > error_out: >@@ -519,6 +526,11 @@ int gnbd_do_it(struct gnbd_device *dev) > BUG_ON(dev->magic != GNBD_MAGIC); > > while((result = sock_xmit(sock, 0, &reply,sizeof(reply), MSG_WAITALL, 1)) > 0){ >+ if (dev->corrupt) { >+ printk(KERN_ERR "%s: faulty socket\n",dev->disk->disk_name); >+ return -EBADFD; >+ } >+ > if (ntohl(reply.magic) == GNBD_KEEP_ALIVE_MAGIC) > /* FIXME -- I should reset the wait time here */ > continue; >@@ -788,6 +800,7 @@ static int gnbd_ctl_ioctl(struct inode * > } > dev->file = file; > dev->sock = SOCKET_I(inode); >+ dev->corrupt = 0; > dev->receiver_pid = current->pid; > blk_run_queue(dev->disk->queue); > error = gnbd_do_it(dev); >Index: gnbd-kernel-0.1.4/src/gnbd.h >=================================================================== >--- gnbd-kernel-0.1.4.orig/src/gnbd.h >+++ gnbd-kernel-0.1.4/src/gnbd.h >@@ -58,6 +58,7 @@ struct gnbd_device { > struct block_device *bdev; > struct request *current_request; > wait_queue_head_t tx_wait; >+ int corrupt; > }; > > #endif /* __KERNEL__ */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 449812
: 308279