Re: [PATCH v2] nvmem: check invalid number of bytes in nvmem_{read,write}()

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

 





On 10/12/18 15:28, Biju Das wrote:
+	/* Stop the user from writing */
+	if (offset >= nvmem->size)
+		return -ENOSPC;
+
This should be "return -EFBIG" to make utilities like dd or sh happy.

Look at 38b0774c0598c ("nvmem: core: return EFBIG on out-of-range write") for more info.

other than that, patch looks fine to me!

--srini






[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux