Fwd: bio_check_ro @ blk-core.c

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



hi,

I come to you for lack of feedback (I think the Linux kernel developers have other cats to whip :-))
would one of you have the answer or a track to follow concerning the question below ?
the encountered compilation error is behind the forwarded email.

regards, lacsaP.

---------- Forwarded message ---------
De : Pascal <patatetom@xxxxxxxxx>
Date: mer. 8 mars 2023 à 14:09
Subject: bio_check_ro @ blk-core.c

hi,

I'm addressing you because you intervened (commit) in the function bio_check_ro @ blk-core.c @ Linux-LTS-6.1.15.
the last time I intervened on this file (@ Linux-LTS-5.10.19 for personal use), it was to replace "return false;" by "return true;", which theoretically should prevent the possible writing on a device locked in read-only mode (see here or here).
with @ Linux-LTS-6.1.15, if I insert "return true;", I now have a compilation error.
in your opinion, is there still a need to "fix" blk-core.c to prevent writing to a read-only locked device and if so, can you help me implement this fix?

regards, lacsaP.
---------- End forwarded message ---------

  SYNC    include/config/auto.conf
  CC      arch/x86/kernel/asm-offsets.s
  CALL    scripts/checksyscalls.sh
  DESCEND objtool
  DESCEND bpf/resolve_btfids
  CC      block/bdev.o
  CC      block/fops.o
  CC      block/bio.o
  CC      block/elevator.o
  CC      block/blk-core.o
block/blk-core.c: In function 'bio_check_ro':
block/blk-core.c:496:24: error: 'return' with a value, in function returning void [-Werror=return-type]
  496 |                 return true;
      |                        ^~~~
block/blk-core.c:488:20: note: declared here
  488 | static inline void bio_check_ro(struct bio *bio)
      |                    ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:250: block/blk-core.o] Error 1
make[1]: *** [scripts/Makefile.build:500: block] Error 2
make: *** [Makefile:2005: .] Error 2


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

  Powered by Linux