Re: [PATCH v3] staging: unisys: Add s-Par visorhba

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 26, 2015 at 12:11:12AM -0400, Benjamin Romer wrote:
> +	/* convert buffer to phys information */
> +	if ((scsi_sg_count(scsicmd) == 0) && (scsi_bufflen(scsicmd) > 0)) {
> +		BUG_ON(scsi_sg_count(scsicmd) == 0);

Ah nice, you just crashed the kernel and all data is now lost _AND_ the
user has no idea what happened. :(

Never use BUG() or BUG_ON() lines in a driver unless things are just so
horribly hosed that turning the machine off is the only thing that is
possible to do.

Care to fix the places in this patch that you do this?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux